This is a pre-release version (2.5.0.dev0+git20251130.2de293a). Go to latest (2.4.4)
{ } Raw JSON

bundles / numpy 2.5.0.dev0+git20251130.2de293a / numpy / testing / _private / utils / rundocs

function

numpy.testing._private.utils:rundocs

source: build-install/usr/lib/python3.14/site-packages/numpy/testing/_private/utils.py :1420

Signature

def   rundocs ( filename = None raise_on_error = True )

Summary

Run doctests found in the given file.

Extended Summary

By default rundocs raises an AssertionError on failure.

Parameters

filename : str

The path to the file for which the doctests are run.

raise_on_error : bool

Whether to raise an AssertionError when a doctest fails. Default is True.

Notes

The doctests can be run by the user/developer by adding the doctests argument to the test() call. For example, to run all tests (including doctests) for numpy.lib:

>>> np.lib.test(doctests=True)  # doctest: +SKIP

Aliases

  • numpy.testing.rundocs