Skip to content

Commit

Permalink
a few triages
Browse files Browse the repository at this point in the history
  • Loading branch information
max-sixty committed Jan 14, 2018
1 parent fe879cc commit b5abf05
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion xarray/tests/test_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
12 changes: 6 additions & 6 deletions xarray/tests/test_ufuncs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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])})
Expand All @@ -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))

0 comments on commit b5abf05

Please sign in to comment.