Skip to content

Commit

Permalink
Update test_expected_dimensions
Browse files Browse the repository at this point in the history
  • Loading branch information
tcompa committed Jun 13, 2023
1 parent 905af27 commit 461c5de
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions tests/test_workflows_napari_workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,19 +359,22 @@ def test_fail_if_no_relabeling(


cases = [
(2, 2, True),
(2, 3, False),
(3, 3, True),
(3, 2, True),
(2, 2, True, True),
(2, 2, False, True),
(3, 2, True, False),
(3, 2, False, True),
(2, 3, False, False),
(3, 3, False, True),
]


@pytest.mark.parametrize(
"expected_dimensions,zarr_dimensions,expected_success", cases
"expected_dimensions,zarr_dimensions,make_CYX,expected_success", cases
)
def test_expected_dimensions(
expected_dimensions: int,
zarr_dimensions: int,
make_CYX: bool,
expected_success: bool,
tmp_path: Path,
testdata_path: Path,
Expand All @@ -387,8 +390,11 @@ def test_expected_dimensions(
zenodo_zarr,
zenodo_zarr_metadata,
remove_labels=True,
make_CYX=make_CYX,
)
else:
if make_CYX:
raise ValueError(f"{make_CYX=} and {zarr_dimensions=}")
metadata = prepare_3D_zarr(
str(zarr_path), zenodo_zarr, zenodo_zarr_metadata
)
Expand Down Expand Up @@ -425,8 +431,9 @@ def test_expected_dimensions(
if expected_success:
napari_workflows_wrapper(**arguments)
else:
with pytest.raises(ValueError):
with pytest.raises(ValueError) as e:
napari_workflows_wrapper(**arguments)
debug(e.value)


def test_napari_workflow_empty_input_ROI_table(
Expand Down

0 comments on commit 461c5de

Please sign in to comment.