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

Method test_unraisablehook

Lib/test/test_audit.py:100–110  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

98 )
99
100 def test_unraisablehook(self):
101 import_helper.import_module("_testcapi")
102 returncode, events, stderr = self.run_python("test_unraisablehook")
103 if returncode:
104 self.fail(stderr)
105
106 self.assertEqual(events[0][0], "sys.unraisablehook")
107 self.assertEqual(
108 events[0][2],
109 "RuntimeError('nonfatal-error') Exception ignored for audit hook test",
110 )
111
112 def test_winreg(self):
113 import_helper.import_module("winreg")

Callers

nothing calls this directly

Calls 4

run_pythonMethod · 0.95
import_moduleMethod · 0.45
failMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected