On this page
Test Support (numpy.testing)
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
| 
 | Raises an AssertionError if two items are not equal up to desired precision. | 
| 
 | Raises an AssertionError if two items are not equal up to significant digits. | 
| 
 | Raises an AssertionError if two objects are not equal up to desired precision. | 
| 
 | Raises an AssertionError if two objects are not equal up to desired tolerance. | 
| 
 | Compare two arrays relatively to their spacing. | 
| 
 | Check that all items of arrays differ in at most N Units in the Last Place. | 
| 
 | Raises an AssertionError if two array_like objects are not equal. | 
| 
 | Raises an AssertionError if two array_like objects are not ordered by less than. | 
| 
 | Raises an AssertionError if two objects are not equal. | 
| 
 | Fail unless an exception of class exception_class is thrown by callable when invoked with arguments args and keyword arguments kwargs. | 
| 
 | Fail unless an exception of class exception_class and with message that matches expected_regexp is thrown by callable when invoked with arguments args and keyword arguments kwargs. | 
| 
 | Fail unless the given callable throws the specified warning. | 
| 
 | Test if two strings are equal. | 
Decorators
| 
 | Filter deprecation warnings while running the test suite. | 
| 
 | Make function raise KnownFailureException exception if given condition is true. | 
| 
 | Signals to nose that this function is or is not a test. | 
| 
 | Make function raise SkipTest exception if a given condition is true. | 
| 
 | Label a test as ‘slow’. | 
| 
 | Apply a decorator to all methods in a class matching a regular expression. | 
Test Running
| alias of  | |
| 
 | Run a test module. | 
| 
 | Run doctests found in the given file. | 
| 
 | Context manager and decorator doing much the same as  | 
Guidelines
© 2005–2020 NumPy Developers
Licensed under the 3-clause BSD License.
 https://numpy.org/doc/1.19/reference/routines.testing.html