gh-91348: Restore frame argument to sys._getframe audit event (GH-94928)

This commit is contained in:
Steve Dower 2022-07-17 16:11:24 +01:00 committed by GitHub
parent 5c19ddab65
commit 044a593cbb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 31 additions and 6 deletions

View file

@ -176,5 +176,17 @@ class AuditTest(unittest.TestCase):
self.assertEqual(actual, expected)
def test_sys_getframe(self):
returncode, events, stderr = self.run_python("test_sys_getframe")
if returncode:
self.fail(stderr)
if support.verbose:
print(*events, sep='\n')
actual = [(ev[0], ev[2]) for ev in events]
expected = [("sys._getframe", "test_sys_getframe")]
self.assertEqual(actual, expected)
if __name__ == "__main__":
unittest.main()