[Python-checkins] r54025 - python/branches/p3yk_no_args_on_exc/Lib/doctest.py
brett.cannon
python-checkins at python.org
Wed Feb 28 19:26:32 CET 2007
Author: brett.cannon
Date: Wed Feb 28 19:26:32 2007
New Revision: 54025
Modified:
python/branches/p3yk_no_args_on_exc/Lib/doctest.py
Log:
Fix for removal of 'args' from exceptions.
Modified: python/branches/p3yk_no_args_on_exc/Lib/doctest.py
==============================================================================
--- python/branches/p3yk_no_args_on_exc/Lib/doctest.py (original)
+++ python/branches/p3yk_no_args_on_exc/Lib/doctest.py Wed Feb 28 19:26:32 2007
@@ -1611,7 +1611,7 @@
>>> raise exc_info[0], exc_info[1], exc_info[2]
Traceback (most recent call last):
...
- KeyError
+ KeyError: ''
We wrap the original exception to give the calling application
access to the test and example information.
@@ -2050,7 +2050,7 @@
global _unittest_reportflags
if (flags & REPORTING_FLAGS) != flags:
- raise ValueError("Only reporting flags allowed", flags)
+ raise ValueError(("Only reporting flags allowed", flags))
old = _unittest_reportflags
_unittest_reportflags = flags
return old
@@ -2151,7 +2151,7 @@
>>> raise exc_info[0], exc_info[1], exc_info[2]
Traceback (most recent call last):
...
- KeyError
+ KeyError: ''
If the output doesn't match, then a DocTestFailure is raised:
More information about the Python-checkins
mailing list