No starting docstrings with This
This commit is contained in:
parent
f51dae7b3a
commit
be6a6ca6fe
13 changed files with 46 additions and 68 deletions
|
|
@ -1,10 +1,10 @@
|
|||
"""This testing submodule contains mock autofocus things.
|
||||
"""Testing submodule with mock Autofocus Things.
|
||||
|
||||
These mocks are designed to be inserted as dependencies to give specific
|
||||
functionality and returns.
|
||||
These mocks are designed to be inserted as dependencies to provide specific
|
||||
functionality and return values.
|
||||
|
||||
The mocks do not subclass, and instead return very specific defined answers
|
||||
to functions
|
||||
The mocks do not subclass Things. Instead, they return predefined
|
||||
answers to functions.
|
||||
"""
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
"""This testing submodule contains mock background detect things.
|
||||
"""Testing submodule with mock Background Detect Things.
|
||||
|
||||
These mocks are designed to be inserted as dependencies to give specific
|
||||
functionality and returns.
|
||||
These mocks are designed to be inserted as dependencies to provide specific
|
||||
functionality and return values.
|
||||
|
||||
The mocks do not subclass, and instead return very specific defined answers
|
||||
to functions
|
||||
The mocks do not subclass Things. Instead, they return predefined
|
||||
answers to functions.
|
||||
"""
|
||||
|
||||
from openflexure_microscope_server.things.background_detect import ChannelDistributions
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
"""This testing submodule contains mock camera stage mapping things.
|
||||
"""Testing submodule with mock Camera Stage Mapping Things.
|
||||
|
||||
These mocks are designed to be inserted as dependencies to give specific
|
||||
functionality and returns.
|
||||
These mocks are designed to be inserted as dependencies to provide specific
|
||||
functionality and return values.
|
||||
|
||||
The mocks do not subclass, and instead return very specific defined answers
|
||||
to functions
|
||||
The mocks do not subclass Things. Instead, they return predefined
|
||||
answers to functions.
|
||||
"""
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
"""This testing submodule contains stage things.
|
||||
"""Testing submodule with mocks StageThings.
|
||||
|
||||
These mocks are designed to be inserted as dependencies to give specific
|
||||
functionality and returns.
|
||||
These mocks are designed to be inserted as dependencies to provide specific
|
||||
functionality and return values.
|
||||
|
||||
The mocks do not subclass, and instead return very specific defined answers
|
||||
to functions
|
||||
The mocks do not subclass existing Things. Instead, they return predefined
|
||||
answers to functions.
|
||||
"""
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -96,11 +96,11 @@ def test_bad_smart_spiral_settings():
|
|||
|
||||
|
||||
def test_smart_spiral_first_few_pos():
|
||||
"""
|
||||
This test is VERY long, not really a "unit". It checks step-by-step
|
||||
that data is added correctly for the first few postions in a scan.
|
||||
"""Test for correct data addition during initial scan positions.
|
||||
|
||||
This should catch basic cases of if the algorithm is updated.
|
||||
This is a very long test, not strictly a "unit" test. It checks step by step
|
||||
that data is added correctly for the first few positions in a scan. It is
|
||||
intended to catch basic issues if the algorithm is updated.
|
||||
"""
|
||||
intial_position = (100, 50)
|
||||
planner_settings = {"dx": 50, "dy": 50, "max_dist": 10000}
|
||||
|
|
@ -206,12 +206,7 @@ def test_smart_spiral_stops_on_max_dist():
|
|||
|
||||
|
||||
def test_mark_wrong_location():
|
||||
"""
|
||||
This test is VERY long, not really a "unit". It checks step-by-step
|
||||
that data is added correctly for the first few postions in a scan.
|
||||
|
||||
This should catch basic caseses of if the algorithm is updated.
|
||||
"""
|
||||
"""Check that an error is raised if a scan marks the wrong location as visited."""
|
||||
intial_position = (100, 50)
|
||||
planner_settings = {"dx": 50, "dy": 50, "max_dist": 10000}
|
||||
# Create a planner
|
||||
|
|
|
|||
|
|
@ -175,17 +175,11 @@ def _run_only_outer_scan(adjust_inital_state: Optional[Callable] = None):
|
|||
bkgrnd_det_mock = MockBackgoundDetectThing()
|
||||
|
||||
class MockedSmartScanThing(SmartScanThing):
|
||||
"""
|
||||
This is a subclass of SmartScanThing with a mocked method and
|
||||
mocked thing_settings.
|
||||
"""
|
||||
"""Mocked version of SmartScanThing with a patched _run_scan method."""
|
||||
|
||||
# Counter for checking functions were called
|
||||
mock_call_count = {"_run_scan": 0}
|
||||
|
||||
# Mock thing settings as a dictionary
|
||||
thing_settings = {"skip_background": True}
|
||||
|
||||
def _run_scan(self):
|
||||
self.mock_call_count["_run_scan"] += 1
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
"""
|
||||
This sub-package contains utilities that help with testing and debugging.
|
||||
Utilities for testing and debugging.
|
||||
|
||||
At the top level are some very basic testing functions, more specific testing
|
||||
is provided by modules inside the package.
|
||||
At the top level are some basic testing functions. More specific testing utilities are
|
||||
provided by modules inside the package.
|
||||
"""
|
||||
|
||||
from typing import Protocol, Iterable
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue