diff options
author | Lars Wirzenius <liw@iki.fi> | 2008-01-09 12:34:07 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@iki.fi> | 2008-01-09 12:34:07 +0200 |
commit | f2b2d05be1c8e20eb6418aed92ca68ddf8e16b0f (patch) | |
tree | 0b9e5d194f328b11f5340dede846aaac77ae97b4 /CoverageTestRunner.py | |
parent | 94b16dc4ed88a7bad4b8d6dcb0e3804c24e408dd (diff) | |
download | python-coverage-test-runner-f2b2d05be1c8e20eb6418aed92ca68ddf8e16b0f.tar.gz |
When running module as a script, if the tests failed, exit with a non-zero exit code.
Diffstat (limited to 'CoverageTestRunner.py')
-rw-r--r-- | CoverageTestRunner.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/CoverageTestRunner.py b/CoverageTestRunner.py index 60c7f24..eafdd44 100644 --- a/CoverageTestRunner.py +++ b/CoverageTestRunner.py @@ -184,7 +184,9 @@ def run(dirname="."): """Use CoverageTestRunner on the desired directory.""" runner = CoverageTestRunner() runner.find_pairs(dirname) - runner.run() + result = runner.run() + if not result.wasSuccessful(): + sys.exit(1) if __name__ == "__main__": |