[Python-checkins] python/dist/src/Lib/test test_doctest.py, 1.24,
1.25
tim_one at users.sourceforge.net
tim_one at users.sourceforge.net
Sun Aug 22 03:47:54 CEST 2004
- Previous message: [Python-checkins] python/dist/src/Lib doctest.py,1.72,1.73
- Next message: [Python-checkins] python/dist/src/Lib/idlelib Debugger.py, 1.21,
1.22 EditorWindow.py, 1.61, 1.62 FileList.py, 1.7,
1.8 NEWS.txt, 1.39, 1.40 PyShell.py, 1.90, 1.91 WindowList.py,
1.5, 1.6 idlever.py, 1.17, 1.18
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24857/Lib/test
Modified Files:
test_doctest.py
Log Message:
_ellipsis_match(): Removed special-casing of "...\n". The semantics
are non-obvious either way because the newline character "is invisible",
but it's still there all the same, and it's easier to explain/predict
if that reality is left alone.
Index: test_doctest.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_doctest.py,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- test_doctest.py 19 Aug 2004 16:38:57 -0000 1.24
+++ test_doctest.py 22 Aug 2004 01:47:51 -0000 1.25
@@ -785,40 +785,17 @@
>>> doctest.DocTestRunner(verbose=False, optionflags=flags).run(test)
(0, 1)
- ... should also match nothing gracefully (note that a regular-expression
- implementation of ELLIPSIS would take a loooong time to match this one!):
+ ... also matches nothing:
>>> for i in range(100):
- ... print i**2 #doctest: +ELLIPSIS
- 0
- ...
- 1
- ...
- ......
- ...
- 36
- ...
- ...
- ...
- 49
- 64
- .........
- 9801
- ...
+ ... print i**2, #doctest: +ELLIPSIS
+ 0 1...4...9 16 ... 36 49 64 ... 9801
... can be surprising; e.g., this test passes:
>>> for i in range(21): #doctest: +ELLIPSIS
- ... print i
- 0
- 1
- 2
- ...
- 1
- ...
- 2
- ...
- 0
+ ... print i,
+ 0 1 2 ...1...2...0
Examples from the docs:
- Previous message: [Python-checkins] python/dist/src/Lib doctest.py,1.72,1.73
- Next message: [Python-checkins] python/dist/src/Lib/idlelib Debugger.py, 1.21,
1.22 EditorWindow.py, 1.61, 1.62 FileList.py, 1.7,
1.8 NEWS.txt, 1.39, 1.40 PyShell.py, 1.90, 1.91 WindowList.py,
1.5, 1.6 idlever.py, 1.17, 1.18
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Python-checkins
mailing list