diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2017-07-17 17:51:33 -0600 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2017-07-24 13:00:29 -0600 |
commit | 8eee1b06b330f6ff23fd3604444ba20a8d2d6416 (patch) | |
tree | 35c75994b20eb8bc6650f6ff16890ab0ec747931 /numpy/lib/tests/test_index_tricks.py | |
parent | e0f1740a5832273123fd4b29a811cf830f29a0b0 (diff) | |
download | numpy-8eee1b06b330f6ff23fd3604444ba20a8d2d6416.tar.gz |
TST: Remove unittest dependencies in numpy/lib/tests.
Diffstat (limited to 'numpy/lib/tests/test_index_tricks.py')
-rw-r--r-- | numpy/lib/tests/test_index_tricks.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/numpy/lib/tests/test_index_tricks.py b/numpy/lib/tests/test_index_tricks.py index 5b791026b..f06406c9e 100644 --- a/numpy/lib/tests/test_index_tricks.py +++ b/numpy/lib/tests/test_index_tricks.py @@ -2,7 +2,7 @@ from __future__ import division, absolute_import, print_function import numpy as np from numpy.testing import ( - run_module_suite, TestCase, assert_, assert_equal, assert_array_equal, + run_module_suite, assert_, assert_equal, assert_array_equal, assert_almost_equal, assert_array_almost_equal, assert_raises ) from numpy.lib.index_tricks import ( @@ -11,7 +11,7 @@ from numpy.lib.index_tricks import ( ) -class TestRavelUnravelIndex(TestCase): +class TestRavelUnravelIndex(object): def test_basic(self): assert_equal(np.unravel_index(2, (2, 2)), (1, 0)) assert_equal(np.ravel_multi_index((1, 0), (2, 2)), 2) @@ -110,11 +110,11 @@ class TestRavelUnravelIndex(TestCase): def test_writeability(self): # See gh-7269 x, y = np.unravel_index([1, 2, 3], (4, 5)) - self.assertTrue(x.flags.writeable) - self.assertTrue(y.flags.writeable) + assert_(x.flags.writeable) + assert_(y.flags.writeable) -class TestGrid(TestCase): +class TestGrid(object): def test_basic(self): a = mgrid[-1:1:10j] b = mgrid[-1:1:0.1] @@ -147,7 +147,7 @@ class TestGrid(TestCase): 0.2*np.ones(20, 'd'), 11) -class TestConcatenator(TestCase): +class TestConcatenator(object): def test_1d(self): assert_array_equal(r_[1, 2, 3, 4, 5, 6], np.array([1, 2, 3, 4, 5, 6])) b = np.ones(5) @@ -206,14 +206,14 @@ class TestConcatenator(TestCase): assert_equal(type(actual), type(expected)) -class TestNdenumerate(TestCase): +class TestNdenumerate(object): def test_basic(self): a = np.array([[1, 2], [3, 4]]) assert_equal(list(ndenumerate(a)), [((0, 0), 1), ((0, 1), 2), ((1, 0), 3), ((1, 1), 4)]) -class TestIndexExpression(TestCase): +class TestIndexExpression(object): def test_regression_1(self): # ticket #1196 a = np.arange(2) @@ -227,7 +227,7 @@ class TestIndexExpression(TestCase): assert_equal(a[:, :3, [1, 2]], a[s_[:, :3, [1, 2]]]) -class TestIx_(TestCase): +class TestIx_(object): def test_regression_1(self): # Test empty inputs create ouputs of indexing type, gh-5804 # Test both lists and arrays |