diff --git a/xarray/tests/test_backends.py b/xarray/tests/test_backends.py index 14756c19bb0..ea29517ef44 100644 --- a/xarray/tests/test_backends.py +++ b/xarray/tests/test_backends.py @@ -407,10 +407,14 @@ def test_zero_dimensional_variable(self) -> None: with self.roundtrip(expected) as actual: assert_identical(expected, actual) - def test_write_store(self) -> None: - expected = create_test_data() - with self.roundtrip(expected) as actual: - assert_identical(actual, expected) +def test_write_store(self) -> None: + expected = create_test_data() + with self.create_store() as store: + expected.dump_to_store(store) + # we need to cf decode the store because it has time and + # non-dimension coordinates + with xr.decode_cf(store) as actual: + assert_allclose(expected, actual) def check_dtypes_roundtripped(self, expected, actual): for k in expected.variables: