Merge branch 'stitching-two' into 'v3'

Stitch 2 images

See merge request openflexure/openflexure-microscope-server!630
This commit is contained in:
Joe Knapper 2026-06-30 17:31:00 +00:00
commit f35ad17449
4 changed files with 18 additions and 9 deletions

View file

@ -333,10 +333,19 @@ def test_stitch_all_scans_continues_after_error(mocker, caplog, smart_scan_thing
mocker.Mock(name="scan1", dzi=None),
mocker.Mock(name="scan2", dzi=None),
mocker.Mock(name="scan3", dzi=None),
mocker.Mock(name="scan4", dzi=None),
]
scans[0].name = "scan1"
scans[1].name = "scan2"
scans[2].name = "scan3"
scans[3].name = "scan4"
# stitch_all skips any scans with less than 2 images, without logging
scans[0].number_of_images = 10
scans[1].number_of_images = 10
scans[2].number_of_images = 1
scans[3].number_of_images = 10
mocker.patch.object(
smart_scan_thing,
@ -373,9 +382,10 @@ def test_stitch_all_scans_continues_after_error(mocker, caplog, smart_scan_thing
messages = [r.message for r in caplog.records]
# scan3 is not logged as there is only 1 image so it is ignored by ``stitch_all_scans``
assert messages == [
"Stitching scan1",
"Stitching scan2",
"Stitching failed: test_message",
"Stitching scan3",
"Stitching scan4",
]