mirror of
https://github.com/python/cpython.git
synced 2025-08-09 19:38:42 +00:00
[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:
parent
ddca26188d
commit
81d3afae1a
4 changed files with 30 additions and 0 deletions
|
@ -257,5 +257,18 @@ class AuditTest(unittest.TestCase):
|
|||
self.fail(stderr)
|
||||
|
||||
|
||||
def test_sys_monitoring_register_callback(self):
|
||||
returncode, events, stderr = self.run_python("test_sys_monitoring_register_callback")
|
||||
if returncode:
|
||||
self.fail(stderr)
|
||||
|
||||
if support.verbose:
|
||||
print(*events, sep='\n')
|
||||
actual = [(ev[0], ev[2]) for ev in events]
|
||||
expected = [("sys.monitoring.register_callback", "(None,)")]
|
||||
|
||||
self.assertEqual(actual, expected)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue