From 25955b80e8cbc83fb926b276f8d775d289469498 Mon Sep 17 00:00:00 2001 From: alberto Date: Sun, 29 Nov 2026 03:38:20 -0600 Subject: [PATCH] TEA gate: re-analysis comparison keeps empty values empty --- tests/test_tea.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/test_tea.py b/tests/test_tea.py index 4b0020e..568a683 100644 --- a/tests/test_tea.py +++ b/tests/test_tea.py @@ -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"]