summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_capi/test_misc.py5
-rw-r--r--Lib/test/test_sys.py2
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