Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
jhamman committed Apr 19, 2024
1 parent 775dccd commit af56384
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion zarr/tests/test_storage_v3.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@
import pytest

import zarr
from zarr._storage.store import _get_hierarchy_metadata, v3_api_available, StorageTransformer
from zarr._storage.store import (
_get_hierarchy_metadata,
assert_zarr_v3_api_available,
v3_api_available,
StorageTransformer,
)
from zarr._storage.v3_storage_transformers import ShardingStorageTransformer, v3_sharding_available
from zarr.core import Array
from zarr.meta import _default_entry_point_metadata_v3
Expand Down Expand Up @@ -678,6 +683,14 @@ def test_top_level_imports():
assert not hasattr(zarr, store_name) # pragma: no cover


def test_assert_zarr_v3_api_available_warns_once():
with pytest.warns() as record:
assert_zarr_v3_api_available()
assert_zarr_v3_api_available()
assert len(record) == 1
assert "The experimental Zarr V3 implementation" in str(record[0].message)


def _get_public_and_dunder_methods(some_class):
return set(
name
Expand Down

0 comments on commit af56384

Please sign in to comment.