diff options
| author | Ned Batchelder <ned@nedbatchelder.com> | 2015-06-03 07:22:39 -0400 |
|---|---|---|
| committer | Ned Batchelder <ned@nedbatchelder.com> | 2015-06-03 07:22:39 -0400 |
| commit | 609f0615c055837dece6446a4e58926a92591f02 (patch) | |
| tree | 0e7969880f3237932c0c524f4d206350c4b4917a /tests/test_plugins.py | |
| parent | df33034216a178e4ba210aaa56068245d06f291f (diff) | |
| download | python-coveragepy-609f0615c055837dece6446a4e58926a92591f02.tar.gz | |
Make sure not to call functions with an error set.
Python 3.5 is stricter about getting this right. So we have to call PyErr_Print
to print and clear the error before calling the warn function.
Diffstat (limited to 'tests/test_plugins.py')
| -rw-r--r-- | tests/test_plugins.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/test_plugins.py b/tests/test_plugins.py index 69e7b42..18edf66 100644 --- a/tests/test_plugins.py +++ b/tests/test_plugins.py @@ -481,7 +481,11 @@ class BadPluginTest(FileTracerTest): self.assertEqual(errors, 1) # There should be a warning explaining what's happening, but only one. - msg = "Disabling plugin %r due to an exception:" % plugin_name + # The message can be in two forms: + # Disabling plugin '...' due to previous exception + # or: + # Disabling plugin '...' due to an excepton: + msg = "Disabling plugin %r due to " % plugin_name warnings = stderr.count(msg) self.assertEqual(warnings, 1) |
