From 8223f2804628034993247add70943888d96d6348 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 10 Oct 2015 20:38:36 -0400 Subject: Only include test_suite in args if one is specified. Ref #446. --- setuptools/command/test.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'setuptools') diff --git a/setuptools/command/test.py b/setuptools/command/test.py index 75d55bad..11e4a019 100644 --- a/setuptools/command/test.py +++ b/setuptools/command/test.py @@ -80,8 +80,13 @@ class test(Command): @property def test_args(self): - verbose = ['--verbose'] if self.verbose else [] - return verbose + [self.test_suite] + return list(self._test_args()) + + def _test_args(self): + if self.verbose: + yield '--verbose' + if self.test_suite: + yield self.test_suite def with_project_on_sys_path(self, func): with_2to3 = PY3 and getattr(self.distribution, 'use_2to3', False) -- cgit v1.2.1