Skip to content

Commit 6928c6e

Browse files
authored
Merge pull request #490 from minrk/deprecated-testing-import
update deprecated import of assert_array_equal
2 parents 6ba28be + a7c962f commit 6928c6e

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

ipyparallel/tests/test_serialize.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def test_roundtrip_memoryview():
8080

8181
def test_numpy():
8282
pytest.importorskip('numpy')
83-
from numpy.testing.utils import assert_array_equal
83+
from numpy.testing import assert_array_equal
8484

8585
for shape in SHAPES:
8686
for dtype in DTYPES:
@@ -96,7 +96,7 @@ def test_numpy():
9696

9797
def test_recarray():
9898
pytest.importorskip('numpy')
99-
from numpy.testing.utils import assert_array_equal
99+
from numpy.testing import assert_array_equal
100100

101101
for shape in SHAPES:
102102
for dtype in [
@@ -115,7 +115,7 @@ def test_recarray():
115115

116116
def test_numpy_in_seq():
117117
pytest.importorskip('numpy')
118-
from numpy.testing.utils import assert_array_equal
118+
from numpy.testing import assert_array_equal
119119

120120
for shape in SHAPES:
121121
for dtype in DTYPES:
@@ -133,7 +133,7 @@ def test_numpy_in_seq():
133133

134134
def test_numpy_in_dict():
135135
pytest.importorskip('numpy')
136-
from numpy.testing.utils import assert_array_equal
136+
from numpy.testing import assert_array_equal
137137

138138
for shape in SHAPES:
139139
for dtype in DTYPES:
@@ -226,7 +226,7 @@ class D(C):
226226

227227
def test_pickle_threshold():
228228
numpy = pytest.importorskip('numpy')
229-
from numpy.testing.utils import assert_array_equal
229+
from numpy.testing import assert_array_equal
230230

231231
A = numpy.ones((5, 5))
232232
bufs = serialize_object(A, 1024)

ipyparallel/tests/test_view.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ def test_scatter_gather(self):
230230
@skip_without('numpy')
231231
def test_scatter_gather_numpy(self):
232232
import numpy
233-
from numpy.testing.utils import assert_array_equal
233+
from numpy.testing import assert_array_equal
234234

235235
view = self.client[:]
236236
a = numpy.arange(64)
@@ -250,7 +250,7 @@ def test_scatter_gather_lazy(self):
250250
def test_apply_numpy(self):
251251
"""view.apply(f, ndarray)"""
252252
import numpy
253-
from numpy.testing.utils import assert_array_equal
253+
from numpy.testing import assert_array_equal
254254

255255
A = numpy.random.random((100, 100))
256256
view = self.client[-1]
@@ -263,7 +263,7 @@ def test_apply_numpy(self):
263263
def test_apply_numpy_object_dtype(self):
264264
"""view.apply(f, ndarray) with dtype=object"""
265265
import numpy
266-
from numpy.testing.utils import assert_array_equal
266+
from numpy.testing import assert_array_equal
267267

268268
view = self.client[-1]
269269

@@ -279,7 +279,7 @@ def test_apply_numpy_object_dtype(self):
279279
def test_push_pull_recarray(self):
280280
"""push/pull recarrays"""
281281
import numpy
282-
from numpy.testing.utils import assert_array_equal
282+
from numpy.testing import assert_array_equal
283283

284284
view = self.client[-1]
285285

@@ -348,7 +348,7 @@ def test_map_iterable(self):
348348
def test_map_numpy(self):
349349
"""test map on numpy arrays (direct)"""
350350
import numpy
351-
from numpy.testing.utils import assert_array_equal
351+
from numpy.testing import assert_array_equal
352352

353353
view = self.client[:]
354354
# 101 is prime, so it won't be evenly distributed
@@ -366,7 +366,7 @@ def test_scatter_gather_nonblocking(self):
366366
@skip_without('numpy')
367367
def test_scatter_gather_numpy_nonblocking(self):
368368
import numpy
369-
from numpy.testing.utils import assert_array_equal
369+
from numpy.testing import assert_array_equal
370370

371371
a = numpy.arange(64)
372372
view = self.client[:]

0 commit comments

Comments
 (0)