Skip to content

Commit a6bd0a2

Browse files
committed
Fix test_local
1 parent 792f030 commit a6bd0a2

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,8 @@ module = [
359359
"zarr.testing.stateful",
360360
"tests.test_codecs.test_transpose",
361361
"tests.test_config",
362-
"tests.test_store.test_zip"
362+
"tests.test_store.test_zip",
363+
"tests.test_store.test_local",
363364
]
364365
strict = false
365366

@@ -371,7 +372,6 @@ module = [
371372
"tests.test_metadata.*",
372373
"tests.test_store.test_core",
373374
"tests.test_store.test_fsspec",
374-
"tests.test_store.test_local",
375375
"tests.test_store.test_logging",
376376
"tests.test_store.test_memory",
377377
"tests.test_store.test_object",

src/zarr/testing/store.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ async def get(self, store: S, key: str) -> Buffer:
5858

5959
@abstractmethod
6060
@pytest.fixture
61-
def store_kwargs(self) -> dict[str, Any]:
61+
def store_kwargs(self, *args: Any, **kwargs: Any) -> dict[str, Any]:
6262
"""Kwargs for instantiating a store"""
6363
...
6464

tests/test_store/test_local.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ async def set(self, store: LocalStore, key: str, value: Buffer) -> None:
2828
(store.root / key).write_bytes(value.to_bytes())
2929

3030
@pytest.fixture
31-
def store_kwargs(self, tmpdir) -> dict[str, str]:
31+
def store_kwargs(self, tmpdir: str) -> dict[str, str]:
3232
return {"root": str(tmpdir)}
3333

3434
def test_store_repr(self, store: LocalStore) -> None:
@@ -48,24 +48,24 @@ async def test_empty_with_empty_subdir(self, store: LocalStore) -> None:
4848
(store.root / "foo/bar").mkdir(parents=True)
4949
assert await store.is_empty("")
5050

51-
def test_creates_new_directory(self, tmp_path: pathlib.Path):
51+
def test_creates_new_directory(self, tmp_path: pathlib.Path) -> None:
5252
target = tmp_path.joinpath("a", "b", "c")
5353
assert not target.exists()
5454

5555
store = self.store_cls(root=target)
5656
zarr.group(store=store)
5757

58-
def test_invalid_root_raises(self):
58+
def test_invalid_root_raises(self) -> None:
5959
"""
6060
Test that a TypeError is raised when a non-str/Path type is used for the `root` argument
6161
"""
6262
with pytest.raises(
6363
TypeError,
6464
match=r"'root' must be a string or Path instance. Got an instance of <class 'int'> instead.",
6565
):
66-
LocalStore(root=0)
66+
LocalStore(root=0) # type: ignore[arg-type]
6767

68-
async def test_get_with_prototype_default(self, store: LocalStore):
68+
async def test_get_with_prototype_default(self, store: LocalStore) -> None:
6969
"""
7070
Ensure that data can be read via ``store.get`` if the prototype keyword argument is unspecified, i.e. set to ``None``.
7171
"""

0 commit comments

Comments
 (0)