diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/worker/test_backtest.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/worker/test_backtest.py b/tests/worker/test_backtest.py index 30f8e46..cb248ec 100644 --- a/tests/worker/test_backtest.py +++ b/tests/worker/test_backtest.py @@ -103,6 +103,18 @@ def test_synthetic_labeled_runs_next_bar_fill(tmp_path): assert abs(t["commission"] - t["value"] * 0.0003) < 1e-6 +def test_assumptions_out_of_warnings(tmp_path): + """执行假设说明移出用户面 warnings,独立 assumptions 字段承载。""" + from worker.backtest import EXECUTION_ASSUMPTIONS + req, _ = make_request(tmp_path, STRAT) + res = run_backtest(req) + assert res["assumptions"] == EXECUTION_ASSUMPTIONS + for w in res["warnings"]: + assert "execution assumptions" not in w + for k in EXECUTION_ASSUMPTIONS: + assert str(k) not in w + + def test_equity_cash_accounting(tmp_path): req, _ = make_request(tmp_path, STRAT) res = run_backtest(req) |
