From a660880621063a8eb34ed9d2359fba4bcb9e842f Mon Sep 17 00:00:00 2001 From: Ben Williams Date: Tue, 24 Aug 2021 15:57:14 +0100 Subject: [PATCH 1/3] Circumvent Codecov's legitimate complaint Codecov recognises that we aren't testing with fsspec. Perhaps it is less picky if we use pytest.param to parametrise the tests. --- zarr/tests/test_dim_separator.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/zarr/tests/test_dim_separator.py b/zarr/tests/test_dim_separator.py index b05280c00d..18e1ffc3da 100644 --- a/zarr/tests/test_dim_separator.py +++ b/zarr/tests/test_dim_separator.py @@ -7,6 +7,9 @@ from zarr.tests.util import have_fsspec +needs_fsspec = pytest.mark.skipif(not have_fsspec, reason="needs fsspec") + + @pytest.fixture(params=("static_nested", "static_flat", "directory_nested", @@ -14,9 +17,9 @@ "directory_default", "nesteddirectory_nested", "nesteddirectory_default", - "fs_nested", - "fs_flat", - "fs_default")) + pytest.param("fs_nested", marks=needs_fsspec), + pytest.param("fs_flat", marks=needs_fsspec), + pytest.param("fs_default", marks=needs_fsspec))) def dataset(tmpdir, request): """ Generate a variety of different Zarrs using @@ -39,8 +42,6 @@ def dataset(tmpdir, request): elif which.startswith("nested"): store_class = NestedDirectoryStore else: - if have_fsspec is False: - pytest.skip("no fsspec") # pragma: no cover store_class = FSStore kwargs["mode"] = "w" kwargs["auto_mkdir"] = True @@ -63,7 +64,7 @@ def test_open(dataset): verify(zarr.open(dataset)) -@pytest.mark.skipif(have_fsspec is False, reason="needs fsspec") +@needs_fsspec def test_fsstore(dataset): verify(Array(store=FSStore(dataset))) From f6c46d087bf7ffb27870a031f93830bf75fb9450 Mon Sep 17 00:00:00 2001 From: Ben Williams Date: Tue, 24 Aug 2021 16:38:42 +0100 Subject: [PATCH 2/3] Add a release note --- docs/release.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/release.rst b/docs/release.rst index ca81f68b2d..aa20a358a9 100644 --- a/docs/release.rst +++ b/docs/release.rst @@ -6,6 +6,12 @@ Release notes Unreleased ---------- +Maintenance +~~~~~~~~~~~ + +* Mark the fact that some tests that require ``fsspec``, compromising the code coverage score. + By :user:`Ben Williams `; :issue:`823`. + .. _release_2.9.2: 2.9.2 From b558e620d79869595deead373148445d94632c26 Mon Sep 17 00:00:00 2001 From: Ben Williams Date: Tue, 24 Aug 2021 16:43:57 +0100 Subject: [PATCH 3/3] Correct typo --- docs/release.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/release.rst b/docs/release.rst index aa20a358a9..c215b0f9cd 100644 --- a/docs/release.rst +++ b/docs/release.rst @@ -9,7 +9,7 @@ Unreleased Maintenance ~~~~~~~~~~~ -* Mark the fact that some tests that require ``fsspec``, compromising the code coverage score. +* Mark the fact that some tests that require ``fsspec``, without compromising the code coverage score. By :user:`Ben Williams `; :issue:`823`. .. _release_2.9.2: