test: clamp test pins BACKTEST_MAX_SESSIONS env (default moved to 300)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
9d0a9df60e
commit
21b38109aa
1 file changed
+2
-1
@@ -166,7 +166,8 @@ def test_replay_window_regime_gate_drops_unfavorable_session():
|
||||
# --------------------------------------------------------------------------
|
||||
# Test plan case 4: /api/backtest?days=9999 -> clamped
|
||||
# --------------------------------------------------------------------------
|
||||
def test_api_backtest_clamped_for_huge_days():
|
||||
def test_api_backtest_clamped_for_huge_days(monkeypatch):
|
||||
monkeypatch.setenv("BACKTEST_MAX_SESSIONS", "45") # cap is env-tunable (default 300)
|
||||
state = DashboardState("momentum")
|
||||
kind, status, payload = _get(state, "/api/backtest?days=9999")
|
||||
assert kind == "json" and status == 200
|
||||
|
||||
Reference in new issue
Block a user