scipy_doctest.impl.DTChecker¶
- class scipy_doctest.impl.DTChecker(config=None)¶
A drop-in replacement for
doctest.OutputChecker
.Allows robust output comparison for numerical values and special cases involving NumPy arrays, masked arrays, namedtuples, and object memory addresses. It is configurable via a
DTConfig
object.Parameters:¶
- configDTConfig, optional
Configuration object that controls various aspects of output checking. If not provided, a default
DTConfig
instance is used.
- __init__(config=None)¶
Methods
__init__
([config])check_output
(want, got, optionflags)Return True iff the actual output from an example (
got
) matches the expected output (want
).output_difference
(example, got, optionflags)Return a string describing the differences between the expected output for a given example (
example
) and the actual output (got
).Attributes
obj_pattern
vanilla