(self)
| 194 | self.assertEndsWith(err, "SyntaxError: msg\n") |
| 195 | |
| 196 | def test_excepthook(self): |
| 197 | with test.support.captured_output("stderr") as stderr: |
| 198 | with test.support.catch_unraisable_exception(): |
| 199 | sys.excepthook(1, '1', 1) |
| 200 | self.assertTrue("TypeError: print_exception(): Exception expected for " \ |
| 201 | "value, str found" in stderr.getvalue()) |
| 202 | |
| 203 | # FIXME: testing the code for a lost or replaced excepthook in |
| 204 | # Python/pythonrun.c::PyErr_PrintEx() is tricky. |
nothing calls this directly
no test coverage detected