diff options
-rw-r--r-- | Makefile | 1 | ||||
-rwxr-xr-x | setup.py | 9 |
2 files changed, 8 insertions, 2 deletions
@@ -17,7 +17,6 @@ coverage: coverage report "--include=factory/*.py,tests/*.py" coverage html "--include=factory/*.py,tests/*.py" - doc: $(MAKE) -C docs html @@ -51,7 +51,14 @@ class test(cmd.Command): else: verbosity=0 - suite = unittest.TestLoader().loadTestsFromName(self.test_suite) + loader = unittest.TestLoader() + suite = unittest.TestSuite() + + if self.test_suite == 'tests': + for test_module in loader.discover('.'): + suite.addTest(test_module) + else: + suite.addTest(loader.loadTestsFromName(self.test_suite)) result = unittest.TextTestRunner(verbosity=verbosity).run(suite) if not result.wasSuccessful(): |