-
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 lineParameters: file_to_run : str, optional
Path to test module, or None. By default, run the module from which this function is called.
argv : list of strings
Arguments to be passed to the nose test runner.
argv[0]
is ignored. All command line arguments accepted bynosetests
will work. If it is the default value None, sys.argv is used.New in version 1.9.0.
Examples
Adding the following:
12if
__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:
1>>> run_module_suite(file_to_run
=
"numpy/tests/test_matlib.py"
)
from an interpreter will run all the test routine in ?test_matlib.py?.
numpy.testing.run_module_suite()

2025-01-10 15:47:30
Please login to continue.