Merge pull request #5046 from freqtrade/list_strategy_hyperopt
allow list-strategies to show if params are hyperoptable
This commit is contained in:
@@ -667,8 +667,13 @@ def test_auto_hyperopt_interface(default_conf):
|
||||
|
||||
# Parameter is disabled - so value from sell_param dict will NOT be used.
|
||||
assert strategy.sell_minusdi.value == 0.5
|
||||
all_params = strategy.detect_all_parameters()
|
||||
assert isinstance(all_params, dict)
|
||||
assert len(all_params['buy']) == 2
|
||||
assert len(all_params['sell']) == 2
|
||||
assert all_params['count'] == 4
|
||||
|
||||
strategy.sell_rsi = IntParameter([0, 10], default=5, space='buy')
|
||||
strategy.__class__.sell_rsi = IntParameter([0, 10], default=5, space='buy')
|
||||
|
||||
with pytest.raises(OperationalException, match=r"Inconclusive parameter.*"):
|
||||
[x for x in strategy._detect_parameters('sell')]
|
||||
[x for x in strategy.detect_parameters('sell')]
|
||||
|
Reference in New Issue
Block a user