diff --git a/xarray/tests/test_combine.py b/xarray/tests/test_combine.py index 6037669ac07..379f661917d 100644 --- a/xarray/tests/test_combine.py +++ b/xarray/tests/test_combine.py @@ -756,7 +756,7 @@ def test_auto_combine(self): auto_combine(objs) objs = [Dataset({"x": [0], "y": [0]}), Dataset({"x": [0]})] - with raises_regex(ValueError, "'y' is not present in all datasets"): + with raises_regex(KeyError, "'y'"): auto_combine(objs) def test_auto_combine_previously_failed(self):