fix tests after changing the dumping and pickling dataframe in hyperopt
This commit is contained in:
parent
3a7056ea1b
commit
9dbe0f50a3
@ -187,6 +187,7 @@ def test_roi_table_generation(init_hyperopt) -> None:
|
|||||||
|
|
||||||
|
|
||||||
def test_start_calls_optimizer(mocker, init_hyperopt, default_conf, caplog) -> None:
|
def test_start_calls_optimizer(mocker, init_hyperopt, default_conf, caplog) -> None:
|
||||||
|
dumper = mocker.patch('freqtrade.optimize.hyperopt.dump', MagicMock())
|
||||||
mocker.patch('freqtrade.optimize.hyperopt.load_data', MagicMock())
|
mocker.patch('freqtrade.optimize.hyperopt.load_data', MagicMock())
|
||||||
mocker.patch('freqtrade.optimize.hyperopt.multiprocessing.cpu_count', MagicMock(return_value=1))
|
mocker.patch('freqtrade.optimize.hyperopt.multiprocessing.cpu_count', MagicMock(return_value=1))
|
||||||
parallel = mocker.patch(
|
parallel = mocker.patch(
|
||||||
@ -208,6 +209,7 @@ def test_start_calls_optimizer(mocker, init_hyperopt, default_conf, caplog) -> N
|
|||||||
parallel.assert_called_once()
|
parallel.assert_called_once()
|
||||||
|
|
||||||
assert 'Best result:\nfoo result\nwith values:\n{}' in caplog.text
|
assert 'Best result:\nfoo result\nwith values:\n{}' in caplog.text
|
||||||
|
assert dumper.called
|
||||||
|
|
||||||
|
|
||||||
def test_format_results(init_hyperopt):
|
def test_format_results(init_hyperopt):
|
||||||
@ -316,6 +318,7 @@ def test_generate_optimizer(mocker, init_hyperopt, default_conf) -> None:
|
|||||||
MagicMock(return_value=backtest_result)
|
MagicMock(return_value=backtest_result)
|
||||||
)
|
)
|
||||||
patch_exchange(mocker)
|
patch_exchange(mocker)
|
||||||
|
mocker.patch('freqtrade.optimize.hyperopt.load', MagicMock())
|
||||||
|
|
||||||
optimizer_param = {
|
optimizer_param = {
|
||||||
'adx-value': 0,
|
'adx-value': 0,
|
||||||
|
Loading…
Reference in New Issue
Block a user