@@ -47,7 +47,7 @@ def test_merge_datasets(self, use_new_combine_kwarg_defaults):
4747 expected = data [["var1" , "var2" ]]
4848 assert_identical (actual , expected )
4949
50- actual = xr .merge ([data , data ], compat = "no_conflicts" )
50+ actual = xr .merge ([data , data ])
5151 assert_identical (actual , data )
5252
5353 def test_merge_dataarray_unnamed (self ):
@@ -197,13 +197,9 @@ def test_merge_arrays_attrs_variables(
197197
198198 if expect_exception :
199199 with pytest .raises (MergeError , match = "combine_attrs" ):
200- actual = xr .merge (
201- [data1 , data2 ], compat = "no_conflicts" , combine_attrs = combine_attrs
202- )
200+ actual = xr .merge ([data1 , data2 ], combine_attrs = combine_attrs )
203201 else :
204- actual = xr .merge (
205- [data1 , data2 ], compat = "no_conflicts" , combine_attrs = combine_attrs
206- )
202+ actual = xr .merge ([data1 , data2 ], combine_attrs = combine_attrs )
207203 expected = xr .Dataset (
208204 {"var1" : ("dim1" , [], expected_attrs )},
209205 coords = {"dim1" : ("dim1" , [], expected_attrs )},
@@ -323,19 +319,17 @@ def test_merge_no_conflicts_multi_var(self):
323319
324320 def test_merge_no_conflicts_preserve_attrs (self ):
325321 data = xr .Dataset ({"x" : ([], 0 , {"foo" : "bar" })})
326- actual = xr .merge (
327- [data , data ], compat = "no_conflicts" , combine_attrs = "no_conflicts"
328- )
322+ actual = xr .merge ([data , data ], combine_attrs = "no_conflicts" )
329323 assert_identical (data , actual )
330324
331325 def test_merge_no_conflicts_broadcast (self ):
332326 datasets = [xr .Dataset ({"x" : ("y" , [0 ])}), xr .Dataset ({"x" : np .nan })]
333- actual = xr .merge (datasets , compat = "no_conflicts" )
327+ actual = xr .merge (datasets )
334328 expected = xr .Dataset ({"x" : ("y" , [0 ])})
335329 assert_identical (expected , actual )
336330
337331 datasets = [xr .Dataset ({"x" : ("y" , [np .nan ])}), xr .Dataset ({"x" : 0 })]
338- actual = xr .merge (datasets , compat = "no_conflicts" )
332+ actual = xr .merge (datasets )
339333 assert_identical (expected , actual )
340334
341335
@@ -350,20 +344,20 @@ def test_merge(self):
350344
351345 actual = ds2 .merge (ds1 )
352346 assert_identical (expected , actual )
353- with pytest . warns ( FutureWarning ): # this is a false alarm
354- actual = data .merge (data )
347+
348+ actual = data .merge (data )
355349 assert_identical (data , actual )
356- actual = data .reset_coords (drop = True ).merge (data , compat = "no_conflicts" )
350+ actual = data .reset_coords (drop = True ).merge (data )
357351 assert_identical (data , actual )
358- actual = data .merge (data .reset_coords (drop = True ), compat = "no_conflicts" )
352+ actual = data .merge (data .reset_coords (drop = True ))
359353 assert_identical (data , actual )
360354
361355 with pytest .raises (ValueError , match = "conflicting values for variable" ):
362356 ds1 .merge (ds2 .rename ({"var3" : "var1" }))
363357 with pytest .raises (ValueError , match = r"should be coordinates or not" ):
364- data .reset_coords ().merge (data , compat = "no_conflicts" )
358+ data .reset_coords ().merge (data )
365359 with pytest .raises (ValueError , match = r"should be coordinates or not" ):
366- data .merge (data .reset_coords (), compat = "no_conflicts" )
360+ data .merge (data .reset_coords ())
367361
368362 def test_merge_drop_attrs (self ):
369363 data = create_test_data ()
@@ -417,6 +411,7 @@ def test_merge_compat(self):
417411 assert ds1 .identical (ds1 .merge (ds2 , compat = "override" ))
418412
419413 def test_merge_compat_minimal (self ) -> None :
414+ """Test that we drop the conflicting bar coordinate."""
420415 # https://github.com/pydata/xarray/issues/7405
421416 # https://github.com/pydata/xarray/issues/7588
422417 ds1 = xr .Dataset (coords = {"foo" : [1 , 2 , 3 ], "bar" : 4 })
@@ -426,7 +421,7 @@ def test_merge_compat_minimal(self) -> None:
426421 expected = xr .Dataset (coords = {"foo" : [1 , 2 , 3 ]})
427422 assert_identical (actual , expected )
428423
429- def test_merge_join (self ):
424+ def test_merge_join_outer (self ):
430425 ds1 = xr .Dataset ({"a" : ("x" , [1 , 2 ]), "x" : [0 , 1 ]})
431426 ds2 = xr .Dataset ({"b" : ("x" , [3 , 4 ]), "x" : [1 , 2 ]})
432427 expected = xr .Dataset (
@@ -533,11 +528,7 @@ def test_merge_datasets_false_warning(self):
533528 data = create_test_data (add_attrs = False , use_extension_array = True )
534529
535530 with set_options (use_new_combine_kwarg_defaults = False ):
536- with pytest .warns (
537- FutureWarning ,
538- match = "will change from compat='no_conflicts' to compat='override'" ,
539- ):
540- old = xr .merge ([data , data ])
531+ old = xr .merge ([data , data ])
541532
542533 with set_options (use_new_combine_kwarg_defaults = True ):
543534 new = xr .merge ([data , data ])
@@ -571,11 +562,7 @@ def test_merge_broadcast_equals(self):
571562 ds2 = xr .Dataset ({"x" : ("y" , [0 , 0 ])})
572563
573564 with set_options (use_new_combine_kwarg_defaults = False ):
574- with pytest .warns (
575- FutureWarning ,
576- match = "will change from compat='no_conflicts' to compat='override'" ,
577- ):
578- old = ds1 .merge (ds2 )
565+ old = ds1 .merge (ds2 )
579566
580567 with set_options (use_new_combine_kwarg_defaults = True ):
581568 new = ds1 .merge (ds2 )
0 commit comments