Inheritance diagram for nipy.testing.nosetester:
Nipy nosetester
Sets doctests to run by default
Use our own doctest plugin (based on that of numpy)
Bases: nipy.fixes.numpy.testing.nosetester.NoseTester
Numpy-like testing class
Methods
bench | |
prepare_test_args | |
test |
Test class init
Parameters : | package : string or module
|
---|
Run benchmarks for module using nose.
Parameters : | label : {‘fast’, ‘full’, ‘’, attribute identifier}, optional
verbose : int, optional
extra_argv : list, optional
|
---|---|
Returns : | success : bool
|
Notes
Benchmarks are like tests, but have names starting with “bench” instead of “test”, and can be found under the “benchmarks” sub-directory of the module.
Each NumPy module exposes bench in its namespace to run all benchmarks for it.
Examples
>>> success = np.lib.bench()
Running benchmarks for numpy.lib
...
using 562341 items:
unique:
0.11
unique1d:
0.11
ratio: 1.0
nUnique: 56230 == 56230
...
OK
>>> success
True
Run tests for module using nose.
This method does the heavy lifting for the test method. It takes all the same arguments, for details see test.
See also
Run tests for module using nose.
As for numpy tester, except enable tests by default.
Parameters : | label : {‘fast’, ‘full’, ‘’, attribute identifier}, optional
verbose : int, optional
extra_argv : list, optional
doctests : bool, optional
coverage : bool, optional
|
---|---|
Returns : | result : object
|
Notes
Each nipy module should expose test in its namespace to run all tests for it. For example, to run all tests for nipy.algorithms:
>>> import nipy.algorithms
>>> nipy.algorithms.test()
Return first-package-wins option string for this version of nose
Versions of nose prior to 1.1.0 needed =True for first-package-wins, versions after won’t accept it.
changeset: 816:c344a4552d76 http://code.google.com/p/python-nose/issues/detail?id=293
Returns : | fpw_str : str
|
---|
Prepare any imports for testing run
At the moment, we prepare matplotlib by trying to make it use a backend that does not need a display