]> gitweb.michael.orlitzky.com - dunshire.git/commitdiff
Exit with a non-zero code when the test suite fails.
authorMichael Orlitzky <michael@orlitzky.com>
Sun, 30 Oct 2016 17:39:08 +0000 (13:39 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Sun, 30 Oct 2016 17:39:08 +0000 (13:39 -0400)
test/__init__.py
test/__main__.py

index 4241453f5a99fddb29d3e682244bca48a8f48799..bbcd4ab767f5cdfd4175b3b49a1edbd78f5e7cb7 100644 (file)
@@ -36,4 +36,4 @@ def run_suite(suite):
     packages.
     """
     runner = TextTestRunner(verbosity=1)
-    runner.run(suite)
+    return runner.run(suite)
index 6a8af8a538397216234283e7fe350f0eff912f65..26dfc57a8d4eb877d1e533707ee0aff7f99a0bb9 100644 (file)
@@ -3,4 +3,9 @@ An implementation of __main__() that allows us to "run this module."
 """
 from test import build_suite, run_suite
 
-run_suite(build_suite())
+result = run_suite(build_suite())
+
+if result.wasSuccessful():
+    exit(0)
+else:
+    exit(1)