From dce4539e82027f2b4897b5bf2a171eb907d55ce8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kai=20M=C3=BChlbauer?= Date: Mon, 23 Sep 2024 09:00:44 +0200 Subject: [PATCH] check for invalid_netcdf warning, too --- xarray/tests/test_backends.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xarray/tests/test_backends.py b/xarray/tests/test_backends.py index e5fc3d05493..4d267966ee2 100644 --- a/xarray/tests/test_backends.py +++ b/xarray/tests/test_backends.py @@ -1866,6 +1866,8 @@ def test_encoding_enum__no_fill_value(self, recwarn): if self.engine == "h5netcdf": if not has_h5netcdf_1_4_0_or_above: save_kwargs["invalid_netcdf"] = True + expected_warnings = 1 + expected_msg = "You are writing invalid netcdf features to file" else: expected_warnings = 1 expected_msg = "Creating variable with default fill_value 0 which IS defined in enum type"