Skip to content

Commit 425c9ed

Browse files
test: add test for ValueError when no stop surface is present
1 parent d89a75d commit 425c9ed

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/test_optic.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,3 +219,9 @@ def test_from_dict(self):
219219
def test_invalid_field_type(self):
220220
with pytest.raises(ValueError):
221221
self.optic.set_field_type('invalid')
222+
223+
def test_no_stop(self):
224+
for surface in self.optic.surface_group.surfaces:
225+
surface.is_stop = False
226+
with pytest.raises(ValueError):
227+
self.optic.surface_group.stop_index

0 commit comments

Comments
 (0)