fix(tests): accept _internal kwarg in tomo_scan_projection test doubles
CI for csaxs_bec / test (pull_request) Successful in 2m6s
Read the Docs Deploy Trigger / trigger-rtd-webhook (push) Successful in 2s
CI for csaxs_bec / test (push) Successful in 2m8s

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:
x12sa
2026-09-15 08:27:47 +02:00
co-authored by Claude Sonnet 5
parent f916b2cec1
commit cc93d563bf
2 changed files with 3 additions and 3 deletions
@@ -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)