diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2016-12-26 09:37:47 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2016-12-26 09:37:47 -0500 |
commit | a110edeb6485fffa3accc4202e6b587f7def85ec (patch) | |
tree | b6bba9cd2efbb1b22b9120a38866f0c03deda855 /tests/test_process.py | |
parent | f7b83b4e00512525ff93783f18dc70b7d42ea1e7 (diff) | |
download | python-coveragepy-git-a110edeb6485fffa3accc4202e6b587f7def85ec.tar.gz |
Make excepthook execution more accurate. Pypy tests failing
Diffstat (limited to 'tests/test_process.py')
-rw-r--r-- | tests/test_process.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/test_process.py b/tests/test_process.py index a7148621..86155374 100644 --- a/tests/test_process.py +++ b/tests/test_process.py @@ -836,7 +836,10 @@ class ExcepthookTest(CoverageTest): import sys def excepthook(*args): - print('in excepthook') + # Write this message to stderr so that we don't have to deal + # with interleaved stdout/stderr comparisons in the assertions + # in the test. + sys.stderr.write('in excepthook\\n') raise RuntimeError('Error Inside') sys.excepthook = excepthook @@ -846,7 +849,7 @@ class ExcepthookTest(CoverageTest): cov_st, cov_out = self.run_command_status("coverage run test_excepthook_exit.py") py_st, py_out = self.run_command_status("python test_excepthook_exit.py") self.assertEqual(cov_st, py_st) - self.assertEqual(cov_st, 0) + self.assertEqual(cov_st, 1) self.assertIn("in excepthook", py_out) self.assertEqual(cov_out, py_out) |