Skip to content

Commit 7a285ff

Browse files
committed
improve codecov
1 parent e22db34 commit 7a285ff

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

tests/test_array.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1335,7 +1335,7 @@ async def test_scalar_array() -> None:
13351335
@pytest.mark.parametrize("store", ["local"], indirect=True)
13361336
@pytest.mark.parametrize("store2", ["local"], indirect=["store2"])
13371337
@pytest.mark.parametrize("src_format", [2, 3])
1338-
@pytest.mark.parametrize("new_format", [2, 3])
1338+
@pytest.mark.parametrize("new_format", [2, 3, None])
13391339
async def test_creation_from_other_zarr_format(
13401340
store: Store,
13411341
store2: Store,
@@ -1365,10 +1365,19 @@ async def test_creation_from_other_zarr_format(
13651365
assert result.fill_value == src.fill_value
13661366
assert result.dtype == src.dtype
13671367
assert result.chunks == src.chunks
1368-
assert result.metadata.zarr_format == new_format
1368+
expected_format = src_format if new_format is None else new_format
1369+
assert result.metadata.zarr_format == expected_format
13691370
if src_format == new_format:
13701371
assert result.metadata == src.metadata
13711372

1373+
result2 = zarr.array(
1374+
data=src,
1375+
store=store2,
1376+
overwrite=True,
1377+
zarr_format=new_format,
1378+
)
1379+
np.testing.assert_array_equal(result2[:], src[:])
1380+
13721381

13731382
@pytest.mark.parametrize("store", ["local", "memory", "zip"], indirect=True)
13741383
@pytest.mark.parametrize("store2", ["local", "memory", "zip"], indirect=["store2"])

0 commit comments

Comments
 (0)