diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2017-10-09 16:52:32 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-09 16:52:32 (GMT) |
commit | 6e3d6b5dc22cd06d8c4d44a38a8a3415e4bebb16 (patch) | |
tree | 06294a65e32fc53cf8fb8c895da8e6aeaea5298c /Lib | |
parent | c0cabc23bbe474d542ff8a4f1243f4ec3cce5549 (diff) | |
download | cpython-6e3d6b5dc22cd06d8c4d44a38a8a3415e4bebb16.zip cpython-6e3d6b5dc22cd06d8c4d44a38a8a3415e4bebb16.tar.gz cpython-6e3d6b5dc22cd06d8c4d44a38a8a3415e4bebb16.tar.bz2 |
bpo-31701: faulthandler: ignore MSC and COM Windows exception (#3929)
bpo-31701: On Windows, faulthandler.enable() now ignores MSC and COM
exceptions.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_faulthandler.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Lib/test/test_faulthandler.py b/Lib/test/test_faulthandler.py index 889e641..e0e53c2 100644 --- a/Lib/test/test_faulthandler.py +++ b/Lib/test/test_faulthandler.py @@ -749,6 +749,22 @@ class FaultHandlerTests(unittest.TestCase): name) @unittest.skipUnless(MS_WINDOWS, 'specific to Windows') + def test_ignore_exception(self): + for exc_code in ( + 0xE06D7363, # MSC exception ("Emsc") + 0xE0434352, # COM Callable Runtime exception ("ECCR") + ): + code = f""" + import faulthandler + faulthandler.enable() + faulthandler._raise_exception({exc_code}) + """ + code = dedent(code) + output, exitcode = self.get_output(code) + self.assertEqual(output, []) + self.assertEqual(exitcode, exc_code) + + @unittest.skipUnless(MS_WINDOWS, 'specific to Windows') def test_raise_nonfatal_exception(self): # These exceptions are not strictly errors. Letting # faulthandler display the traceback when they are |