diff --git a/xarray/tests/test_dataset.py b/xarray/tests/test_dataset.py index 325769c622d..7f10b4f66f7 100644 --- a/xarray/tests/test_dataset.py +++ b/xarray/tests/test_dataset.py @@ -1626,7 +1626,7 @@ def test_align(self): left2, right2 = align(left, right, join='outer') assert_equal(left2['dim3'].variable, right2['dim3'].variable) - assert_equal(left2['dim3'], union) + assert_array_equal(left2['dim3'], union) assert_identical(left2.sel(dim3=intersection), right2.sel(dim3=intersection)) assert np.isnan(left2['var3'][-2:]).all() diff --git a/xarray/tests/test_ufuncs.py b/xarray/tests/test_ufuncs.py index 717b50602db..7449beabaf8 100644 --- a/xarray/tests/test_ufuncs.py +++ b/xarray/tests/test_ufuncs.py @@ -26,7 +26,7 @@ def test_unary(self): xr.DataArray([0, 0], dims='x'), xr.Dataset({'y': ('x', [0, 0])})] for a in args: - assert_identical(a + 1, xu.cos(a)) + self.assertIdentical(a + 1, xu.cos(a)) def test_binary(self): args = [0, @@ -36,10 +36,10 @@ def test_binary(self): xr.Dataset({'y': ('x', [0, 0])})] for n, t1 in enumerate(args): for t2 in args[n:]: - assert_identical(t2 + 1, xu.maximum(t1, t2 + 1)) - assert_identical(t2 + 1, xu.maximum(t2, t1 + 1)) - assert_identical(t2 + 1, xu.maximum(t1 + 1, t2)) - assert_identical(t2 + 1, xu.maximum(t2 + 1, t1)) + self.assertIdentical(t2 + 1, xu.maximum(t1, t2 + 1)) + self.assertIdentical(t2 + 1, xu.maximum(t2, t1 + 1)) + self.assertIdentical(t2 + 1, xu.maximum(t1 + 1, t2)) + self.assertIdentical(t2 + 1, xu.maximum(t2 + 1, t1)) def test_groupby(self): ds = xr.Dataset({'a': ('x', [0, 0, 0])}, {'c': ('x', [0, 0, 1])}) @@ -65,4 +65,4 @@ def test_groupby(self): def test_pickle(self): a = 1.0 cos_pickled = pickle.loads(pickle.dumps(xu.cos)) - assert_identical(cos_pickled(a), xu.cos(a)) + self.assertIdentical(cos_pickled(a), xu.cos(a))