diff options
author | Lars Wirzenius <liw@liw.fi> | 2014-04-26 16:42:33 +0100 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2014-04-26 16:42:33 +0100 |
commit | bb452457d6a3d4cc1119cddcd64172f0458bd653 (patch) | |
tree | 233c323ba6b267b2c0f4be2490a6e83e62df3e82 /setup.py | |
parent | 88398c12a4715ea93fa982ab193e09262ef12567 (diff) | |
download | distix-bb452457d6a3d4cc1119cddcd64172f0458bd653.tar.gz |
Refactor setup.py: simpler method for running tests
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 23 |
1 files changed, 14 insertions, 9 deletions
@@ -50,17 +50,22 @@ class Check(Command): def run(self): if self.unit_tests: - print "run unit tests" - cliapp.runcmd( - ['python', '-m', 'CoverageTestRunner', - '--ignore-missing-from=without-tests'], - stdout=None, stderr=None) - os.remove('.coverage') + self.run_unit_tests() if self.yarns: - cliapp.runcmd( - ['yarn'] + glob.glob('yarns/*.yarn'), - stdout=None, stderr=None) + self.run_yarns() + + def run_unit_tests(self): + cliapp.runcmd( + ['python', '-m', 'CoverageTestRunner', + '--ignore-missing-from=without-tests'], + stdout=None, stderr=None) + os.remove('.coverage') + + def print_yarns(self): + cliapp.runcmd( + ['yarn'] + glob.glob('yarns/*.yarn'), + stdout=None, stderr=None) setup(name='distix', |