summaryrefslogtreecommitdiff
path: root/numpy/testing/_private/nosetester.py
Commit message (Collapse)AuthorAgeFilesLines
* MAINT: Replace basestring with str.Charles Harris2020-01-231-3/+2
| | | | | | | This replaces basestring with str except in - tools/npy_tempita/ - numpy/compat/py3k.py
* MAINT: Remove sys.version checks in testsSeth Troisi2020-01-151-9/+0
|
* MAINT: Remove python2 array_getslice and array_setslice (#15263)Seth Troisi2020-01-071-2/+0
| | | These implemented the __getslice__ and __setslice__ methods in Python 2, which no longer exist in Python 3.
* MAINT: Remove references to non-existent sys.exc_clear()Jon Dufresne2020-01-051-3/+0
| | | | | sys.exc_clear() was removed in Python 3. All internal uses can be removed.
* MAINT: Remove implicit inheritance from object class (#15236)Jon Dufresne2020-01-051-1/+1
| | | | | | | Inheriting from object was necessary for Python 2 compatibility to use new-style classes. In Python 3, this is unnecessary as there are no old-style classes. Dropping the object is more idiomatic Python.
* MAINT: Remove unnecessary 'from __future__ import ...' statementsJon Dufresne2020-01-031-2/+0
| | | | | As numpy is Python 3 only, these import statements are now unnecessary and don't alter runtime behavior.
* ENH: add "max difference" messages to np.testing.assert_array_equal (#12591)Stephan Hoyer2019-01-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | Example behavior: >>> x = np.array([1, 2, 3]) >>> y = np.array([1, 2, 3.0001]) >>> np.testing.assert_allclose(x, y) AssertionError: Not equal to tolerance rtol=1e-07, atol=0 Mismatch: 33.3% Max absolute difference: 0.0001 Max relative difference: 3.33322223e-05 x: array([1, 2, 3]) y: array([1. , 2. , 3.0001]) Motivation: when writing numerical algorithms, I frequently find myself experimenting to pick the right value of `atol` and `rtol` for `np.testing.assert_allclose()`. If I make the tolerance too generous, I risk missing regressions in accuracy, so I usually try to pick the smallest values for which tests pass. This change immediately reveals appropriate values to use for these parameters, so I don't need to guess and check.
* DOC: reduce warnings and cleanup redundant c-api documentationmattip2018-08-141-9/+11
|
* MAINT: Rearrange numpy/testing files.Charles Harris2018-03-291-0/+560
This is to prepare for the switch to pytest. * Rename `numpy/testing/nose_tools` to `numpy/testing/_private`. * Redirect imports as needed. * Copy `_testutils.py` from scipy to `numpy/testing/_private`. * Rename `_testutils.py` to `_pytester.py` and remove unneeded bits.