summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorMariatta Wijaya <mariatta.wijaya@gmail.com>2017-02-07 04:18:39 (GMT)
committerMariatta Wijaya <mariatta.wijaya@gmail.com>2017-02-07 04:18:39 (GMT)
commit743376f45e7428dfd002b065afb822ff467657b0 (patch)
tree3965aa218a10b204e0a94f0f2dce65626ad110b1 /Doc
parent18d2c934e393af9cfe2d11581a035790e414e28e (diff)
parente39262ccc35ffd850595982ef9614634d02688da (diff)
downloadcpython-743376f45e7428dfd002b065afb822ff467657b0.zip
cpython-743376f45e7428dfd002b065afb822ff467657b0.tar.gz
cpython-743376f45e7428dfd002b065afb822ff467657b0.tar.bz2
Issue #29371: merge with 3.6
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/doctest.rst24
1 files changed, 13 insertions, 11 deletions
diff --git a/Doc/library/doctest.rst b/Doc/library/doctest.rst
index 131206d..15b12f7 100644
--- a/Doc/library/doctest.rst
+++ b/Doc/library/doctest.rst
@@ -510,9 +510,9 @@ Option Flags
A number of option flags control various aspects of doctest's behavior.
Symbolic names for the flags are supplied as module constants, which can be
-or'ed together and passed to various functions. The names can also be used in
-:ref:`doctest directives <doctest-directives>`, and may be passed to the
-doctest command line interface via the ``-o`` option.
+:ref:`bitwise ORed <bitwise>` together and passed to various functions.
+The names can also be used in :ref:`doctest directives <doctest-directives>`,
+and may be passed to the doctest command line interface via the ``-o`` option.
.. versionadded:: 3.4
The ``-o`` command line option.
@@ -877,8 +877,9 @@ and :ref:`doctest-simple-testfile`.
nothing at the end. In verbose mode, the summary is detailed, else the summary
is very brief (in fact, empty if all tests passed).
- Optional argument *optionflags* (default value 0) takes the bitwise-or of
- option flags. See section :ref:`doctest-options`.
+ Optional argument *optionflags* (default value 0) takes the
+ :ref:`bitwise OR <bitwise>` of option flags.
+ See section :ref:`doctest-options`.
Optional argument *raise_on_error* defaults to false. If true, an exception is
raised upon the first failure or unexpected exception in an example. This
@@ -1098,18 +1099,19 @@ reporting flags specific to :mod:`unittest` support, via this function:
Set the :mod:`doctest` reporting flags to use.
- Argument *flags* takes the bitwise-or of option flags. See section
- :ref:`doctest-options`. Only "reporting flags" can be used.
+ Argument *flags* takes the :ref:`bitwise OR <bitwise>` of option flags. See
+ section :ref:`doctest-options`. Only "reporting flags" can be used.
This is a module-global setting, and affects all future doctests run by module
:mod:`unittest`: the :meth:`runTest` method of :class:`DocTestCase` looks at
the option flags specified for the test case when the :class:`DocTestCase`
instance was constructed. If no reporting flags were specified (which is the
typical and expected case), :mod:`doctest`'s :mod:`unittest` reporting flags are
- or'ed into the option flags, and the option flags so augmented are passed to the
- :class:`DocTestRunner` instance created to run the doctest. If any reporting
- flags were specified when the :class:`DocTestCase` instance was constructed,
- :mod:`doctest`'s :mod:`unittest` reporting flags are ignored.
+ :ref:`bitwise ORed <bitwise>` into the option flags, and the option flags
+ so augmented are passed to the :class:`DocTestRunner` instance created to
+ run the doctest. If any reporting flags were specified when the
+ :class:`DocTestCase` instance was constructed, :mod:`doctest`'s
+ :mod:`unittest` reporting flags are ignored.
The value of the :mod:`unittest` reporting flags in effect before the function
was called is returned by the function.