Skip to content

Commit b1cff1d

Browse files
committed
added test
1 parent 72010f7 commit b1cff1d

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

tests/semantic_segmentation/test_annotation.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,22 @@ def test_segmentation():
131131
shape=(1, 2),
132132
)
133133

134+
# wrong annotation type
135+
with pytest.raises(ValueError):
136+
Segmentation(
137+
uid="uid",
138+
groundtruths=[{"a": 1}], # type: ignore - testing
139+
predictions=[],
140+
shape=(1, 2),
141+
)
142+
with pytest.raises(ValueError):
143+
Segmentation(
144+
uid="uid",
145+
groundtruths=[],
146+
predictions=[{"a": 1}], # type: ignore - testing
147+
shape=(1, 2),
148+
)
149+
134150

135151
def test_segmentation_shape():
136152
Segmentation(uid="uid", groundtruths=[], predictions=[], shape=(1, 1))

0 commit comments

Comments
 (0)