Python stdlib module — doctest. Auto-indexed from CDN. Method-level security roles have not been annotated; rule writers should inspect the source before use.
.DocFileSuite()NeutralDocFileSuite(paths, kw)
A unittest suite for one or more doctest files.
.DocFileTest()NeutralDocFileTest(path, module_relative, package, globs, parser, encoding, options)
DocFileTest function.
.DocTestSuite()NeutralDocTestSuite(module, globs, extraglobs, test_finder, options)
Convert doctest tests for a module to a unittest test suite.
.debug_script()Neutraldebug_script(src, pm, globs)
Debug a test script. `src` is the script, as a string.
.debug_src()Neutraldebug_src(src, pm, globs)
Debug a single doctest docstring, in argument `src`'
.namedtuple()Neutralnamedtuple(typename, field_names, rename, defaults, module)
Returns a new subclass of tuple with named fields.
.run_docstring_examples()Neutralrun_docstring_examples(f, globs, verbose, name, compileflags, optionflags)
Test examples in the given object's docstring (`f`), using `globs`
.script_from_examples()Neutralscript_from_examples(s)
Extract script from text with examples.
| FQN | Field | |
|---|---|---|
| doctest | fqns[0] |
Wrong FQN → 0 findings. Verify with: change fqns to garbage → must produce 0 results.
import doctest