diff --git a/xarray/core/combine.py b/xarray/core/combine.py index 167b5a93ebc..e35bb51e030 100644 --- a/xarray/core/combine.py +++ b/xarray/core/combine.py @@ -248,7 +248,7 @@ def _combine_1d( join=join, ) except ValueError as err: - if "Encountered unexpected variable" in str(err): + if "encountered unexpected variable" in str(err): raise ValueError( "These objects cannot be combined using only " "xarray.combine_nested, instead either use " diff --git a/xarray/core/concat.py b/xarray/core/concat.py index a5ec7c5185a..de0dfcc5a5d 100644 --- a/xarray/core/concat.py +++ b/xarray/core/concat.py @@ -374,7 +374,7 @@ def _dataset_concat( # check that global attributes are fixed across all datasets if necessary for ds in datasets[1:]: if compat == "identical" and not utils.dict_equiv(ds.attrs, result_attrs): - raise ValueError("Dataset global attributes are not equal.") + raise ValueError("Dataset global attributes not equal.") # we've already verified everything is consistent; now, calculate # shared dimension sizes so we can expand the necessary variables diff --git a/xarray/tests/test_concat.py b/xarray/tests/test_concat.py index 6142762063c..d624c5c1363 100644 --- a/xarray/tests/test_concat.py +++ b/xarray/tests/test_concat.py @@ -177,7 +177,7 @@ def test_concat_errors(self): with raises_regex(ValueError, "are not coordinates"): concat([data, data], "new_dim", coords=["not_found"]) - with raises_regex(ValueError, "global attributes are not"): + with raises_regex(ValueError, "global attributes not"): data0, data1 = deepcopy(split_data) data1.attrs["foo"] = "bar" concat([data0, data1], "dim1", compat="identical")