diff --git a/ngff_zarr/detect_cli_io_backend.py b/ngff_zarr/detect_cli_io_backend.py index 78cee7b..e72f1ea 100644 --- a/ngff_zarr/detect_cli_io_backend.py +++ b/ngff_zarr/detect_cli_io_backend.py @@ -21,7 +21,7 @@ def detect_cli_io_backend(input: List[str]) -> ConversionBackend: extension = "".join(Path(input[0]).suffixes).lower() - ngff_zarr_supported_extensions = (".zarr",) + ngff_zarr_supported_extensions = (".zarr", ".ome.zarr") if extension in ngff_zarr_supported_extensions: return ConversionBackend.NGFF_ZARR diff --git a/test/test_detect_cli_input_backend.py b/test/test_detect_cli_input_backend.py index 75e2c97..a4440f8 100644 --- a/test/test_detect_cli_input_backend.py +++ b/test/test_detect_cli_input_backend.py @@ -1,6 +1,16 @@ from ngff_zarr import ConversionBackend, detect_cli_io_backend +def test_detect_ngff_zarr_input_backend(): + extension = ".ome.zarr" + backend = detect_cli_io_backend( + [ + f"file{extension}", + ] + ) + assert backend == ConversionBackend.NGFF_ZARR + + def test_detect_itk_input_backend(): extension = ".nrrd" backend = detect_cli_io_backend(