mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
Update runmode to 'backtest' in some test cases
This commit is contained in:
parent
582f51ccdd
commit
394c260eb2
|
@ -107,6 +107,7 @@ def test_freqai_backtest_live_models_model_not_found(freqai_conf, mocker, testda
|
|||
|
||||
|
||||
def test_freqai_backtest_consistent_timerange(mocker, freqai_conf):
|
||||
freqai_conf['runmode'] = 'backtest'
|
||||
mocker.patch('freqtrade.plugins.pairlistmanager.PairListManager.whitelist',
|
||||
PropertyMock(return_value=['XRP/USDT:USDT']))
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@ from tests.freqai.conftest import get_patched_freqai_strategy
|
|||
|
||||
|
||||
def test_update_historic_data(mocker, freqai_conf):
|
||||
freqai_conf['runmode'] = 'backtest'
|
||||
strategy = get_patched_freqai_strategy(mocker, freqai_conf)
|
||||
exchange = get_patched_exchange(mocker, freqai_conf)
|
||||
strategy.dp = DataProvider(freqai_conf, exchange)
|
||||
|
|
|
@ -157,6 +157,7 @@ def test_get_pair_data_for_features_with_prealoaded_data(mocker, freqai_conf):
|
|||
|
||||
def test_get_pair_data_for_features_without_preloaded_data(mocker, freqai_conf):
|
||||
freqai_conf.update({"timerange": "20180115-20180130"})
|
||||
freqai_conf['runmode'] = 'backtest'
|
||||
|
||||
strategy = get_patched_freqai_strategy(mocker, freqai_conf)
|
||||
exchange = get_patched_exchange(mocker, freqai_conf)
|
||||
|
|
|
@ -299,8 +299,11 @@ def test_start_backtesting(mocker, freqai_conf, model, num_files, strat, caplog)
|
|||
|
||||
def test_start_backtesting_subdaily_backtest_period(mocker, freqai_conf):
|
||||
freqai_conf.update({"timerange": "20180120-20180124"})
|
||||
freqai_conf.get("freqai", {}).update({"backtest_period_days": 0.5})
|
||||
freqai_conf.get("freqai", {}).update({"save_backtest_models": True})
|
||||
freqai_conf['runmode'] = 'backtest'
|
||||
freqai_conf.get("freqai", {}).update({
|
||||
"backtest_period_days": 0.5,
|
||||
"save_backtest_models": True,
|
||||
})
|
||||
freqai_conf.get("freqai", {}).get("feature_parameters", {}).update(
|
||||
{"indicator_periods_candles": [2]})
|
||||
strategy = get_patched_freqai_strategy(mocker, freqai_conf)
|
||||
|
@ -327,6 +330,7 @@ def test_start_backtesting_subdaily_backtest_period(mocker, freqai_conf):
|
|||
|
||||
def test_start_backtesting_from_existing_folder(mocker, freqai_conf, caplog):
|
||||
freqai_conf.update({"timerange": "20180120-20180130"})
|
||||
freqai_conf['runmode'] = 'backtest'
|
||||
freqai_conf.get("freqai", {}).update({"save_backtest_models": True})
|
||||
freqai_conf.get("freqai", {}).get("feature_parameters", {}).update(
|
||||
{"indicator_periods_candles": [2]})
|
||||
|
@ -390,6 +394,7 @@ def test_start_backtesting_from_existing_folder(mocker, freqai_conf, caplog):
|
|||
|
||||
|
||||
def test_backtesting_fit_live_predictions(mocker, freqai_conf, caplog):
|
||||
freqai_conf['runmode'] = 'backtest'
|
||||
freqai_conf.get("freqai", {}).update({"fit_live_predictions_candles": 10})
|
||||
strategy = get_patched_freqai_strategy(mocker, freqai_conf)
|
||||
exchange = get_patched_exchange(mocker, freqai_conf)
|
||||
|
|
Loading…
Reference in New Issue
Block a user