[3.12] GH-107774: Add missing audit event for PEP 669 (GH-107775) (#107839)

GH-107774: Add missing audit event for PEP 669 (GH-107775)
(cherry picked from commit 494e3d4436)

Co-authored-by: Mark Shannon <mark@hotpy.org>
This commit is contained in:
Miss Islington (bot) 2023-08-11 02:58:58 -07:00 committed by GitHub
parent ddca26188d
commit 81d3afae1a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 30 additions and 0 deletions

View file

@ -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