Commit 9f37eb81 authored by Cédric Krier's avatar Cédric Krier

Exit on test failure

When test fails, it should not continue to run other commands.
Fixes #891
parent 083929cf
......@@ -226,12 +226,14 @@ class test(Command):
list(map(sys.modules.__delitem__, del_modules))
exit_kwarg = {} if sys.version_info < (2, 7) else {"exit": False}
unittest_main(
test = unittest_main(
None, None, self._argv,
testLoader=self._resolve_as_ep(self.test_loader),
testRunner=self._resolve_as_ep(self.test_runner),
**exit_kwarg
)
if not test.result.wasSuccessful():
sys.exit(1)
@property
def _argv(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment