Skip to content

Commit 191c012

Browse files
committed
fixup
1 parent d776ead commit 191c012

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

tests/conftest.py

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from zarr.storage.remote import RemoteStore
1919

2020
if TYPE_CHECKING:
21-
from collections.abc import Generator, AsyncGenerator
21+
from collections.abc import AsyncGenerator, Generator
2222
from typing import Any, Literal
2323

2424
import botocore
@@ -42,7 +42,7 @@ async def parse_store(
4242
s3: s3fs.S3FileSystem, # type: ignore[name-defined]
4343
) -> LocalStore | MemoryStore | RemoteStore | ZipStore:
4444
"""
45-
Take a string representation of a store and convert that string representation
45+
Take a string representation of a store and convert that string representation
4646
into the appropriate store object, which is then returned.
4747
"""
4848

@@ -54,14 +54,24 @@ async def parse_store(
5454
case "remote":
5555
return RemoteStore(fs=s3, path=test_bucket_name, read_only=False)
5656
case "zip":
57-
_store = await ZipStore.open(path + "/zarr.zip", read_only=False, mode='w')
58-
return _store
57+
return await ZipStore.open(path + "/zarr.zip", read_only=False, mode="w")
5958

6059
raise AssertionError
6160

6261

6362
@pytest.fixture(params=[str, pathlib.Path])
6463
def path_type(request: pytest.FixtureRequest) -> Any:
64+
"""
65+
A pytest fixture that provides a parameterized path type.
66+
67+
This fixture yields different types of path representations
68+
for testing purposes. The possible types are `str` and
69+
`pathlib.Path`. It can be used to test functions or methods
70+
that need to handle different path type inputs.
71+
72+
Returns:
73+
The path type specified by the current parameter.
74+
"""
6575
return request.param
6676

6777

@@ -77,7 +87,7 @@ async def store(
7787
request: pytest.FixtureRequest,
7888
tmpdir: LEGACY_PATH,
7989
s3: s3fs.S3FileSystem, # type: ignore[name-defined]
80-
) -> AsyncGenerator[Store, None, None]:
90+
) -> AsyncGenerator[Store, None]:
8191
param = request.param
8292
store_instance = await parse_store(param, str(tmpdir), s3)
8393
yield store_instance

0 commit comments

Comments
 (0)