bpo-45786: Allocate space for frame in frame object. (GH-29729)

This commit is contained in:
Mark Shannon 2021-11-29 12:34:59 +00:00 committed by GitHub
parent 7431448b81
commit 60929576e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 76 additions and 181 deletions

View file

@ -1320,9 +1320,10 @@ class SizeofTest(unittest.TestCase):
# sys.floatinfo
check(sys.float_info, vsize('') + self.P * len(sys.float_info))
# frame
import inspect
x = inspect.currentframe()
check(x, size('3Pi3c'))
def func():
return sys._getframe()
x = func()
check(x, size('3Pi3c8P2iciP'))
# function
def func(): pass
check(func, size('14Pi'))