mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
GH-107774: Add missing audit event for PEP 669 (GH-107775)
This commit is contained in:
parent
39ef93edb9
commit
494e3d4436
4 changed files with 30 additions and 0 deletions
|
@ -514,6 +514,17 @@ def test_not_in_gc():
|
|||
assert hook not in o
|
||||
|
||||
|
||||
def test_sys_monitoring_register_callback():
|
||||
import sys
|
||||
|
||||
def hook(event, args):
|
||||
if event.startswith("sys.monitoring"):
|
||||
print(event, args)
|
||||
|
||||
sys.addaudithook(hook)
|
||||
sys.monitoring.register_callback(1, 1, None)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
from test.support import suppress_msvcrt_asserts
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue