From 58ecb34a668528da2ed74c4a799a63a12b6e761b Mon Sep 17 00:00:00 2001 From: Matthias Date: Thu, 26 Aug 2021 07:13:18 +0200 Subject: [PATCH] Allow DefaultHyperopts as hyperopt name --- freqtrade/commands/deploy_commands.py | 2 -- tests/commands/test_commands.py | 11 ----------- 2 files changed, 13 deletions(-) diff --git a/freqtrade/commands/deploy_commands.py b/freqtrade/commands/deploy_commands.py index ec558e7b1..c98335e0b 100644 --- a/freqtrade/commands/deploy_commands.py +++ b/freqtrade/commands/deploy_commands.py @@ -126,8 +126,6 @@ def start_new_hyperopt(args: Dict[str, Any]) -> None: config = setup_utils_configuration(args, RunMode.UTIL_NO_EXCHANGE) if 'hyperopt' in args and args['hyperopt']: - if args['hyperopt'] == 'DefaultHyperopt': - raise OperationalException("DefaultHyperopt is not allowed as name.") new_path = config['user_data_dir'] / USERPATH_HYPEROPTS / (args['hyperopt'] + '.py') diff --git a/tests/commands/test_commands.py b/tests/commands/test_commands.py index 0f34f6e10..a2ab37e61 100644 --- a/tests/commands/test_commands.py +++ b/tests/commands/test_commands.py @@ -541,17 +541,6 @@ def test_start_new_hyperopt(mocker, caplog): start_new_hyperopt(get_args(args)) -def test_start_new_hyperopt_DefaultHyperopt(mocker, caplog): - args = [ - "new-hyperopt", - "--hyperopt", - "DefaultHyperopt" - ] - with pytest.raises(OperationalException, - match=r"DefaultHyperopt is not allowed as name\."): - start_new_hyperopt(get_args(args)) - - def test_start_new_hyperopt_no_arg(mocker): args = [ "new-hyperopt",