Skip to content

Commit f2fa389

Browse files
committed
small fixes to tests
1 parent 0bdd6f8 commit f2fa389

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

tests/test_cli/test_migrate_to_v3.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,9 @@ def test_remove_v2_metadata_option_in_place(
167167

168168

169169
async def test_remove_v2_metadata_option_separate_location(
170-
tmp_path: Path, expected_paths_v2_metadata: list[Path]
170+
tmp_path: Path,
171+
expected_paths_v2_metadata: list[Path],
172+
expected_paths_v3_metadata_no_chunks: list[Path],
171173
) -> None:
172174
"""Check that when using --remove-v2-metadata with a separate output location, no v2 metadata is removed from
173175
the input location."""
@@ -189,6 +191,11 @@ async def test_remove_v2_metadata_option_separate_location(
189191
expected_paths = [input_zarr_path / p for p in expected_paths_v2_metadata]
190192
assert paths == expected_paths
191193

194+
# output image should be only v3 metadata
195+
paths = sorted(output_zarr_path.rglob("*"))
196+
expected_paths = [output_zarr_path / p for p in expected_paths_v3_metadata_no_chunks]
197+
assert paths == expected_paths
198+
192199

193200
def test_overwrite_option_in_place(
194201
local_store: Store, expected_paths_v2_v3_metadata: list[Path]
@@ -591,7 +598,9 @@ def test_dry_run(
591598
create_nested_zarr(local_store)
592599

593600
if cli_command == "migrate":
594-
result = runner.invoke(cli.app, ["migrate", "v3", str(local_store.root), "--dry-run"])
601+
result = runner.invoke(
602+
cli.app, ["migrate", "v3", str(local_store.root), "--overwrite", "--force", "--dry-run"]
603+
)
595604
else:
596605
result = runner.invoke(
597606
cli.app, ["remove-metadata", "v2", str(local_store.root), "--force", "--dry-run"]

0 commit comments

Comments
 (0)