From 93e55ad2fae3a08ced8f324f9b01abe0fce6ed39 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Mon, 18 Jun 2018 21:45:46 -0300 Subject: [PATCH] Remove unused attribute and parameter in CallSpec2 --- changelog/3598.trivial.rst | 1 + src/_pytest/python.py | 6 ++---- 2 files changed, 3 insertions(+), 4 deletions(-) create mode 100644 changelog/3598.trivial.rst diff --git a/changelog/3598.trivial.rst b/changelog/3598.trivial.rst new file mode 100644 index 000000000..fd80f58cd --- /dev/null +++ b/changelog/3598.trivial.rst @@ -0,0 +1 @@ +Internal refactoring: removed unused ``CallSpec2tox ._globalid_args`` attribute and ``metafunc`` parameter from ``CallSpec2.copy()``. diff --git a/src/_pytest/python.py b/src/_pytest/python.py index 48516199f..0dcecdd55 100644 --- a/src/_pytest/python.py +++ b/src/_pytest/python.py @@ -735,13 +735,12 @@ class CallSpec2(object): self._idlist = [] self.params = {} self._globalid = NOTSET - self._globalid_args = set() self._globalparam = NOTSET self._arg2scopenum = {} # used for sorting parametrized resources self.marks = [] self.indices = {} - def copy(self, metafunc): + def copy(self): cs = CallSpec2(self.metafunc) cs.funcargs.update(self.funcargs) cs.params.update(self.params) @@ -750,7 +749,6 @@ class CallSpec2(object): cs._arg2scopenum.update(self._arg2scopenum) cs._idlist = list(self._idlist) cs._globalid = self._globalid - cs._globalid_args = self._globalid_args cs._globalparam = self._globalparam return cs @@ -933,7 +931,7 @@ class Metafunc(fixtures.FuncargnamesCompatAttr): param.values, argnames ) ) - newcallspec = callspec.copy(self) + newcallspec = callspec.copy() newcallspec.setmulti2( valtypes, argnames,