Test calling base Illumination

This commit is contained in:
Joe Knapper 2026-02-11 16:13:32 +00:00
parent 7da3dbbf8f
commit 3423d4ed0e

View file

@ -5,11 +5,19 @@ import pytest
from labthings_fastapi.testing import create_thing_without_server from labthings_fastapi.testing import create_thing_without_server
from openflexure_microscope_server.things.illumination import ( from openflexure_microscope_server.things.illumination import (
Illumination,
SangaIllumination, SangaIllumination,
SimulatorIllumination, SimulatorIllumination,
) )
def test_base_illumination_flash_not_implemented():
"""Check that calling flash on the base Illumination raises NotImplementedError."""
ill = create_thing_without_server(Illumination)
with pytest.raises(NotImplementedError, match="Flashing the LED can only be done"):
ill.flash(number_of_flashes=1, dt=0.01)
@pytest.fixture @pytest.fixture
def sanga_mock_stage(): def sanga_mock_stage():
"""Return a SangaIllumination with a mocked stage.""" """Return a SangaIllumination with a mocked stage."""