diff options
author | Tim Peters <tim.peters@gmail.com> | 2005-03-28 23:50:54 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2005-03-28 23:50:54 (GMT) |
commit | b7e99b642f75ce2b4f31af26b693feda00c9da7c (patch) | |
tree | 1318c794a7bb917c5646a5dad61735cd7381a792 | |
parent | 7026a0aeef15b678522f0f5cb045a086cdb41e6f (diff) | |
download | cpython-b7e99b642f75ce2b4f31af26b693feda00c9da7c.zip cpython-b7e99b642f75ce2b4f31af26b693feda00c9da7c.tar.gz cpython-b7e99b642f75ce2b4f31af26b693feda00c9da7c.tar.bz2 |
SF patch 1167316: doctest.py fails self-test if run directly.
Patch by Ilya Sandler.
Bugfix candidate.
-rw-r--r-- | Lib/doctest.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/doctest.py b/Lib/doctest.py index 2708fc7..e3d4d79 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 """ |