diff --git a/xarray/tests/test_backends.py b/xarray/tests/test_backends.py index 70dd791175d..cfcef93fc40 100644 --- a/xarray/tests/test_backends.py +++ b/xarray/tests/test_backends.py @@ -632,7 +632,9 @@ def test_roundtrip_boolean_dtype(self) -> None: with self.roundtrip(original) as actual: assert_identical(original, actual) assert actual["x"].dtype == "bool" - assert actual["x"].encoding["dtype"] == "bool" + with self.roundtrip(actual) as actual2: + assert_identical(original, actual2) + assert actual2["x"].dtype == "bool" def test_orthogonal_indexing(self) -> None: in_memory = create_test_data()