add fixes for random test failures
This commit is contained in:
parent
041258a549
commit
a1a62681bf
@ -61,7 +61,7 @@ class Hyperopt:
|
||||
"""
|
||||
Hyperopt class, this class contains all the logic to run a hyperopt simulation
|
||||
|
||||
To run a backtest:
|
||||
To start a hyperopt run:
|
||||
hyperopt = Hyperopt(config)
|
||||
hyperopt.start()
|
||||
"""
|
||||
|
@ -6,6 +6,7 @@ import pandas as pd
|
||||
import pytest
|
||||
|
||||
from freqtrade.enums import ExitType, RunMode
|
||||
from freqtrade.optimize.backtesting import Backtesting
|
||||
from freqtrade.optimize.hyperopt import Hyperopt
|
||||
from tests.conftest import patch_exchange
|
||||
|
||||
@ -28,6 +29,13 @@ def hyperopt_conf(default_conf):
|
||||
return hyperconf
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def backtesting_cleanup() -> None:
|
||||
yield None
|
||||
|
||||
Backtesting.cleanup()
|
||||
|
||||
|
||||
@pytest.fixture(scope='function')
|
||||
def hyperopt(hyperopt_conf, mocker):
|
||||
|
||||
|
@ -52,13 +52,6 @@ def trim_dictlist(dict_list, num):
|
||||
return new
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def backtesting_cleanup() -> None:
|
||||
yield None
|
||||
|
||||
Backtesting.cleanup()
|
||||
|
||||
|
||||
def load_data_test(what, testdatadir):
|
||||
timerange = TimeRange.parse_timerange('1510694220-1510700340')
|
||||
data = history.load_pair_history(pair='UNITTEST/BTC', datadir=testdatadir,
|
||||
|
Loading…
Reference in New Issue
Block a user