On this page
  1. doctest.register_optionflag
  2. Import
  3. Signature & Overview
  4. Usage
  5. Gotchas
  6. REPL Inspect

doctest.register_optionflag

Prev: doctest.OutputChecker | Up: doctest | Next: doctest.run_docstring_examples
Rel: doctest.debug, doctest.debug_src, doctest.DebugRunner, doctest.DocFileSuite
Ref: docs.python.org — doctest.register_optionflag
Tags: #public #python3 #stdlib #doctest


Import

import doctest
from doctest import register_optionflag

Signature & Overview

doctest.register_optionflag(name)

doctest.register_optionflag() function.

Usage

import doctest

flag = doctest.register_optionflag("DEMO_CUSTOM_FLAG")
assert isinstance(flag, int) and flag > 0

Gotchas

REPL Inspect

from doctest import register_optionflag
help(register_optionflag)

Linked from

Related notes