diff options
author | Nick Coghlan <ncoghlan@gmail.com> | 2010-06-12 13:45:37 (GMT) |
---|---|---|
committer | Nick Coghlan <ncoghlan@gmail.com> | 2010-06-12 13:45:37 (GMT) |
commit | 10f08f9599f3ff48c1ad1b0b10cabf722ba8eb5a (patch) | |
tree | c7355e4e40f5f3b9879f22da8f823d0f77820a8b | |
parent | f084aed3b004f04324e5faf34c90a1856018831f (diff) | |
download | cpython-10f08f9599f3ff48c1ad1b0b10cabf722ba8eb5a.zip cpython-10f08f9599f3ff48c1ad1b0b10cabf722ba8eb5a.tar.gz cpython-10f08f9599f3ff48c1ad1b0b10cabf722ba8eb5a.tar.bz2 |
Backport a fix from Py3k for a potentially misleading example
-rw-r--r-- | Doc/library/doctest.rst | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/library/doctest.rst b/Doc/library/doctest.rst index edf4a70..d587c75 100644 --- a/Doc/library/doctest.rst +++ b/Doc/library/doctest.rst @@ -576,13 +576,13 @@ doctest decides whether actual output matches an example's expected output: both these variations will work regardless of whether the test is run under Python 2.7 or Python 3.2 (or later versions): - >>> raise ValueError('message') #doctest: +IGNORE_EXCEPTION_DETAIL + >>> raise CustomError('message') #doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): - ValueError: message + CustomError: message - >>> raise ValueError('message') #doctest: +IGNORE_EXCEPTION_DETAIL + >>> raise CustomError('message') #doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): - builtin.ValueError: message + my_module.CustomError: message Note that :const:`ELLIPSIS` can also be used to ignore the details of the exception message, but such a test may still fail based |