diff options
author | xoviat <xoviat@users.noreply.github.com> | 2018-02-28 17:59:07 -0600 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2018-03-21 12:38:14 -0600 |
commit | ed6c0dd342c7d6def2600db00c3eaf75e16a39d2 (patch) | |
tree | b464dda16792fca10cf712fa56d67fe3dc18e4e9 /numpy/lib | |
parent | 646452b03f7a78fc8b30d86a6bb67b688deaa017 (diff) | |
download | numpy-ed6c0dd342c7d6def2600db00c3eaf75e16a39d2.tar.gz |
MAINT: Remove use of unittest in NumPy tests.
This removes a few left over uses of unittest. The main changes apart
from removal of Test case are:
* `setUp` replaced by nose and pytest compatible `setup`
* `tearDown` replaced by nose and pytest compatible `teardown`
* `assertRaises` replaced by `assert_raises`
* `assertEqual` replaced by `assert_equal`
The last two are in `numpy/testings/tests/test_utils.py`, so may seem a
but circular, but at least are limited to those two functions.
The use of `setup` and `teardown`, can be fixed up with the pytest
equivalents after we have switched to pytest.
Diffstat (limited to 'numpy/lib')
-rw-r--r-- | numpy/lib/tests/test_io.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/lib/tests/test_io.py b/numpy/lib/tests/test_io.py index a0f256726..5d7dc32dd 100644 --- a/numpy/lib/tests/test_io.py +++ b/numpy/lib/tests/test_io.py @@ -599,11 +599,11 @@ class LoadTxtBase(object): class TestLoadTxt(LoadTxtBase): loadfunc = staticmethod(np.loadtxt) - def setUp(self): + def setup(self): # lower chunksize for testing self.orig_chunk = np.lib.npyio._loadtxt_chunksize np.lib.npyio._loadtxt_chunksize = 1 - def tearDown(self): + def teardown(self): np.lib.npyio._loadtxt_chunksize = self.orig_chunk def test_record(self): |