TEA gate: re-analysis comparison keeps empty values empty

This commit is contained in:
2026-11-29 03:38:20 -06:00
parent 51bcdbdfe3
commit 25955b80e8
+6 -2
View File
@@ -292,9 +292,13 @@ def _reanalysis_by_id_in_local_mode_matches_sync(api, platform):
local = {"scope": {"mode": "ids", "ids": [study_id]}, "execution": {"mode": "local"}}
wait_for(api, ok(api.post("/tea/eegs/analyze", json=local))["run_id"])
after, reanalysed = snapshot()
def close(expected): # a value the analysis leaves empty stays empty
return None if expected is None else pytest.approx(expected, rel=1e-12)
assert after[:2] == before[:2]
assert after[2:] == pytest.approx(before[2:], rel=1e-12)
assert reanalysed == pytest.approx(values, rel=1e-12)
assert list(after[2:]) == [close(v) for v in before[2:]]
assert reanalysed == {code: close(v) for code, v in values.items()}
unknown = {"scope": {"mode": "ids", "ids": ["N9999|2000-01-01"]}}
run_id = ok(api.post("/tea/eegs/analyze", json=unknown))["run_id"]