Kaydet (Commit) 3fa8c590 authored tarafından Chris Jerdonek's avatar Chris Jerdonek

Issue #12947: Remove doctest directives from the doctest examples in the "Option Flag" section.

The doctest examples that illustrate the use of doctest option flags
independent of doctest directives should not display doctest directives.
üst 23a87de9
...@@ -552,11 +552,11 @@ doctest decides whether actual output matches an example's expected output: ...@@ -552,11 +552,11 @@ doctest decides whether actual output matches an example's expected output:
both of these variations will work with the flag specified, regardless of 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):: 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): Traceback (most recent call last):
CustomError: message CustomError: message
>>> raise CustomError('message') #doctest: +IGNORE_EXCEPTION_DETAIL >>> raise CustomError('message')
Traceback (most recent call last): Traceback (most recent call last):
my_module.CustomError: message my_module.CustomError: message
...@@ -569,7 +569,7 @@ doctest decides whether actual output matches an example's expected output: ...@@ -569,7 +569,7 @@ doctest decides whether actual output matches an example's expected output:
earlier (those releases do not support :ref:`doctest directives earlier (those releases do not support :ref:`doctest directives
<doctest-directives>` and ignore them as irrelevant comments). For example:: <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): Traceback (most recent call last):
File "<stdin>", line 1, in ? File "<stdin>", line 1, in ?
TypeError: object doesn't support item assignment TypeError: object doesn't support item assignment
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment