Skip to content

Commit 9fc243b

Browse files
committed
a few triages
1 parent fe879cc commit 9fc243b

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

xarray/tests/test_dataset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1626,7 +1626,7 @@ def test_align(self):
16261626

16271627
left2, right2 = align(left, right, join='outer')
16281628
assert_equal(left2['dim3'].variable, right2['dim3'].variable)
1629-
assert_equal(left2['dim3'], union)
1629+
assert_array_equal(left2['dim3'], union)
16301630
assert_identical(left2.sel(dim3=intersection),
16311631
right2.sel(dim3=intersection))
16321632
assert np.isnan(left2['var3'][-2:]).all()

xarray/tests/test_plot.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
_build_discrete_cmap,
2525
_color_palette, import_seaborn)
2626

27-
from . import TestCase, requires_matplotlib, requires_seaborn, raises_regex
27+
from . import (
28+
TestCase, requires_matplotlib, requires_seaborn, raises_regex, assert_equal)
2829

2930

3031
@pytest.mark.flaky

xarray/tests/test_ufuncs.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def test_unary(self):
2626
xr.DataArray([0, 0], dims='x'),
2727
xr.Dataset({'y': ('x', [0, 0])})]
2828
for a in args:
29-
assert_identical(a + 1, xu.cos(a))
29+
self.assertIdentical(a + 1, xu.cos(a))
3030

3131
def test_binary(self):
3232
args = [0,
@@ -36,10 +36,10 @@ def test_binary(self):
3636
xr.Dataset({'y': ('x', [0, 0])})]
3737
for n, t1 in enumerate(args):
3838
for t2 in args[n:]:
39-
assert_identical(t2 + 1, xu.maximum(t1, t2 + 1))
40-
assert_identical(t2 + 1, xu.maximum(t2, t1 + 1))
41-
assert_identical(t2 + 1, xu.maximum(t1 + 1, t2))
42-
assert_identical(t2 + 1, xu.maximum(t2 + 1, t1))
39+
self.assertIdentical(t2 + 1, xu.maximum(t1, t2 + 1))
40+
self.assertIdentical(t2 + 1, xu.maximum(t2, t1 + 1))
41+
self.assertIdentical(t2 + 1, xu.maximum(t1 + 1, t2))
42+
self.assertIdentical(t2 + 1, xu.maximum(t2 + 1, t1))
4343

4444
def test_groupby(self):
4545
ds = xr.Dataset({'a': ('x', [0, 0, 0])}, {'c': ('x', [0, 0, 1])})
@@ -65,4 +65,4 @@ def test_groupby(self):
6565
def test_pickle(self):
6666
a = 1.0
6767
cos_pickled = pickle.loads(pickle.dumps(xu.cos))
68-
assert_identical(cos_pickled(a), xu.cos(a))
68+
self.assertIdentical(cos_pickled(a), xu.cos(a))

0 commit comments

Comments
 (0)