From 84093b78ec61ad47a2a0dea9f1be8d94fa0d485e Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Mon, 26 Jun 2017 16:32:43 +0200 Subject: fix `test` command when run with Python 2 When using Python 2, `python2 -m unittest` is not equivalent to `python2 -m unittest discover`. --- setuptools/command/test.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'setuptools/command/test.py') diff --git a/setuptools/command/test.py b/setuptools/command/test.py index 638d0c56..523407fd 100644 --- a/setuptools/command/test.py +++ b/setuptools/command/test.py @@ -101,6 +101,8 @@ class test(Command): return list(self._test_args()) def _test_args(self): + if not self.test_suite: + yield 'discover' if self.verbose: yield '--verbose' if self.test_suite: -- cgit v1.2.1