Skip to content

Commit

Permalink
test: Update tests for short-circuit behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
xmatthias committed Jan 14, 2025
1 parent 2697ac3 commit a13feaf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/optimize/test_backtesting.py
Original file line number Diff line number Diff line change
Expand Up @@ -1647,8 +1647,8 @@ def _trend_alternate_hold(dataframe=None, metadata=None):
if use_detail:
# Backtest loop is called once per candle per pair
# 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_500
assert bl_spy.call_count > 1_220
assert bl_spy.call_count < 1_300
else:
assert bl_spy.call_count < 995

Expand Down Expand Up @@ -1896,7 +1896,7 @@ def _trend_alternate_hold(dataframe=None, metadata=None):

if use_detail:
# Backtest loop is called once per candle per pair
assert bl_spy.call_count == 1523
assert bl_spy.call_count == 1484
else:
assert bl_spy.call_count == 479

Expand Down

0 comments on commit a13feaf

Please sign in to comment.