Fix failing backtest test

This commit is contained in:
Matthias 2023-03-26 18:21:21 +02:00
parent 80a27bc0db
commit 72284317c2

View File

@ -930,9 +930,9 @@ def test_backtest_results(default_conf, fee, mocker, caplog, data: BTContainer)
frame = _build_backtest_dataframe(data.data) frame = _build_backtest_dataframe(data.data)
backtesting = Backtesting(default_conf) backtesting = Backtesting(default_conf)
# TODO: Should we initialize this properly?? # TODO: Should we initialize this properly??
backtesting._can_short = True
backtesting.trading_mode = TradingMode.MARGIN backtesting.trading_mode = TradingMode.MARGIN
backtesting._set_strategy(backtesting.strategylist[0]) backtesting._set_strategy(backtesting.strategylist[0])
backtesting._can_short = True
backtesting.required_startup = 0 backtesting.required_startup = 0
backtesting.strategy.advise_entry = lambda a, m: frame backtesting.strategy.advise_entry = lambda a, m: frame
backtesting.strategy.advise_exit = lambda a, m: frame backtesting.strategy.advise_exit = lambda a, m: frame