[Python-checkins] python/dist/src/Lib/test test_doctest.py, 1.43,
1.44 test_generators.py, 1.43, 1.44
tim_one at users.sourceforge.net
tim_one at users.sourceforge.net
Mon Sep 13 03:07:15 CEST 2004
Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19468/Lib/test
Modified Files:
test_doctest.py test_generators.py
Log Message:
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.
Index: test_doctest.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_doctest.py,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -d -r1.43 -r1.44
--- test_doctest.py 11 Sep 2004 17:33:27 -0000 1.43
+++ test_doctest.py 13 Sep 2004 01:07:12 -0000 1.44
@@ -467,8 +467,8 @@
1 some_module.SampleClass.a_staticmethod
1 some_module.SampleClass.double
1 some_module.SampleClass.get
- 1 some_module.c
- 2 some_module.d
+ 1 some_module.__test__.c
+ 2 some_module.__test__.d
1 some_module.sample_func
Duplicate Removal
Index: test_generators.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_generators.py,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -d -r1.43 -r1.44
--- test_generators.py 27 Aug 2004 15:29:59 -0000 1.43
+++ test_generators.py 13 Sep 2004 01:07:12 -0000 1.44
@@ -654,14 +654,14 @@
... 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 @@
... 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 @@
... 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 @@
... 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 @@
... 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):
More information about the Python-checkins
mailing list