summaryrefslogtreecommitdiff
path: root/Lib/test
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_compile.py4
-rw-r--r--Lib/test/test_generators.py2
-rw-r--r--Lib/test/test_sys.py4
3 files changed, 5 insertions, 5 deletions
diff --git a/Lib/test/test_compile.py b/Lib/test/test_compile.py
index e237156c75..f007aec9d3 100644
--- a/Lib/test/test_compile.py
+++ b/Lib/test/test_compile.py
@@ -954,7 +954,7 @@ if 1:
x
in
y)
- genexp_lines = [None, 1, 3, 1]
+ genexp_lines = [1, 3, 1]
genexp_code = return_genexp.__code__.co_consts[1]
code_lines = [ None if line is None else line-return_genexp.__code__.co_firstlineno
@@ -967,7 +967,7 @@ if 1:
async for i in aseq:
body
- expected_lines = [None, 0, 1, 2, 1]
+ expected_lines = [0, 1, 2, 1]
code_lines = [ None if line is None else line-test.__code__.co_firstlineno
for (_, _, line) in test.__code__.co_lines() ]
self.assertEqual(expected_lines, code_lines)
diff --git a/Lib/test/test_generators.py b/Lib/test/test_generators.py
index 4f4fd9c5aa..87a7dd69d1 100644
--- a/Lib/test/test_generators.py
+++ b/Lib/test/test_generators.py
@@ -897,7 +897,7 @@ From the Iterators list, about the types of these things.
>>> type(i)
<class 'generator'>
>>> [s for s in dir(i) if not s.startswith('_')]
-['close', 'gi_code', 'gi_frame', 'gi_running', 'gi_yieldfrom', 'send', 'throw']
+['close', 'gi_code', 'gi_frame', 'gi_running', 'gi_suspended', 'gi_yieldfrom', 'send', 'throw']
>>> from test.support import HAVE_DOCSTRINGS
>>> print(i.__next__.__doc__ if HAVE_DOCSTRINGS else 'Implement next(self).')
Implement next(self).
diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py
index 2c8c6ab6ce..accd35e4ab 100644
--- a/Lib/test/test_sys.py
+++ b/Lib/test/test_sys.py
@@ -1386,7 +1386,7 @@ class SizeofTest(unittest.TestCase):
def func():
return sys._getframe()
x = func()
- check(x, size('3Pi3c8P2ic?P'))
+ check(x, size('3Pi3c7P2ic??P'))
# function
def func(): pass
check(func, size('14Pi'))
@@ -1403,7 +1403,7 @@ class SizeofTest(unittest.TestCase):
check(bar, size('PP'))
# generator
def get_gen(): yield 1
- check(get_gen(), size('P2P4P4c8P2ic?P'))
+ check(get_gen(), size('P2P4P4c7P2ic??P'))
# iterator
check(iter('abc'), size('lP'))
# callable-iterator