numpy.testing.run_module_suite(file_to_run=None, argv=None) [source]
Run a test module.
Equivalent to calling $ nosetests <argv> <file_to_run> from the command line
| Parameters: |
|
|---|
Adding the following:
if __name__ == "__main__" :
run_module_suite(argv=sys.argv)
at the end of a test module will run the tests when that module is called in the python interpreter.
Alternatively, calling:
>>> run_module_suite(file_to_run="numpy/tests/test_matlib.py")
from an interpreter will run all the test routine in ‘test_matlib.py’.
© 2005–2019 NumPy Developers
Licensed under the 3-clause BSD License.
https://docs.scipy.org/doc/numpy-1.17.0/reference/generated/numpy.testing.run_module_suite.html