Fix random test failure
This commit is contained in:
parent
f3c603073e
commit
f17942b68f
@ -130,6 +130,9 @@ class Backtesting:
|
|||||||
self.abort = False
|
self.abort = False
|
||||||
|
|
||||||
def __del__(self):
|
def __del__(self):
|
||||||
|
self.cleanup()
|
||||||
|
|
||||||
|
def cleanup(self):
|
||||||
LoggingMixin.show_output = True
|
LoggingMixin.show_output = True
|
||||||
PairLocks.use_db = True
|
PairLocks.use_db = True
|
||||||
Trade.use_db = True
|
Trade.use_db = True
|
||||||
|
@ -535,6 +535,8 @@ def test_backtest__enter_trade(default_conf, fee, mocker) -> None:
|
|||||||
trade = backtesting._enter_trade(pair, row=row)
|
trade = backtesting._enter_trade(pair, row=row)
|
||||||
assert trade is None
|
assert trade is None
|
||||||
|
|
||||||
|
backtesting.cleanup()
|
||||||
|
|
||||||
|
|
||||||
def test_backtest_one(default_conf, fee, mocker, testdatadir) -> None:
|
def test_backtest_one(default_conf, fee, mocker, testdatadir) -> None:
|
||||||
default_conf['use_sell_signal'] = False
|
default_conf['use_sell_signal'] = False
|
||||||
|
Loading…
Reference in New Issue
Block a user