On this page
numpy.testing.rundocs
testing.rundocs(filename=None, raise_on_error=True)[source]- 
    
Run doctests found in the given file.
By default
rundocsraises an AssertionError on failure.- Parameters
 - 
      
filenamestr- 
        
The path to the file for which the doctests are run.
 raise_on_errorbool- 
        
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
doctestsargument to thetest()call. For example, to run all tests (including doctests) fornumpy.lib:>>> np.lib.test(doctests=True) 
© 2005–2021 NumPy Developers
Licensed under the 3-clause BSD License.
 https://numpy.org/doc/1.20/reference/generated/numpy.testing.rundocs.html