[Patches] [ python-Patches-1167316 ] a fix for doctest crash when
it is ran on itself
SourceForge.net
noreply at sourceforge.net
Tue Mar 29 01:52:06 CEST 2005
Patches item #1167316, was opened at 2005-03-21 01:05
Message generated for change (Comment added) made by tim_one
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1167316&group_id=5470
Category: Library (Lib)
Group: Python 2.5
>Status: Closed
>Resolution: Accepted
Priority: 5
Submitted By: Ilya Sandler (isandler)
>Assigned to: Tim Peters (tim_one)
Summary: a fix for doctest crash when it is ran on itself
Initial Comment:
When doctest.py is ran without arguments, it runs its
own docs
through itself and crashes with:
bagira:~/python/dist/src/Lib> ../python doctest1.121.py
...............F
======================================================================
FAIL: Doctest: __main__.set_unittest_reportflags
----------------------------------------------------------------------
Traceback (most recent call last):
File "doctest1.121.py", line 2152, in runTest
raise
self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for
__main__.set_unittest_reportflags
File "doctest1.121.py", line 2068, in
set_unittest_reportflags
----------------------------------------------------------------------
File "doctest1.121.py", line 2080, in
__main__.set_unittest_reportflags
Failed example:
doctest._unittest_reportflags == (REPORT_NDIFF |
REPORT_ONLY_FIRST_FAILURE)
Expected:
True
Got:
False
----------------------------------------------------------------------
Ran 16 tests in 0.080s
FAILED (failures=1)
----------------------------------------------------------------------
The attached patch fixes the problem...
----------------------------------------------------------------------
>Comment By: Tim Peters (tim_one)
Date: 2005-03-28 18:52
Message:
Logged In: YES
user_id=31435
Thanks! Patch applied, Lib/doctest.py rev 1.122
----------------------------------------------------------------------
Comment By: Michiel de Hoon (mdehoon)
Date: 2005-03-27 01:03
Message:
Logged In: YES
user_id=488897
I tested this patch and found that it works OK. I'll write
to python-dev in support of this patch.
--Michiel.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1167316&group_id=5470
More information about the Patches
mailing list