Skip to content

Commit 77d37b8

Browse files
committed
Add cli test_view
1 parent a86982e commit 77d37b8

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

tests/test_cli.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import pytest
66

77
from ome_zarr.cli import main
8-
from ome_zarr.utils import strip_common_prefix
8+
from ome_zarr.utils import strip_common_prefix, view
99

1010

1111
def directory_items(directory: Path):
@@ -102,3 +102,18 @@ def _rotate_and_test(self, *hierarchy: Path, reverse: bool = True):
102102
secondpass: deque = deque(hierarchy)
103103
secondpass.reverse()
104104
self._rotate_and_test(*list(secondpass), reverse=False)
105+
106+
def test_view(self):
107+
filename = str(self.path) + "-4"
108+
main(["create", "--method=astronaut", filename])
109+
# CLI doesn't support the dry_run option yet
110+
# main(["view", filename, "8000"])
111+
# we need dry_run to be True to avoid blocking the test with server
112+
view(filename, 8000, True)
113+
114+
img_dir = (self.path / "images").mkdir()
115+
main(["create", "--method=astronaut", (str(img_dir / "astronaut"))])
116+
main(["create", "--method=coins", (str(img_dir / "coins"))])
117+
118+
# TODO: check that there is a biofile_finder.csv in img_dir
119+
view(img_dir, 8000, True)

0 commit comments

Comments
 (0)