diff --git a/add-setter-for-test_args.patch b/add-setter-for-test_args.patch new file mode 100644 index 0000000..1cd0a6c --- /dev/null +++ b/add-setter-for-test_args.patch @@ -0,0 +1,30 @@ +# HG changeset patch +# User Robert Kuska +# Date 1446653216 -3600 +# Node ID f73f1baac78107dd49a5d18b6e43a40baf509d3e +# Parent 4ce518784af886e6977fa2dbe58359d0fe161d0d +AttributeError: cant set attribute + +with the recent transformation of self.test_args into +property self.test_args doesnt accept assignation +when test class is subclassed. This PR adds setter +for the new property. + +diff --git a/setuptools/command/test.py b/setuptools/command/test.py +--- a/setuptools/command/test.py ++++ b/setuptools/command/test.py +@@ -80,8 +80,14 @@ + + @property + def test_args(self): ++ if hasattr(self, '_test_args_var'): ++ return self._test_args_var + return list(self._test_args()) + ++ @test_args.setter ++ def test_args(self, value): ++ self._test_args_var = value ++ + def _test_args(self): + if self.verbose: + yield '--verbose' diff --git a/python-setuptools.spec b/python-setuptools.spec index 370a0a5..7b0c25c 100644 --- a/python-setuptools.spec +++ b/python-setuptools.spec @@ -100,6 +100,7 @@ execute the software that requires pkg_resources.py. %prep %setup -q -n %{srcname}-%{version} +%patch1 -p1 # We can't remove .egg-info (but it doesn't matter, since it'll be rebuilt): # The problem is that to properly execute setuptools' setup.py,