fix(tests): accept _internal kwarg in tomo_scan_projection test doubles
7d64b49 added an _internal kwarg to LamNI.tomo_scan_projection() (used
by tomo_alignment_scan/_at_each_angle to skip the redundant per-angle
filter-out-of-beam check) but left three tests' fake/lambda
replacements without it, causing them to fail in CI with
"got an unexpected keyword argument '_internal'".
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FFeiCHv3qUxxssmP9Qzhom
This commit was merged in pull request #317.
This commit is contained in:
@@ -97,7 +97,7 @@ def test_tomo_alignment_scan_runs_12_projections_across_360(monkeypatch):
|
||||
lamni = make_lamni(monkeypatch, xray_eye_fit=[[0.0, 0.0, 0.0], [0.0, 0.0, 0.0]])
|
||||
calls = []
|
||||
|
||||
def _fake_projection(angle):
|
||||
def _fake_projection(angle, _internal=False):
|
||||
calls.append(angle)
|
||||
builtins.__dict__["bec"].queue.next_scan_number += 1
|
||||
|
||||
@@ -115,7 +115,7 @@ def test_tomo_alignment_scan_runs_12_projections_across_360(monkeypatch):
|
||||
|
||||
def test_tomo_alignment_scan_rotates_back_to_zero(monkeypatch):
|
||||
lamni = make_lamni(monkeypatch, xray_eye_fit=[[0.0, 0.0, 0.0], [0.0, 0.0, 0.0]])
|
||||
lamni.tomo_scan_projection = lambda angle: None
|
||||
lamni.tomo_scan_projection = lambda angle, _internal=False: None
|
||||
umv_calls = []
|
||||
monkeypatch.setattr(lamni_module, "umv", lambda *a: umv_calls.append(a), raising=False)
|
||||
|
||||
|
||||
@@ -208,7 +208,7 @@ def test_at_each_angle_default_path_unchanged_without_hook():
|
||||
behaviour lamni had before this port: tomo_scan_projection + tomo_reconstruct."""
|
||||
lamni = make_lamni()
|
||||
calls = []
|
||||
lamni.tomo_scan_projection = lambda angle: calls.append(("projection", angle))
|
||||
lamni.tomo_scan_projection = lambda angle, _internal=False: calls.append(("projection", angle))
|
||||
lamni.tomo_reconstruct = lambda: calls.append(("reconstruct",))
|
||||
|
||||
lamni._at_each_angle(30.0)
|
||||
|
||||
Reference in New Issue
Block a user