Movatterモバイル変換


[0]ホーム

URL:


SciPy

numpy.testing.Tester.test

Tester.test(label='fast',verbose=1,extra_argv=None,doctests=False,coverage=False,raise_warnings=None,timer=False)[source]

Run tests for module using nose.

Parameters:
label:{‘fast’, ‘full’, ‘’, attribute identifier}, optional

Identifies the tests to run. This can be a string to pass tothe nosetests executable with the ‘-A’ option, or one of severalspecial values. Special values are:* ‘fast’ - the default - which corresponds to thenosetests-A

option of ‘not slow’.

  • ‘full’ - fast (as above) and slow tests as in the‘no -A’ option to nosetests - this is the same as ‘’.
  • None or ‘’ - run all tests.

attribute_identifier - string passed directly to nosetests as ‘-A’.

verbose:int, optional

Verbosity value for test outputs, in the range 1-10. Default is 1.

extra_argv:list, optional

List with any extra arguments to pass to nosetests.

doctests:bool, optional

If True, run doctests in module. Default is False.

coverage:bool, optional

If True, report coverage of NumPy code. Default is False.(This requires the`coverage module:

raise_warnings:None, str or sequence of warnings, optional

This specifies which warnings to configure as ‘raise’ insteadof being shown once during the test execution. Valid strings are:

  • “develop” : equals(Warning,)
  • “release” : equals(), don’t raise on any warnings.

The default is to use the class initialization value.

timer:bool or int, optional

Timing of individual tests withnose-timer (which needs to beinstalled). If True, time tests and report on all of them.If an integer (sayN), report timing results forN slowesttests.

Returns:
result:object

Returns the result of running the tests as anose.result.TextTestResult object.

Notes

Each NumPy module exposestest in its namespace to run all tests for it.For example, to run all tests for numpy.lib:

>>>np.lib.test()

Examples

>>>result=np.lib.test()Running unit tests for numpy.lib...Ran 976 tests in 3.933s

OK

>>>result.errors[]>>>result.knownfail[]

Quick search

  • © Copyright 2008-2018, The SciPy community.
  • Last updated on Jul 24, 2018.
  • Created usingSphinx 1.6.6.

[8]ページ先頭

©2009-2025 Movatter.jp