More changes suggested in review, generally docstring issues.
This commit is contained in:
parent
ad838e8643
commit
51f9df995d
5 changed files with 23 additions and 15 deletions
|
|
@ -11,8 +11,6 @@ from openflexure_microscope_server.things.background_detect import ChannelDistri
|
|||
|
||||
|
||||
class MockBackgoundDetectThing:
|
||||
# Counter for checking functions were called
|
||||
|
||||
background_distributions = ChannelDistributions(
|
||||
means=[128.0, 128.0, 128.0],
|
||||
standard_deviations=[3.0, 3.0, 3.0],
|
||||
|
|
|
|||
|
|
@ -281,7 +281,13 @@ def test_creating_scan_dir_for_missing_scan():
|
|||
|
||||
|
||||
def test_none_returned_for_missing_images_dir():
|
||||
"""None should be returned for image dir path if images dir never created."""
|
||||
"""None should be returned for image dir path if images dir does not exist.
|
||||
|
||||
By default images directories are created at the same time the scan directory
|
||||
is created. However, edge cases such as problems in deletions, microscopes
|
||||
with older scans on, etc can cause and empty scan directory, so it is handled
|
||||
explicitly.
|
||||
"""
|
||||
_clear_scan_dir()
|
||||
os.makedirs(os.path.join(BASE_SCAN_DIR, "fake_scan_0001"))
|
||||
scan_dir = ScanDirectory(BASE_SCAN_DIR, "fake_scan_0001")
|
||||
|
|
|
|||
|
|
@ -54,6 +54,11 @@ def smart_scan_thing():
|
|||
|
||||
|
||||
def test_initial_properties(smart_scan_thing):
|
||||
"""Check the initial values of properties.
|
||||
|
||||
Test properties of SmartScanThing are available without a ThingServer
|
||||
and return expected default values.
|
||||
"""
|
||||
assert smart_scan_thing._scan_dir_manager.base_dir == SCAN_DIR
|
||||
assert smart_scan_thing.latest_scan_name is None
|
||||
|
||||
|
|
@ -125,6 +130,7 @@ def test_public_delete_scan(smart_scan_thing, caplog):
|
|||
|
||||
|
||||
def test_delete_all_scans(smart_scan_thing, caplog):
|
||||
"""Check the delete_all_scan API really does delete all the scans."""
|
||||
_clear_scan_dir()
|
||||
with caplog.at_level(logging.INFO):
|
||||
fake_scan_names = [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue