diff options
author | Eric Wieser <wieser.eric@gmail.com> | 2018-04-24 21:48:53 -0700 |
---|---|---|
committer | Eric Wieser <wieser.eric@gmail.com> | 2018-04-24 21:52:42 -0700 |
commit | 58e40ce3f270a84faa45ff29bcbce5dfea2a0e74 (patch) | |
tree | bf23882ee76d5495ed902550748df5bb3c5368fe /numpy/tests | |
parent | 1ec8f6d93ea150d79cfea6515ffe02f6d78753b2 (diff) | |
download | numpy-58e40ce3f270a84faa45ff29bcbce5dfea2a0e74.tar.gz |
MAINT: Use assert_equal
Diffstat (limited to 'numpy/tests')
-rw-r--r-- | numpy/tests/test_ctypeslib.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/numpy/tests/test_ctypeslib.py b/numpy/tests/test_ctypeslib.py index 508a348c1..725d868d7 100644 --- a/numpy/tests/test_ctypeslib.py +++ b/numpy/tests/test_ctypeslib.py @@ -6,7 +6,7 @@ import pytest import numpy as np from numpy.ctypeslib import ndpointer, load_library, as_array from numpy.distutils.misc_util import get_shared_lib_extension -from numpy.testing import assert_, assert_array_equal, assert_raises +from numpy.testing import assert_, assert_array_equal, assert_raises, assert_equal try: cdll = None @@ -121,10 +121,10 @@ class TestAsArray(object): from ctypes import c_int at = c_int * 2 a = as_array(at(1, 2)) - assert_(a.shape == (2,)) + assert_equal(a.shape, (2,)) assert_array_equal(a, np.array([1, 2])) a = as_array((at * 3)(at(1, 2), at(3, 4), at(5, 6))) - assert_(a.shape == (3, 2)) + assert_equal(a.shape, (3, 2)) assert_array_equal(a, np.array([[1, 2], [3, 4], [5, 6]])) @pytest.mark.skipif(not _HAS_CTYPE, @@ -133,5 +133,5 @@ class TestAsArray(object): from ctypes import c_int, cast, POINTER p = cast((c_int * 10)(*range(10)), POINTER(c_int)) a = as_array(p, (10,)) - assert_(a.shape == (10,)) + assert_equal(a.shape, (10,)) assert_array_equal(a, np.array(range(10))) |