From d3efa2fca8478a5b33925e14442d5cf81530578c Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Tue, 8 Oct 2013 11:24:17 +0200 Subject: [PATCH] setup.py: simplify test command --- setup.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/setup.py b/setup.py index 392779e..b1735f8 100755 --- a/setup.py +++ b/setup.py @@ -18,14 +18,7 @@ class TestCommand(Command): ''' Finds all the tests modules in tests/, and runs them. ''' - testfiles = [ ] - for t in glob(pjoin(self._dir, 'tests', '*.py')): - if not t.endswith('__init__.py'): - testfiles.append('.'.join( - ['tests', splitext(basename(t))[0]]) - ) - - tests = TestLoader().loadTestsFromNames(testfiles) + tests = TestLoader().loadTestsFromName('tests.api') t = TextTestRunner(verbosity = 1) t.run(tests)