test: Update tests for short-circuit behavior

This commit is contained in:
Matthias
2025-01-14 06:25:24 +01:00
parent 2697ac3581
commit a13feaf49f

View File

@@ -1647,8 +1647,8 @@ def test_backtest_multi_pair_detail(
if use_detail: if use_detail:
# Backtest loop is called once per candle per pair # Backtest loop is called once per candle per pair
# Exact numbers depend on trade state - but should be around 3_800 # Exact numbers depend on trade state - but should be around 3_800
assert bl_spy.call_count > 1_350 assert bl_spy.call_count > 1_220
assert bl_spy.call_count < 1_500 assert bl_spy.call_count < 1_300
else: else:
assert bl_spy.call_count < 995 assert bl_spy.call_count < 995
@@ -1896,7 +1896,7 @@ def test_backtest_multi_pair_long_short_switch(
if use_detail: if use_detail:
# Backtest loop is called once per candle per pair # Backtest loop is called once per candle per pair
assert bl_spy.call_count == 1523 assert bl_spy.call_count == 1484
else: else:
assert bl_spy.call_count == 479 assert bl_spy.call_count == 479