zarr.testing.store#
Classes#
Module Contents#
- class zarr.testing.store.StoreTests[source]#
Bases:
Generic
[S
,B
]- abstract get(store: S, key: str) zarr.core.buffer.Buffer [source]#
- Async:
Retrieve a value from a storage backend, by key. This should not use any store methods. Bypassing the store methods allows them to be tested.
- abstract set(store: S, key: str, value: zarr.core.buffer.Buffer) None [source]#
- Async:
Insert a value into a storage backend, with a specific key. This should not use any store methods. Bypassing the store methods allows them to be tested.
- async store(open_kwargs: dict[str, Any]) zarr.abc.store.Store [source]#
- async store_not_open(store_kwargs: dict[str, Any]) zarr.abc.store.Store [source]#
- async test_get( ) None [source]#
Ensure that data can be read from the store using the store.get method.
- async test_get_many(store: S) None [source]#
Ensure that multiple keys can be retrieved at once with the _get_many method.
- async test_get_not_open(store_not_open: S) None [source]#
Ensure that data can be read from the store that isn’t yet open using the store.get method.
- async test_get_raises(store: S) None [source]#
Ensure that a ValueError is raise for invalid byte range syntax
- async test_getsize(store: S, key: str, data: bytes) None [source]#
Test the result of store.getsize().
- async test_getsize_raises(store: S) None [source]#
Test that getsize() raise a FileNotFoundError if the key doesn’t exist.
- async test_list_empty_path(store: S) None [source]#
Verify that list and list_prefix work correctly when path is an empty string, i.e. no unwanted replacement occurs.
- async test_list_prefix(store: S) None [source]#
Test that the list_prefix method works as intended. Given a prefix, it should return all the keys in storage that start with this prefix.
- async test_set(store: S, key: str, data: bytes) None [source]#
Ensure that data can be written to the store using the store.set method.
- async test_set_many(store: S) None [source]#
Test that a dict of key : value pairs can be inserted into the store via the _set_many method.