Skip to content

Commit

Permalink
flake8 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
grlee77 committed Sep 21, 2022
1 parent dbdf63f commit f9c14e0
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions xarray/tests/test_backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -2565,30 +2565,29 @@ def create_store(self):
class ZarrBaseV3(ZarrBase):
def test_roundtrip_coordinates_with_space(self):
original = Dataset(coords={"x": 0, "y z": 1})
expected = Dataset({"y z": 1}, {"x": 0})
with pytest.warns(SerializationWarning):
# v3 stores do not allow spaces in the key name
with pytest.raises(ValueError):
with self.roundtrip(original) as actual:
with self.roundtrip(original):
pass


@pytest.mark.skipif(not have_zarr_v3, reason=f"requires zarr version 3")
@pytest.mark.skipif(not have_zarr_v3, reason="requires zarr version 3")
class TestZarrKVStoreV3(ZarrBaseV3):
@contextlib.contextmanager
def create_zarr_target(self):
yield KVStoreV3({})


@pytest.mark.skipif(not have_zarr_v3, reason=f"requires zarr version 3")
@pytest.mark.skipif(not have_zarr_v3, reason="requires zarr version 3")
class TestZarrDirectoryStoreV3(ZarrBaseV3):
@contextlib.contextmanager
def create_zarr_target(self):
with create_tmp_file(suffix=".zr3") as tmp:
yield DirectoryStoreV3(tmp)


@pytest.mark.skipif(not have_zarr_v3, reason=f"requires zarr version 3")
@pytest.mark.skipif(not have_zarr_v3, reason="requires zarr version 3")
class TestZarrDirectoryStoreV3FromPath(TestZarrDirectoryStoreV3):
# Must specify zarr_version=3 to get a v3 store because create_zarr_target
# is a string path.
Expand Down

0 comments on commit f9c14e0

Please sign in to comment.