summaryrefslogtreecommitdiff
path: root/Lib/test/test_generators.py
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2004-09-13 01:07:12 +0000
committerTim Peters <tim.peters@gmail.com>2004-09-13 01:07:12 +0000
commite0488e7f44fe04c5e33018ded81b32b812c95480 (patch)
treea4309b593a255c501a1612fd8575ddd1912bf755 /Lib/test/test_generators.py
parent98fc1b3931f8c512bd277c50febeee7f21c00f54 (diff)
downloadcpython-e0488e7f44fe04c5e33018ded81b32b812c95480.tar.gz
DocTestFinder._find(): for tests derived from a module __test__ global,
doctest always promised to stick "__test__" in the name. That got broken. Now it's fixed again.
Diffstat (limited to 'Lib/test/test_generators.py')
-rw-r--r--Lib/test/test_generators.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/Lib/test/test_generators.py b/Lib/test/test_generators.py
index ca6eebda89..109af73347 100644
--- a/Lib/test/test_generators.py
+++ b/Lib/test/test_generators.py
@@ -654,14 +654,14 @@ syntax_tests = """
... yield 1
Traceback (most recent call last):
..
-SyntaxError: 'return' with argument inside generator (<doctest test.test_generators.syntax[0]>, line 2)
+SyntaxError: 'return' with argument inside generator (<doctest test.test_generators.__test__.syntax[0]>, line 2)
>>> def f():
... yield 1
... return 22
Traceback (most recent call last):
..
-SyntaxError: 'return' with argument inside generator (<doctest test.test_generators.syntax[1]>, line 3)
+SyntaxError: 'return' with argument inside generator (<doctest test.test_generators.__test__.syntax[1]>, line 3)
"return None" is not the same as "return" in a generator:
@@ -670,7 +670,7 @@ SyntaxError: 'return' with argument inside generator (<doctest test.test_generat
... return None
Traceback (most recent call last):
..
-SyntaxError: 'return' with argument inside generator (<doctest test.test_generators.syntax[2]>, line 3)
+SyntaxError: 'return' with argument inside generator (<doctest test.test_generators.__test__.syntax[2]>, line 3)
This one is fine:
@@ -685,7 +685,7 @@ This one is fine:
... pass
Traceback (most recent call last):
..
-SyntaxError: 'yield' not allowed in a 'try' block with a 'finally' clause (<doctest test.test_generators.syntax[4]>, line 3)
+SyntaxError: 'yield' not allowed in a 'try' block with a 'finally' clause (<doctest test.test_generators.__test__.syntax[4]>, line 3)
>>> def f():
... try:
@@ -699,7 +699,7 @@ SyntaxError: 'yield' not allowed in a 'try' block with a 'finally' clause (<doct
... pass
Traceback (most recent call last):
...
-SyntaxError: 'yield' not allowed in a 'try' block with a 'finally' clause (<doctest test.test_generators.syntax[5]>, line 6)
+SyntaxError: 'yield' not allowed in a 'try' block with a 'finally' clause (<doctest test.test_generators.__test__.syntax[5]>, line 6)
But this is fine:
@@ -805,7 +805,7 @@ SyntaxError: invalid syntax
... if 0:
... yield 2 # because it's a generator
Traceback (most recent call last):
-SyntaxError: 'return' with argument inside generator (<doctest test.test_generators.syntax[22]>, line 8)
+SyntaxError: 'return' with argument inside generator (<doctest test.test_generators.__test__.syntax[22]>, line 8)
This one caused a crash (see SF bug 567538):