On this page
doctest.set_unittest_reportflags
Prev: doctest.script_from_examples | Up: doctest | Next: doctest.testfile
Rel: doctest.debug, doctest.debug_src, doctest.DebugRunner, doctest.DocFileSuite
Ref: docs.python.org — doctest.set_unittest_reportflags
Tags: #public #python3 #stdlib #doctest
Import
import doctest
from doctest import set_unittest_reportflags
Signature & Overview
doctest.set_unittest_reportflags(flags)
Sets the unittest option flags.
Usage
import doctest
old = doctest.set_unittest_reportflags(doctest.REPORT_UDIFF)
try:
assert isinstance(old, int)
finally:
doctest.set_unittest_reportflags(old)
Gotchas
- Only accepts
REPORT_*flags: Passing non-report flags likeELLIPSISraisesValueError.
REPL Inspect
from doctest import set_unittest_reportflags
help(set_unittest_reportflags)
Linked from
Related notes
- tuts/python3/stdlib_module/doctest/script_from_examples Linked here; links to this page; shared tags: #doctest, #stdlib
- tuts/python3/stdlib_module/doctest/testfile Linked here; links to this page; shared tags: #doctest, #stdlib
- tuts/python3/stdlib_module/doctest/debug Linked here; shared tags: #doctest, #stdlib
- tuts/python3/stdlib_module/doctest/debug_src Linked here; shared tags: #doctest, #stdlib
- tuts/python3/stdlib_module/doctest/DebugRunner Linked here; shared tags: #doctest, #stdlib
- tuts/python3/stdlib_module/doctest/DocFileSuite Linked here; shared tags: #doctest, #stdlib
- tuts/python3/stdlib_module/doctest/DocTest Linked here; shared tags: #doctest, #stdlib
- tuts/python3/stdlib_module/doctest links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/doctest/DocTestFailure shared tags: #doctest, #stdlib
- tuts/python3/stdlib_module/doctest/DocTestFinder shared tags: #doctest, #stdlib