aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/audit-tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/audit-tests.py')
-rw-r--r--Lib/test/audit-tests.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/Lib/test/audit-tests.py b/Lib/test/audit-tests.py
index ccec9fedc44..00333cc9036 100644
--- a/Lib/test/audit-tests.py
+++ b/Lib/test/audit-tests.py
@@ -408,6 +408,17 @@ def test_sqlite3():
raise RuntimeError("Expected sqlite3.load_extension to fail")
+def test_sys_getframe():
+ import sys
+
+ def hook(event, args):
+ if event.startswith("sys."):
+ print(event, args[0].f_code.co_name)
+
+ sys.addaudithook(hook)
+ sys._getframe()
+
+
if __name__ == "__main__":
from test.support import suppress_msvcrt_asserts