Fix random test failure

This commit is contained in:
Matthias 2021-08-09 11:18:18 +02:00
parent f3c603073e
commit f17942b68f
2 changed files with 5 additions and 0 deletions

View File

@ -130,6 +130,9 @@ class Backtesting:
self.abort = False
def __del__(self):
self.cleanup()
def cleanup(self):
LoggingMixin.show_output = True
PairLocks.use_db = True
Trade.use_db = True

View File

@ -535,6 +535,8 @@ def test_backtest__enter_trade(default_conf, fee, mocker) -> None:
trade = backtesting._enter_trade(pair, row=row)
assert trade is None
backtesting.cleanup()
def test_backtest_one(default_conf, fee, mocker, testdatadir) -> None:
default_conf['use_sell_signal'] = False