From 2148592395ef4da0d408be26bf5839117ee0e5fe Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 18 Sep 2016 09:27:23 -0400 Subject: Even better, use a static method --- setuptools/command/test.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'setuptools/command/test.py') diff --git a/setuptools/command/test.py b/setuptools/command/test.py index 48d5b5e1..38bbcd8b 100644 --- a/setuptools/command/test.py +++ b/setuptools/command/test.py @@ -186,18 +186,18 @@ class test(Command): else: os.environ['PYTHONPATH'] = orig_pythonpath - def install_dists(self): + @staticmethod + def install_dists(dist): """ Install the requirements indicated by self.distribution and return an iterable of the dists that were built. """ - dist = self.distribution ir_d = dist.fetch_build_eggs(dist.install_requires or []) tr_d = dist.fetch_build_eggs(dist.tests_require or []) return itertools.chain(ir_d, tr_d) def run(self): - installed_dists = self.install_dists() + installed_dists = self.install_dists(self.distribution) cmd = ' '.join(self._argv) if self.dry_run: -- cgit v1.2.1