Skip to content

Commit

Permalink
Add test for validation of default view
Browse files Browse the repository at this point in the history
  • Loading branch information
imagejan committed Jul 17, 2024
1 parent 1c5011d commit 8a58a2f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/test_mobie_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from mobie.validation import (
validate_dataset,
)
from pydantic import ValidationError

from mobiedantic.generated import (
Dataset,
Expand Down Expand Up @@ -51,6 +52,19 @@ def test_dataset_schema(tmp_path):
validate_dataset(tmp_path, require_local_data=False)


def test_dataset_missing_default_view():
with pytest.raises(ValidationError):
Dataset(
is2D=True,
sources={
'A01_C3': {'image': {'imageData': {'ome.zarr': {'relativePath': '.'}}}}
},
views={
'otherView': {'uiSelectionGroup': 'any', 'isExclusive': True},
},
)


@pytest.mark.parametrize(
'url',
[
Expand Down

0 comments on commit 8a58a2f

Please sign in to comment.