changeset: 79649:8704f9e7ad7c branch: 2.7 parent: 79646:328ed76d98a5 user: Chris Jerdonek date: Wed Oct 10 08:39:34 2012 -0700 files: Doc/library/doctest.rst description: Issue #12947: Backport doctest documentation change from 3.3. diff -r 328ed76d98a5 -r 8704f9e7ad7c Doc/library/doctest.rst --- a/Doc/library/doctest.rst Wed Oct 10 16:56:15 2012 +0200 +++ b/Doc/library/doctest.rst Wed Oct 10 08:39:34 2012 -0700 @@ -580,11 +580,11 @@ both of these variations will work with the flag specified, regardless of whether the test is run under Python 2.7 or Python 3.2 (or later versions):: ->>> raise CustomError('message') #doctest: +IGNORE_EXCEPTION_DETAIL +>>> raise CustomError('message') Traceback (most recent call last): CustomError: message ->>> raise CustomError('message') #doctest: +IGNORE_EXCEPTION_DETAIL +>>> raise CustomError('message') Traceback (most recent call last): my_module.CustomError: message @@ -597,7 +597,7 @@ earlier (those releases do not support :ref:`doctest directives ` and ignore them as irrelevant comments). For example:: ->>> (1, 2)[3] = 'moo' #doctest: +IGNORE_EXCEPTION_DETAIL +>>> (1, 2)[3] = 'moo' Traceback (most recent call last): File "", line 1, in ? TypeError: object doesn't support item assignment

AltStyle によって変換されたページ (->オリジナル) /