diff options
| author | Liam Young <liam.young@canonical.com> | 2014-07-16 12:20:22 +0100 |
|---|---|---|
| committer | Liam Young <liam.young@canonical.com> | 2014-07-16 12:20:22 +0100 |
| commit | d01ff113e96fc2bf6473de331b6ed2c363ed5acd (patch) | |
| tree | 3bfbdc07343d80a087110872a18f515b1d053674 | |
| parent | 659fd184af35bf1230577084433176d1cae650d8 (diff) | |
| download | logutils-git-d01ff113e96fc2bf6473de331b6ed2c363ed5acd.tar.gz | |
Ensure that test failures result in a non-zero exit code.
| -rw-r--r-- | setup.py | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -27,7 +27,9 @@ class TestCommand(distutils.core.Command): import logutil_tests loader = unittest.TestLoader() runner = unittest.TextTestRunner() - runner.run(loader.loadTestsFromModule(logutil_tests)) + test_results = runner.run(loader.loadTestsFromModule(logutil_tests)) + if not test_results.wasSuccessful(): + sys.exit(1) def initialize_options(self): pass |
