scipy_doctest.plugin.DTModule¶
- class scipy_doctest.plugin.DTModule(*k, **kw)¶
This class extends the DoctestModule class provided by pytest.
DTModule is responsible for overriding the behavior of the collect method. The collect method is called by pytest to collect and generate test items for doctests in the specified module or file.
- __init__(fspath: LEGACY_PATH | None = None, path_or_parent: Path | Node | None = None, path: Path | None = None, name: str | None = None, parent: Node | None = None, config: Config | None = None, session: Session | None = None, nodeid: str | None = None) None¶
Methods
__init__([fspath, path_or_parent, path, ...])add_marker(marker[, append])Dynamically add a marker object to the node.
addfinalizer(fin)Register a function to be called without arguments when this node is finalized.
classnamefilter(name)collect()Collect children (items and collectors) for this collector.
from_parent(parent, *[, fspath, path])The public constructor.
funcnamefilter(name)get_closest_marker(name[, default])Return the first marker matching the name, from closest (for example function) to farther level (for example module level).
getmodpath([stopatmodule, includemodule])Return Python path relative to the containing module.
getparent(cls)Get the closest parent node (including self) which is an instance of the given class.
isnosetest(obj)Look for the __test__ attribute, which is applied by the @nose.tools.istest decorator.
istestclass(obj, name)istestfunction(obj, name)iter_markers([name])Iterate over all markers of the node.
iter_markers_with_node([name])Iterate over all markers of the node.
iter_parents()Iterate over all parent collectors starting from and including self up to the root of the collection tree.
listchain()Return a list of all parent collectors starting from the root of the collection tree down to and including self.
listextrakeywords()Return a set of all extra keywords in self and any parents.
listnames()reportinfo()repr_failure(excinfo)Return a representation of a collection failure.
setup()teardown()warn(warning)Issue a warning for this Node.
Attributes
configThe pytest config object.
nameA unique name within the scope of the parent node.
parentThe parent collector node.
pathFilesystem path where this node was collected from (can be None).
sessionThe pytest session this node is part of.
clsPython class object this node was collected from (can be None).
ihookfspath-sensitive hook proxy used to call pytest hooks.
instancePython instance object the function is bound to.
modulePython module object this node was collected from (can be None).
nodeidA ::-separated string denoting its collection tree address.
objUnderlying Python object.
fspathA
LEGACY_PATHcopy of thepathattribute.keywordsKeywords/markers collected from all scopes.
own_markersThe marker objects belonging to this node.
extra_keyword_matchesAllow adding of extra keywords to use for matching.
stashA place where plugins can store information on the node for their own use.