Skip to content

Commit aa3180e

Browse files
committed
Tidy up tests based on review
1 parent 51ccc89 commit aa3180e

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

xarray/tests/test_merge.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -341,8 +341,8 @@ def test_merge(self):
341341

342342
actual = ds2.merge(ds1)
343343
assert_identical(expected, actual)
344-
345-
actual = data.merge(data, compat="no_conflicts")
344+
with pytest.warns(FutureWarning): # this is a false alarm
345+
actual = data.merge(data)
346346
assert_identical(data, actual)
347347
actual = data.reset_coords(drop=True).merge(data, compat="no_conflicts")
348348
assert_identical(data, actual)
@@ -356,13 +356,13 @@ def test_merge(self):
356356
with pytest.raises(ValueError, match=r"should be coordinates or not"):
357357
data.merge(data.reset_coords(), compat="no_conflicts")
358358

359-
def test_merge_broadcast_equals(self):
359+
def test_merge_compat_broadcast_equals(self):
360360
ds1 = xr.Dataset({"x": 0})
361361
ds2 = xr.Dataset({"x": ("y", [0, 0])})
362-
actual = ds1.merge(ds2, compat="no_conflicts")
362+
actual = ds1.merge(ds2, compat="broadcast_equals")
363363
assert_identical(ds2, actual)
364364

365-
actual = ds2.merge(ds1, compat="override")
365+
actual = ds2.merge(ds1, compat="broadcast_equals")
366366
assert_identical(ds2, actual)
367367

368368
actual = ds1.copy()
@@ -371,7 +371,7 @@ def test_merge_broadcast_equals(self):
371371

372372
ds1 = xr.Dataset({"x": np.nan})
373373
ds2 = xr.Dataset({"x": ("y", [np.nan, np.nan])})
374-
actual = ds1.merge(ds2, compat="no_conflicts")
374+
actual = ds1.merge(ds2, compat="broadcast_equals")
375375
assert_identical(ds2, actual)
376376

377377
def test_merge_compat(self):
@@ -405,7 +405,7 @@ def test_merge_compat_minimal(self) -> None:
405405
expected = xr.Dataset(coords={"foo": [1, 2, 3]})
406406
assert_identical(actual, expected)
407407

408-
def test_merge_auto_align(self):
408+
def test_merge_join(self):
409409
ds1 = xr.Dataset({"a": ("x", [1, 2]), "x": [0, 1]})
410410
ds2 = xr.Dataset({"b": ("x", [3, 4]), "x": [1, 2]})
411411
expected = xr.Dataset(

0 commit comments

Comments
 (0)