diff options
-rw-r--r-- | tests/__init__.py | 2 | ||||
-rwxr-xr-x | tests/runTests | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/tests/__init__.py b/tests/__init__.py index 1a235ff26..6acf0c99f 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -18,4 +18,4 @@ def main(): except ImportError: pass - unittest.TextTestRunner(verbosity=2).run(suite) + return unittest.TextTestRunner(verbosity=2).run(suite) diff --git a/tests/runTests b/tests/runTests index 74b853f09..fed58f75d 100755 --- a/tests/runTests +++ b/tests/runTests @@ -16,5 +16,7 @@ sys.path.insert(0,'../pym') sys.path.insert(0, osp.dirname(osp.dirname(osp.abspath(__file__)))) import tests - -tests.main() +if __name__ == "__main__": + result = tests.main() + if result.failures: + sys.exit(1) |