summaryrefslogtreecommitdiff
path: root/numpy/testing/nose_tools
Commit message (Collapse)AuthorAgeFilesLines
* MAINT: Rearrange numpy/testing files.Charles Harris2018-03-296-3982/+0
| | | | | | | | | 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.
* TST: Rename some compiled c test modulesCharles Harris2018-03-241-1/+1
| | | | | | The renamed C modules provide low level functions for testing. The rename marks them as private functions and makes them invisible to pytest by default.
* TST: Remove some nose dependences in utils.pyCharles Harris2018-03-231-7/+49
| | | | | | | | | | | | The `assert_raises` and `assert_raises_regex` testing utilities were being imported from nose, which in turn took them from unittest `assertRaises` and `assertRaisesRegex`. We takeover the nose procedure here so that these commonly used utilities no longer have a nose dependence. The `raises` decorator continues to have a nose dependency, but that only shows up when used, and NumPy does not use it. Document that and otherwise leave it be.
* TST: Import abstract classes from collections.abcFrederick Lefebvre2018-03-141-4/+9
| | | | | | | | Abstract collection classes accessed from the collections module have been deprecated since Python 3.3. They should be accessed through collections.abc. When run with Python 3.7, the deprecation warning cause multiple tests to fail.
* Merge pull request #10718 from AaronCritchley/tst-fixing-float16-eqCharles Harris2018-03-131-1/+3
|\ | | | | BUG: Fix bug in asserting near equality of float16 arrays.
| * TST: Fixing bug in assert near equality of float16 arrays (#10697)Aaron Critchley2018-03-101-1/+3
| |
* | Fix low-hanging Pypy compatibility issues (#10737)Pauli Virtanen2018-03-121-2/+4
|/ | | | | | | | | | | | | * TST: skip refcount-requiring tests if sys.refcount is missing * ENH: io: add refcheck=False to a safe .resize() call The array is allocated immediately above, and the resize always succeeds so it is not necessary to check it. Fixes Pypy compatibility. * TST: remove unused code * TST: factor skipif(not HAS_REFCOUNT) into a separate decorator
* DOC/MAINT: More misc. typosluz.paz2018-02-271-2/+2
| | | Found via `codespell` and `grep`
* MAINT: Fix unused IgnoreException in nose_tools/utils.pyCharles Harris2017-12-221-0/+1
| | | | | It did not have `pass` in the definition. It appears unused, so should be removed at some point.
* MAINT: Hardwire 'nose' in parameterized.py.Charles Harris2017-12-221-1/+2
|
* MAINT: Add __all__ to nose_tools/decorators.py.Charles Harris2017-12-221-0/+3
|
* DOC: fix minor typosUnknown2017-12-121-1/+1
|
* BUG: Fix numpy.testing.assert_equal in release mode.Charles Harris2017-12-101-3/+6
| | | | | | | | To be complete, the NaT handling needs to raise AssertionError when comparing NaT's with different types. That check was previously passed on and the resulting check, which would succeed in development mode because DeprecationWarning was converted to an error, warns in release mode.
* MAINT: Remove duplicate cond check from assert_array_compareMichael Odintsov2017-11-281-2/+1
| | | We already in "if not cond" branch of code, we don't need to check it again
* BUG: Fix assert_equal on time-like objectsEric Wieser2017-11-261-28/+26
| | | | | | Also does some cleanup on the float assert_equal to make it look more similar. Fixes #10081
* ENH: check for FPU mode changes in the test suitePauli Virtanen2017-08-162-3/+38
| | | | | Emit a test failure if the FPU mode changes when running a test case, allowing to pinpoint what test caused the mode change.
* ENH: Add parametrize decorator for nose.Charles Harris2017-07-052-0/+506
| | | | | | | | | | One of the steps in achieving pytest compatibility is to get rid of yield based nose tests. Having some basic version of parametrize offers a way to do that. Note that the version here is very restricted and does not have all the capabilities of the pytest version. Such are the drawbacks of backward compatibility.
* MAINT: Rearrange files in numpy/testing module.Charles Harris2017-07-045-0/+3385
The aim here is to separate out the nose dependent files prior to adding pytest support. This could be done by adding new files to the general numpy/testing directory, but I felt that it was to have the relevant files separated out as it makes it easier to completely remove nose dependencies when needed. Many places were accessing submodules in numpy/testing directly, and in some cases incorrectly. That presented a backwards compatibility problem. The solution adapted here is to have "dummy" files whose contents will depend on whether of not pytest is active. That way the module looks the same as before from the outside. In the case of numpy itself, direct accesses have been fixed. Having proper `__all__` lists in the submodules helped in that.