class PytestTester:
Pytest test runner.
A test function is typically added to a package's __init__.py like so:
from numpy._pytesttester import PytestTester test = PytestTester(__name__).test del PytestTester
Calling this test function finds and runs all tests associated with the module and all its sub-modules.
Unlike the previous nose-based implementation, this class is not publicly exposed as it performs some numpy-specific warning suppression.
Method | __call__ |
Run tests for module using pytest. |
Method | __init__ |
Undocumented |
Instance Variable | module_name |
Undocumented |
Run tests for module using pytest.
pytest.mark.slow
are skipped, when 'full', the slow marker
is ignored.Note
Not supported
timer
tests. Default is -1.Each NumPy module exposes test
in its namespace to run all tests for
it. For example, to run all tests for numpy.lib:
>>> np.lib.test() #doctest: +SKIP
>>> result = np.lib.test() #doctest: +SKIP ... 1023 passed, 2 skipped, 6 deselected, 1 xfailed in 10.39 seconds >>> result True