zarr.testing.store
==================

.. py:module:: zarr.testing.store


Classes
-------

.. autoapisummary::

   zarr.testing.store.StoreTests


Module Contents
---------------

.. py:class:: StoreTests

   Bases: :py:obj:`Generic`\ [\ :py:obj:`S`\ , :py:obj:`B`\ ]


   .. py:method:: get(store: S, key: str) -> zarr.core.buffer.Buffer
      :abstractmethod:

      :async:


      
      Retrieve a value from a storage backend, by key.
      This should not not use any store methods. Bypassing the store methods allows them to be
      tested.
















      ..
          !! processed by numpydoc !!


   .. py:method:: open_kwargs(store_kwargs: dict[str, Any]) -> dict[str, Any]


   .. py:method:: set(store: S, key: str, value: zarr.core.buffer.Buffer) -> None
      :abstractmethod:

      :async:


      
      Insert a value into a storage backend, with a specific key.
      This should not not use any store methods. Bypassing the store methods allows them to be
      tested.
















      ..
          !! processed by numpydoc !!


   .. py:method:: store(open_kwargs: dict[str, Any]) -> zarr.abc.store.Store
      :async:



   .. py:method:: store_kwargs() -> dict[str, Any]
      :abstractmethod:


      
      Kwargs for instantiating a store
















      ..
          !! processed by numpydoc !!


   .. py:method:: store_not_open(store_kwargs: dict[str, Any]) -> zarr.abc.store.Store
      :async:



   .. py:method:: test_clear(store: S) -> None
      :async:



   .. py:method:: test_delete(store: S) -> None
      :async:



   .. py:method:: test_delete_dir(store: S) -> None
      :async:



   .. py:method:: test_exists(store: S) -> None
      :async:



   .. py:method:: test_get(store: S, key: str, data: bytes, byte_range: zarr.abc.store.ByteRequest) -> None
      :async:


      
      Ensure that data can be read from the store using the store.get method.
















      ..
          !! processed by numpydoc !!


   .. py:method:: test_get_many(store: S) -> None
      :async:


      
      Ensure that multiple keys can be retrieved at once with the _get_many method.
















      ..
          !! processed by numpydoc !!


   .. py:method:: test_get_not_open(store_not_open: S) -> None
      :async:


      
      Ensure that data can be read from the store that isn't yet open using the store.get method.
















      ..
          !! processed by numpydoc !!


   .. py:method:: test_get_partial_values(store: S, key_ranges: list[tuple[str, zarr.abc.store.ByteRequest]]) -> None
      :async:



   .. py:method:: test_get_raises(store: S) -> None
      :async:


      
      Ensure that a ValueError is raise for invalid byte range syntax
















      ..
          !! processed by numpydoc !!


   .. py:method:: test_getsize(store: S, key: str, data: bytes) -> None
      :async:


      
      Test the result of store.getsize().
















      ..
          !! processed by numpydoc !!


   .. py:method:: test_getsize_prefix(store: S) -> None
      :async:


      
      Test the result of store.getsize_prefix().
















      ..
          !! processed by numpydoc !!


   .. py:method:: test_getsize_raises(store: S) -> None
      :async:


      
      Test that getsize() raise a FileNotFoundError if the key doesn't exist.
















      ..
          !! processed by numpydoc !!


   .. py:method:: test_is_empty(store: S) -> None
      :async:



   .. py:method:: test_list(store: S) -> None
      :async:



   .. py:method:: test_list_dir(store: S) -> None
      :async:



   .. py:method:: test_list_empty_path(store: S) -> None
      :async:


      
      Verify that list and list_prefix work correctly when path is an empty string,
      i.e. no unwanted replacement occurs.
















      ..
          !! processed by numpydoc !!


   .. py:method:: test_list_prefix(store: S) -> None
      :async:


      
      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.
















      ..
          !! processed by numpydoc !!


   .. py:method:: test_read_only_store_raises(open_kwargs: dict[str, Any]) -> None
      :async:



   .. py:method:: test_serializable_store(store: S) -> None
      :async:



   .. py:method:: test_set(store: S, key: str, data: bytes) -> None
      :async:


      
      Ensure that data can be written to the store using the store.set method.
















      ..
          !! processed by numpydoc !!


   .. py:method:: test_set_if_not_exists(store: S) -> None
      :async:



   .. py:method:: test_set_invalid_buffer(store: S) -> None
      :async:


      
      Ensure that set raises a Type or Value Error for invalid buffer arguments.
















      ..
          !! processed by numpydoc !!


   .. py:method:: test_set_many(store: S) -> None
      :async:


      
      Test that a dict of key : value pairs can be inserted into the store via the
      `_set_many` method.
















      ..
          !! processed by numpydoc !!


   .. py:method:: test_set_not_open(store_not_open: S) -> None
      :async:


      
      Ensure that data can be written to the store that's not yet open using the store.set method.
















      ..
          !! processed by numpydoc !!


   .. py:method:: test_store_context_manager(open_kwargs: dict[str, Any]) -> None
      :async:



   .. py:method:: test_store_eq(store: S, store_kwargs: dict[str, Any]) -> None


   .. py:method:: test_store_open_read_only(open_kwargs: dict[str, Any], read_only: bool) -> None
      :async:



   .. py:method:: test_store_read_only(store: S) -> None


   .. py:method:: test_store_repr(store: S) -> None
      :abstractmethod:



   .. py:method:: test_store_supports_listing(store: S) -> None
      :abstractmethod:



   .. py:method:: test_store_supports_partial_writes(store: S) -> None
      :abstractmethod:



   .. py:method:: test_store_supports_writes(store: S) -> None
      :abstractmethod:



   .. py:method:: test_store_type(store: S) -> None


   .. py:attribute:: buffer_cls
      :type:  type[B]


   .. py:attribute:: store_cls
      :type:  type[S]


