Class docstrings

This commit is contained in:
Julian Stirling 2025-07-10 13:26:23 +01:00
parent 11a1fd7f85
commit a30b726b91
16 changed files with 118 additions and 10 deletions

View file

@ -9,6 +9,13 @@ answers to functions.
class MockAutoFocusThing:
"""A mock autofocus Thing that imports no code from AutofocusThing.
The class needs functionality added to it over time as more complex
mocking is needed. It imports no code from AutofocusThing so that coverage
is not artificially inflated.
"""
# Counter for checking functions were called
mock_call_count = {"looping_autofocus": 0}

View file

@ -10,7 +10,14 @@ answers to functions.
from openflexure_microscope_server.things.background_detect import ChannelDistributions
class MockBackgoundDetectThing:
class MockBackgroundDetectThing:
"""A mock background detect Thing that imports no code from BackgroundDetectThing.
The class needs functionality added to it over time as more complex
mocking is needed. It imports no code from BackgroundDetectThing so that coverage
is not artificially inflated.
"""
background_distributions = ChannelDistributions(
means=[128.0, 128.0, 128.0],
standard_deviations=[3.0, 3.0, 3.0],

View file

@ -9,4 +9,11 @@ answers to functions.
class MockCSMThing:
"""A mock CSM Thing that imports no code from CameraStageMapper.
The class needs functionality added to it over time as more complex
mocking is needed. It imports no code from CameraStageMapper so that coverage
is not artificially inflated.
"""
image_resolution = (123, 456)

View file

@ -9,4 +9,11 @@ answers to functions.
class MockStageThing:
"""A mock Thing for a stage that imports no code from BaseStage.
The class needs functionality added to it over time as more complex
mocking is needed. It imports no code from BaseStage so that coverage
is not artificially inflated.
"""
position = (111, 222, 333)