Skip to content

Commit

Permalink
use roundtrip method instead of explicit alternative
Browse files Browse the repository at this point in the history
  • Loading branch information
d-v-b committed Dec 10, 2024
1 parent f82659d commit 107c4e7
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions xarray/tests/test_backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,12 +409,8 @@ def test_zero_dimensional_variable(self) -> None:

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)
with self.roundtrip(expected) as actual:
assert_identical(actual, expected)

def check_dtypes_roundtripped(self, expected, actual):
for k in expected.variables:
Expand Down

0 comments on commit 107c4e7

Please sign in to comment.