mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
gh-91348: Restore frame argument to sys._getframe audit event (GH-94928)
This commit is contained in:
parent
5c19ddab65
commit
044a593cbb
4 changed files with 31 additions and 6 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue