This is a pre-release version (latest). Go to latest (2.4.4)
{ } Raw JSON

bundles / numpy latest / docs

Doc

reference:routines.testing

docs/reference:routines.testing

Test support

Common test support for all numpy test scripts.

This single module should provide all the common functionality for numpy tests in a single location, so that test scripts can just import it and work right away. For background, see the testing-guidelines

Asserts

.. autosummary:: 
    :toctree:generated/
    assert_allclose
    assert_array_almost_equal_nulp
    assert_array_max_ulp
    assert_array_equal
    assert_array_less
    assert_equal
    assert_raises
    assert_raises_regex
    assert_warns
    assert_no_warnings
    assert_no_gc_cycles
    assert_string_equal

Decorators

.. autosummary:: 
    :toctree:generated/
    decorate_methods

Test running

.. autosummary:: 
    :toctree:generated/
    clear_and_catch_warnings
    measure
    rundocs
    suppress_warnings

Testing custom array containers (numpy.testing.overrides)

These functions can be useful when testing custom array container implementations which make use of __array_ufunc__/__array_function__.

.. autosummary:: 
    :toctree:generated/
    allows_array_function_override
    allows_array_ufunc_override
    get_overridable_numpy_ufuncs
    get_overridable_numpy_array_functions

Guidelines