doctest.set_unittest_reportflags()

doctest.set_unittest_reportflags(flags)

Set the doctest reporting flags to use.

Argument flags takes the bitwise-or of option flags. See section Option Flags. Only “reporting flags” can be used.

This is a module-global setting, and affects all future doctests run by module unittest: the runTest() method of DocTestCase looks at the option flags specified for the test case when the DocTestCase instance was constructed. If no reporting flags were specified (which is the typical and expected case), doctest‘s unittest reporting flags are or’ed into the option flags, and the option flags so augmented are passed to the DocTestRunner instance created to run the doctest. If any reporting flags were specified when the DocTestCase instance was constructed, doctest‘s unittest reporting flags are ignored.

The value of the unittest reporting flags in effect before the function was called is returned by the function.

doc_python
2016-10-07 17:32:14
Comments
Leave a Comment

Please login to continue.