MCPcopy Index your code
hub / github.com/python/cpython / test_ignore_exception

Method test_ignore_exception

Lib/test/test_faulthandler.py:868–881  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

866
867 @unittest.skipUnless(MS_WINDOWS, 'specific to Windows')
868 def test_ignore_exception(self):
869 for exc_code in (
870 0xE06D7363, # MSC exception ("Emsc")
871 0xE0434352, # COM Callable Runtime exception ("ECCR")
872 ):
873 code = f"""
874 import faulthandler
875 faulthandler.enable()
876 faulthandler._raise_exception({exc_code})
877 """
878 code = dedent(code)
879 output, exitcode = self.get_output(code)
880 self.assertEqual(output, [])
881 self.assertEqual(exitcode, exc_code)
882
883 @unittest.skipUnless(MS_WINDOWS, 'specific to Windows')
884 def test_raise_nonfatal_exception(self):

Callers

nothing calls this directly

Calls 3

get_outputMethod · 0.95
dedentFunction · 0.90
assertEqualMethod · 0.45

Tested by

no test coverage detected