[Python-checkins] python/dist/src/Lib doctest.py,1.121,1.122
tim_one at users.sourceforge.net
tim_one at users.sourceforge.net
Tue Mar 29 01:50:58 CEST 2005
Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17578/Lib
Modified Files:
doctest.py
Log Message:
SF patch 1167316: doctest.py fails self-test if run directly.
Patch by Ilya Sandler.
Bugfix candidate.
Index: doctest.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/doctest.py,v
retrieving revision 1.121
retrieving revision 1.122
diff -u -d -r1.121 -r1.122
--- doctest.py 21 Dec 2004 23:46:24 -0000 1.121
+++ doctest.py 28 Mar 2005 23:50:54 -0000 1.122
@@ -2071,24 +2071,24 @@
The old flag is returned so that a runner could restore the old
value if it wished to:
- >>> old = _unittest_reportflags
- >>> set_unittest_reportflags(REPORT_NDIFF |
+ >>> import doctest
+ >>> old = doctest._unittest_reportflags
+ >>> doctest.set_unittest_reportflags(REPORT_NDIFF |
... REPORT_ONLY_FIRST_FAILURE) == old
True
- >>> import doctest
>>> doctest._unittest_reportflags == (REPORT_NDIFF |
... REPORT_ONLY_FIRST_FAILURE)
True
Only reporting flags can be set:
- >>> set_unittest_reportflags(ELLIPSIS)
+ >>> doctest.set_unittest_reportflags(ELLIPSIS)
Traceback (most recent call last):
...
ValueError: ('Only reporting flags allowed', 8)
- >>> set_unittest_reportflags(old) == (REPORT_NDIFF |
+ >>> doctest.set_unittest_reportflags(old) == (REPORT_NDIFF |
... REPORT_ONLY_FIRST_FAILURE)
True
"""
More information about the Python-checkins
mailing list