| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
It did not have `pass` in the definition. It appears unused, so should
be removed at some point.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
| |
We already in "if not cond" branch of code, we don't need to check it again
|
|
|
|
|
|
| |
Also does some cleanup on the float assert_equal to make it look more similar.
Fixes #10081
|
|
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.
|