summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnthony Baxter <anthonybaxter@gmail.com>2005-03-29 12:35:54 (GMT)
committerAnthony Baxter <anthonybaxter@gmail.com>2005-03-29 12:35:54 (GMT)
commite3357548cad69a9efa6a045356c8f93c270626d6 (patch)
tree879666155120cc3091cd0ba4288e10be3d863e8d
parent92da66aad5782d5f7b9460bba6536109405d2d54 (diff)
downloadcpython-e3357548cad69a9efa6a045356c8f93c270626d6.zip
cpython-e3357548cad69a9efa6a045356c8f93c270626d6.tar.gz
cpython-e3357548cad69a9efa6a045356c8f93c270626d6.tar.bz2
backport of 1.122
SF patch 1167316: doctest.py fails self-test if run directly.
-rw-r--r--Lib/doctest.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/doctest.py b/Lib/doctest.py
index 0a13d77..f621b62 100644
--- a/Lib/doctest.py
+++ b/Lib/doctest.py
@@ -2071,24 +2071,24 @@ def set_unittest_reportflags(flags):
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
"""