TEA gate: re-analysis comparison keeps empty values empty
This commit is contained in:
+6
-2
@@ -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"}}
|
local = {"scope": {"mode": "ids", "ids": [study_id]}, "execution": {"mode": "local"}}
|
||||||
wait_for(api, ok(api.post("/tea/eegs/analyze", json=local))["run_id"])
|
wait_for(api, ok(api.post("/tea/eegs/analyze", json=local))["run_id"])
|
||||||
after, reanalysed = snapshot()
|
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] == before[:2]
|
||||||
assert after[2:] == pytest.approx(before[2:], rel=1e-12)
|
assert list(after[2:]) == [close(v) for v in before[2:]]
|
||||||
assert reanalysed == pytest.approx(values, rel=1e-12)
|
assert reanalysed == {code: close(v) for code, v in values.items()}
|
||||||
|
|
||||||
unknown = {"scope": {"mode": "ids", "ids": ["N9999|2000-01-01"]}}
|
unknown = {"scope": {"mode": "ids", "ids": ["N9999|2000-01-01"]}}
|
||||||
run_id = ok(api.post("/tea/eegs/analyze", json=unknown))["run_id"]
|
run_id = ok(api.post("/tea/eegs/analyze", json=unknown))["run_id"]
|
||||||
|
|||||||
Reference in New Issue
Block a user