summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_generators.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2006-06-04 21:56:52 (GMT)
committerGeorg Brandl <georg@python.org>2006-06-04 21:56:52 (GMT)
commitddbaa660d3b64a71b4ac9eab64b1bb944ca1276b (patch)
treeff4255db178f608511fbc29f1410241bef74a109 /Lib/test/test_generators.py
parent9f167606665c186179bf362d4227e722731cd1b9 (diff)
downloadcpython-ddbaa660d3b64a71b4ac9eab64b1bb944ca1276b.zip
cpython-ddbaa660d3b64a71b4ac9eab64b1bb944ca1276b.tar.gz
cpython-ddbaa660d3b64a71b4ac9eab64b1bb944ca1276b.tar.bz2
Patch #1346214: correctly optimize away "if 0"-style stmts
(thanks to Neal for review)
Diffstat (limited to 'Lib/test/test_generators.py')
-rw-r--r--Lib/test/test_generators.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_generators.py b/Lib/test/test_generators.py
index a60a768..a184a8b 100644
--- a/Lib/test/test_generators.py
+++ b/Lib/test/test_generators.py
@@ -733,7 +733,7 @@ syntax_tests = """
... yield 1
Traceback (most recent call last):
..
-SyntaxError: 'return' with argument inside generator (<doctest test.test_generators.__test__.syntax[0]>, line 2)
+SyntaxError: 'return' with argument inside generator (<doctest test.test_generators.__test__.syntax[0]>, line 3)
>>> def f():
... yield 1
@@ -876,9 +876,9 @@ These are fine:
... if 0:
... return 3 # but *this* sucks (line 8)
... if 0:
-... yield 2 # because it's a generator
+... yield 2 # because it's a generator (line 10)
Traceback (most recent call last):
-SyntaxError: 'return' with argument inside generator (<doctest test.test_generators.__test__.syntax[24]>, line 8)
+SyntaxError: 'return' with argument inside generator (<doctest test.test_generators.__test__.syntax[24]>, line 10)
This one caused a crash (see SF bug 567538):