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_arraysetops.py | |
parent | e0f1740a5832273123fd4b29a811cf830f29a0b0 (diff) | |
download | numpy-8eee1b06b330f6ff23fd3604444ba20a8d2d6416.tar.gz |
TST: Remove unittest dependencies in numpy/lib/tests.
Diffstat (limited to 'numpy/lib/tests/test_arraysetops.py')
-rw-r--r-- | numpy/lib/tests/test_arraysetops.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/numpy/lib/tests/test_arraysetops.py b/numpy/lib/tests/test_arraysetops.py index d47534f82..b8ced41e8 100644 --- a/numpy/lib/tests/test_arraysetops.py +++ b/numpy/lib/tests/test_arraysetops.py @@ -5,14 +5,14 @@ from __future__ import division, absolute_import, print_function import numpy as np from numpy.testing import ( - run_module_suite, TestCase, assert_array_equal, assert_equal, assert_raises + run_module_suite, assert_array_equal, assert_equal, assert_raises, ) from numpy.lib.arraysetops import ( ediff1d, intersect1d, setxor1d, union1d, setdiff1d, unique, in1d, isin ) -class TestSetOps(TestCase): +class TestSetOps(object): def test_intersect1d(self): # unique inputs @@ -89,28 +89,28 @@ class TestSetOps(TestCase): x = isin(a, b) y = isin_slow(a, b) assert_array_equal(x, y) - + #multidimensional arrays in both arguments a = np.arange(24).reshape([2, 3, 4]) b = np.array([[10, 20, 30], [0, 1, 3], [11, 22, 33]]) assert_isin_equal(a, b) - + #array-likes as both arguments c = [(9, 8), (7, 6)] d = (9, 7) assert_isin_equal(c, d) - + #zero-d array: f = np.array(3) assert_isin_equal(f, b) assert_isin_equal(a, f) assert_isin_equal(f, f) - + #scalar: assert_isin_equal(5, b) assert_isin_equal(a, 6) assert_isin_equal(5, 6) - + #empty array-like: x = [] assert_isin_equal(x, b) @@ -252,7 +252,7 @@ class TestSetOps(TestCase): assert_array_equal(c1, c2) -class TestUnique(TestCase): +class TestUnique(object): def test_unique_1d(self): |