mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-41162: Clear audit hooks later during finalization (GH-21222)
This commit is contained in:
parent
d160e0f8e2
commit
daa0fe03a5
5 changed files with 16 additions and 45 deletions
|
@ -51,22 +51,6 @@ class AuditTest(unittest.TestCase):
|
|||
def test_block_add_hook_baseexception(self):
|
||||
self.do_test("test_block_add_hook_baseexception")
|
||||
|
||||
def test_finalize_hooks(self):
|
||||
returncode, events, stderr = self.run_python("test_finalize_hooks")
|
||||
if stderr:
|
||||
print(stderr, file=sys.stderr)
|
||||
if returncode:
|
||||
self.fail(stderr)
|
||||
|
||||
firstId = events[0][2]
|
||||
self.assertSequenceEqual(
|
||||
[
|
||||
("Created", " ", firstId),
|
||||
("cpython._PySys_ClearAuditHooks", " ", firstId),
|
||||
],
|
||||
events,
|
||||
)
|
||||
|
||||
def test_pickle(self):
|
||||
support.import_module("pickle")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue