From ef9dd0676cf0de365967d4e0108162957dc100bc Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 2 May 2021 20:06:47 +0200 Subject: [PATCH] Rename hyperoptresult fixture to avoid naming collision --- tests/commands/test_commands.py | 8 ++++---- tests/conftest.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/commands/test_commands.py b/tests/commands/test_commands.py index d86bced5d..9195a1a92 100644 --- a/tests/commands/test_commands.py +++ b/tests/commands/test_commands.py @@ -918,10 +918,10 @@ def test_start_test_pairlist(mocker, caplog, tickers, default_conf, capsys): captured.out) -def test_hyperopt_list(mocker, capsys, caplog, hyperopt_results): +def test_hyperopt_list(mocker, capsys, caplog, saved_hyperopt_results): mocker.patch( 'freqtrade.optimize.hyperopt_tools.HyperoptTools.load_previous_results', - MagicMock(return_value=hyperopt_results) + MagicMock(return_value=saved_hyperopt_results) ) args = [ @@ -1150,10 +1150,10 @@ def test_hyperopt_list(mocker, capsys, caplog, hyperopt_results): f.unlink() -def test_hyperopt_show(mocker, capsys, hyperopt_results): +def test_hyperopt_show(mocker, capsys, saved_hyperopt_results): mocker.patch( 'freqtrade.optimize.hyperopt_tools.HyperoptTools.load_previous_results', - MagicMock(return_value=hyperopt_results) + MagicMock(return_value=saved_hyperopt_results) ) args = [ diff --git a/tests/conftest.py b/tests/conftest.py index 788586134..ffb09cc60 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1778,7 +1778,7 @@ def open_trade(): @pytest.fixture -def hyperopt_results(): +def saved_hyperopt_results(): return [ { 'loss': 0.4366182531161519,