Permalink
Browse files

Actually catch errors and exit with non-zero when they occur.

  • Loading branch information...
captainhammy committed Dec 3, 2018
1 parent 57f88de commit 80891615b97924ad4d3aaa2ee40b5380182ce22c
Showing with 5 additions and 1 deletion.
  1. +5 −1 bin/run_tests.py
@@ -1,6 +1,7 @@
"""Discover and run unittests, with coverage."""
import coverage
import sys
import unittest
# Start the coverage reporting.
@@ -11,11 +12,14 @@
loader = unittest.TestLoader()
suite = loader.discover(".")
runner = unittest.TextTestRunner()
runner.run(suite)
result = runner.run(suite)
# Stop the coverage operation, generate reports.
cov.stop()
cov.save()
cov.html_report()
cov.xml_report()
if not result.wasSuccessful():
sys.exit(1)

0 comments on commit 8089161

Please sign in to comment.