diff options
author | Mark Shannon <mark@hotpy.org> | 2023-02-23 10:19:01 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-23 10:19:01 (GMT) |
commit | 22b8d77b98a5944e688be0927b8139c49d4a7257 (patch) | |
tree | c3693ee3bc939140e9ad885677d58cab59673993 /Lib | |
parent | 572223f9ce99e8816abdcc1536db6c4ceed2d848 (diff) | |
download | cpython-22b8d77b98a5944e688be0927b8139c49d4a7257.zip cpython-22b8d77b98a5944e688be0927b8139c49d4a7257.tar.gz cpython-22b8d77b98a5944e688be0927b8139c49d4a7257.tar.bz2 |
GH-100719: Remove redundant `gi_code` field from generator object. (GH-100749)
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_capi/test_misc.py | 5 | ||||
-rw-r--r-- | Lib/test/test_sys.py | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/Lib/test/test_capi/test_misc.py b/Lib/test/test_capi/test_misc.py index ad099c6..f4569fb 100644 --- a/Lib/test/test_capi/test_misc.py +++ b/Lib/test/test_capi/test_misc.py @@ -1213,6 +1213,11 @@ class TestPendingCalls(unittest.TestCase): self.pendingcalls_submit(l, n) self.pendingcalls_wait(l, n) + def test_gen_get_code(self): + def genf(): yield + gen = genf() + self.assertEqual(_testcapi.gen_get_code(gen), gen.gi_code) + class SubinterpreterTest(unittest.TestCase): diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py index ab1a065..58aa9d1 100644 --- a/Lib/test/test_sys.py +++ b/Lib/test/test_sys.py @@ -1460,7 +1460,7 @@ class SizeofTest(unittest.TestCase): check(bar, size('PP')) # generator def get_gen(): yield 1 - check(get_gen(), size('P2P4P4c7P2ic??2P')) + check(get_gen(), size('PP4P4c7P2ic??2P')) # iterator check(iter('abc'), size('lP')) # callable-iterator |