fix: restore stage-based Alpha check classification
This commit is contained in:
@@ -37,10 +37,10 @@ def checks(failures):
|
||||
(None, "PENDING"),
|
||||
([None], "PENDING"),
|
||||
([{}], "PENDING"),
|
||||
([{"name": "LOW_SHARPE", "result": "WARNING"}], "PENDING"),
|
||||
([{"name": "LOW_SHARPE", "result": "WARNING"}], "PRE_CHECK"),
|
||||
([{"name": "LOW_SHARPE", "result": "PASS"}], "PRE_CHECK"),
|
||||
([{"name": "PROD_CORRELATION", "result": "PENDING"}], "PENDING"),
|
||||
(checks(0), "PASS"),
|
||||
([{"name": "PROD_CORRELATION", "result": "PENDING"}], "PRE_CHECK"),
|
||||
(checks(0), "PRE_CHECK"),
|
||||
(checks(1), "FAIL_1"),
|
||||
(checks(2), "FAIL_2"),
|
||||
(checks(3), "FAIL_2"),
|
||||
@@ -58,7 +58,7 @@ async def test_checks_filter_before_pagination_and_share_export_scope(app, logge
|
||||
for check_type, expected in [
|
||||
("FAIL_1", ["failed1"]),
|
||||
("FAIL_2", ["failed2", "failed3"]),
|
||||
("PASS", ["failed0"]),
|
||||
("PRE_CHECK", ["failed0"]),
|
||||
("PENDING", ["unknown"]),
|
||||
]:
|
||||
response = await logged_in.get(
|
||||
@@ -218,7 +218,7 @@ def test_migration_backfills_multiple_batches_and_preserves_research(tmp_path, m
|
||||
rows = db.execute(sa.select(alphas).order_by(alphas.c.id)).mappings().all()
|
||||
assert len(rows) == 503
|
||||
for i, row in enumerate(rows):
|
||||
expected = snapshot_columns(row["settings"], row["is_metrics"], checks(i % 4))
|
||||
expected = snapshot_columns(row["settings"], row["is_metrics"], checks(i % 4), checked=True)
|
||||
assert {key: row[key] for key in expected} == expected
|
||||
record = db.execute(sa.select(research)).mappings().one()
|
||||
assert record["tags"] == ["PPAC"] and record["note"] == "keep" and record["version"] == 7
|
||||
|
||||
Reference in New Issue
Block a user