Support loading results from a specific hyperopt history file

This commit is contained in:
Matthias
2020-09-27 17:00:23 +02:00
parent c42a924df8
commit 3cb1a9a5a9
6 changed files with 31 additions and 5 deletions

View File

@@ -15,6 +15,7 @@ from freqtrade.data.btanalysis import (BT_DATA_COLUMNS,
create_cum_profit,
extract_trades_of_period,
get_latest_backtest_filename,
get_latest_hyperopt_file,
load_backtest_data, load_trades,
load_trades_from_db)
from freqtrade.data.history import load_data, load_pair_history
@@ -43,6 +44,14 @@ def test_get_latest_backtest_filename(testdatadir, mocker):
get_latest_backtest_filename(testdatadir)
def test_get_latest_hyperopt_file(testdatadir, mocker):
res = get_latest_hyperopt_file(testdatadir / 'does_not_exist', 'testfile.pickle')
assert res == testdatadir / 'does_not_exist/testfile.pickle'
res = get_latest_hyperopt_file(testdatadir.parent)
assert res == testdatadir.parent / "hyperopt_results.pickle"
def test_load_backtest_data_old_format(testdatadir):
filename = testdatadir / "backtest-result_test.json"