fix: restore stage-based Alpha check classification
This commit is contained in:
@@ -8,13 +8,13 @@ LIMIT = {"name": "REGULAR_SUBMISSION", "result": "FAIL", "value": 4, "limit": 4}
|
||||
|
||||
|
||||
@pytest.mark.parametrize("checks,expected", [
|
||||
([{"name": "PROD_CORRELATION", "result": "PASS"}], "PASS"),
|
||||
([{"name": "PROD_CORRELATION", "result": "PASS"}], "PRE_CHECK"),
|
||||
([{"name": "LOW_SHARPE", "result": "PASS"}], "PRE_CHECK"),
|
||||
([{"name": "LOW_SHARPE", "result": "FAIL"}], "FAIL_1"),
|
||||
([], "PENDING"),
|
||||
([None], "PENDING"),
|
||||
([{"name": "UNKNOWN_CHECK", "result": "FAIL"}], "FAIL_1"),
|
||||
([{"name": "PROD_CORRELATION", "result": "PENDING"}], "PENDING"),
|
||||
([{"name": "PROD_CORRELATION", "result": "PENDING"}], "PRE_CHECK"),
|
||||
])
|
||||
def test_limit_does_not_change_alpha_verdict(checks, expected):
|
||||
original = [*checks, LIMIT]
|
||||
@@ -28,7 +28,7 @@ def test_all_limit_states_are_separate(result):
|
||||
from app.alphas import check_summary
|
||||
|
||||
checks = [{"name": "PROD_CORRELATION", "result": "PASS"}, {**LIMIT, "result": result}]
|
||||
summary = check_summary(checks)
|
||||
summary = check_summary(checks, check_type="PASS")
|
||||
assert summary["check_type"] == "PASS"
|
||||
assert summary["submission_limits"]["status"] == ("not_blocked" if result == "PASS" else "unknown")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user