summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2012-07-26 20:23:23 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2012-07-26 20:23:23 (GMT)
commit3bbd2fad4d4a282c7a5a3169a4f497b97aeff319 (patch)
tree4143a1da2f202770afa096a4ca3f5c4306a1ac2c /Lib/test
parentd0118e16a14b09dcc43e35bfd57bdb3a11c7f926 (diff)
downloadcpython-3bbd2fad4d4a282c7a5a3169a4f497b97aeff319.zip
cpython-3bbd2fad4d4a282c7a5a3169a4f497b97aeff319.tar.gz
cpython-3bbd2fad4d4a282c7a5a3169a4f497b97aeff319.tar.bz2
Issue #15456: Fix code __sizeof__ after #12399 change.
Patch by Serhiy Storchaka.
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_sys.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py
index 9a6dd5b..b04df14 100644
--- a/Lib/test/test_sys.py
+++ b/Lib/test/test_sys.py
@@ -702,6 +702,12 @@ class SizeofTest(unittest.TestCase):
check(get_cell().__closure__[0], size(h + 'P'))
# code
check(get_cell().__code__, size(h + '5i9Pi3P'))
+ check(get_cell.__code__, size(h + '5i9Pi3P'))
+ def get_cell2(x):
+ def inner():
+ return x
+ return inner
+ check(get_cell2.__code__, size(h + '5i9Pi3P') + 1)
# complex
check(complex(0,1), size(h + '2d'))
# method_descriptor (descriptor object)