scipy_doctest.impl.DTFinder¶
- class scipy_doctest.impl.DTFinder(verbose=None, parser=None, recurse=True, exclude_empty=True, config=None)¶
A drop-in replacement for
doctest.DocTestFinderwith helpful defaults.Parameters:¶
- verbosebool, optional
If
True, enables verbose output during doctest discovery.- parserdoctest.DocTestParser, optional
A custom parser for extracting doctests; defaults to
DTParser(config).- recursebool, default=True
Whether to recursively search for doctests in nested objects.
- exclude_emptybool, default=True
Whether to exclude objects that have no doctests.
- configDTConfig, optional
A configuration object controlling doctest behavior; a default instance is used if not provided.
- __init__(verbose=None, parser=None, recurse=True, exclude_empty=True, config=None)¶
Create a new doctest finder.
The optional argument
parserspecifies a class or function that should be used to create new DocTest objects (or objects that implement the same interface as DocTest). The signature for this factory function should match the signature of the DocTest constructor.If the optional argument
recurseis false, thenfindwill only examine the given object, and not any contained objects.If the optional argument
exclude_emptyis false, thenfindwill include tests for objects with empty docstrings.
Methods
__init__([verbose, parser, recurse, ...])Create a new doctest finder.
find(obj[, name, module, globs, extraglobs])Return a list of the DocTests that are defined by the given object's docstring, or by any of its contained objects' docstrings.