From 16688ab07612e4f022b3118e7a18660ffdfcb106 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Fri, 29 May 2015 13:16:52 -0400
Subject: [PATCH] Propagate the result of tests
This way things like
python -c 'import sys, blosc; sys.exit(blosc.test())'
actually fail if tests fail.
---
blosc/test.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/blosc/test.py b/blosc/test.py
index 0a12fb0107..760db66296 100644
--- a/blosc/test.py
+++ b/blosc/test.py
@@ -187,7 +187,7 @@ def run(verbosity=2):
# suite = unittest.TestLoader().discover(start_dir='.', pattern='test*.py')
suite.addTests(unittest.TestLoader().loadTestsFromModule(blosc.toplevel))
- unittest.TextTestRunner(verbosity=verbosity).run(suite)
+ assert unittest.TextTestRunner(verbosity=verbosity).run(suite).wasSuccessful()
if __name__ == '__main__':
--
2.1.0