diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2018-03-21 13:47:53 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-21 13:47:53 -0600 |
commit | cfde48156ff9ca0502f375900079da96a1582fec (patch) | |
tree | fd6f061b7c860205f94d71fe149b5a5e2e643e14 /numpy/core | |
parent | 3629e3986333ecdf394924e53265e0d1061e928d (diff) | |
parent | ed6c0dd342c7d6def2600db00c3eaf75e16a39d2 (diff) | |
download | numpy-cfde48156ff9ca0502f375900079da96a1582fec.tar.gz |
Merge pull request #10777 from charris/prep-for-pytest
MAINT: Remove use of unittest in NumPy tests.
Diffstat (limited to 'numpy/core')
-rw-r--r-- | numpy/core/tests/test_multiarray.py | 5 | ||||
-rw-r--r-- | numpy/core/tests/test_umath.py | 4 | ||||
-rw-r--r-- | numpy/core/tests/test_umath_complex.py | 8 |
3 files changed, 7 insertions, 10 deletions
diff --git a/numpy/core/tests/test_multiarray.py b/numpy/core/tests/test_multiarray.py index c2d1f2ca5..6050f303e 100644 --- a/numpy/core/tests/test_multiarray.py +++ b/numpy/core/tests/test_multiarray.py @@ -23,7 +23,6 @@ if sys.version_info[0] >= 3: else: import __builtin__ as builtins from decimal import Decimal -from unittest import TestCase import numpy as np from numpy.compat import strchar, unicode @@ -5355,8 +5354,6 @@ class TestDot(object): class MatmulCommon(object): """Common tests for '@' operator and numpy.matmul. - Do not derive from TestCase to avoid nose running it. - """ # Should work with these types. Will want to add # "O" at some point @@ -7173,7 +7170,7 @@ class TestCTypes(object): _internal.ctypes = ctypes -class TestWritebackIfCopy(TestCase): +class TestWritebackIfCopy(object): # all these tests use the WRITEBACKIFCOPY mechanism def test_argmax_with_out(self): mat = np.eye(5) diff --git a/numpy/core/tests/test_umath.py b/numpy/core/tests/test_umath.py index ac97b8b0d..4b6b26cbf 100644 --- a/numpy/core/tests/test_umath.py +++ b/numpy/core/tests/test_umath.py @@ -24,10 +24,10 @@ def on_powerpc(): class _FilterInvalids(object): - def setUp(self): + def setup(self): self.olderr = np.seterr(invalid='ignore') - def tearDown(self): + def teardown(self): np.seterr(**self.olderr) diff --git a/numpy/core/tests/test_umath_complex.py b/numpy/core/tests/test_umath_complex.py index fb3b6577c..1b098a120 100644 --- a/numpy/core/tests/test_umath_complex.py +++ b/numpy/core/tests/test_umath_complex.py @@ -351,10 +351,10 @@ class TestCsqrt(object): # cuts first) class TestCpow(object): - def setUp(self): + def setup(self): self.olderr = np.seterr(invalid='ignore') - def tearDown(self): + def teardown(self): np.seterr(**self.olderr) def test_simple(self): @@ -391,10 +391,10 @@ class TestCpow(object): assert_almost_equal(n_r[i], p_r[i], err_msg='Loop %d\n' % i) class TestCabs(object): - def setUp(self): + def setup(self): self.olderr = np.seterr(invalid='ignore') - def tearDown(self): + def teardown(self): np.seterr(**self.olderr) def test_simple(self): |