diff --git a/satpy/tests/writer_tests/test_cf.py b/satpy/tests/writer_tests/test_cf.py index 59f31cf0ff..0e4e442586 100644 --- a/satpy/tests/writer_tests/test_cf.py +++ b/satpy/tests/writer_tests/test_cf.py @@ -1450,5 +1450,12 @@ def _get_compression_params(complevel): def _should_use_compression_keyword(): + # xarray currently ignores the "compression" keyword, see + # https://github.com/pydata/xarray/issues/7388. There's already an open + # PR, so we assume that this will be fixed in the next minor release + # (current release is 2023.02). If not, tests will fail and remind us. versions = _get_backend_versions() - return versions["libnetcdf"] >= Version("4.9.0") + return ( + versions["libnetcdf"] >= Version("4.9.0") and + versions["xarray"] >= Version("2023.03") + )