The other directives

There are a number of other directives that can be issued to doctest, should you find the need. They're not as broadly useful as the ones already mentioned, but the time might come when you require one or more of them.

Note

The full documentation for all of the doctest directives can be found at http://docs.python.org/3/library/doctest.html#doctest-options.

The remaining directives of doctest in the Python 3.4 version are as follows:

  • DONT_ACCEPT_TRUE_FOR_1: This makes doctest differentiate between boolean values and numbers
  • DONT_ACCEPT_BLANKLINE: This removes support for the <BLANKLINE> feature
  • IGNORE_EXCEPTION_DETAIL: This makes doctest only care that an exception is of the expected type

Strictly speaking, doctest supports several other options that can be set using the directive syntax, but they don't make any sense as directives, so we'll ignore them here.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.223.170.223