Increase test coverage
This commit is contained in:
parent
ea5c7e7ed6
commit
a8f28ffb11
@ -735,11 +735,16 @@ def test_auto_hyperopt_interface(default_conf):
|
|||||||
PairLocks.timeframe = default_conf['timeframe']
|
PairLocks.timeframe = default_conf['timeframe']
|
||||||
strategy = StrategyResolver.load_strategy(default_conf)
|
strategy = StrategyResolver.load_strategy(default_conf)
|
||||||
|
|
||||||
|
with pytest.raises(OperationalException):
|
||||||
|
next(strategy.enumerate_parameters('deadBeef'))
|
||||||
|
|
||||||
assert strategy.buy_rsi.value == strategy.buy_params['buy_rsi']
|
assert strategy.buy_rsi.value == strategy.buy_params['buy_rsi']
|
||||||
# PlusDI is NOT in the buy-params, so default should be used
|
# PlusDI is NOT in the buy-params, so default should be used
|
||||||
assert strategy.buy_plusdi.value == 0.5
|
assert strategy.buy_plusdi.value == 0.5
|
||||||
assert strategy.sell_rsi.value == strategy.sell_params['sell_rsi']
|
assert strategy.sell_rsi.value == strategy.sell_params['sell_rsi']
|
||||||
|
|
||||||
|
assert repr(strategy.sell_rsi) == 'IntParameter(74)'
|
||||||
|
|
||||||
# Parameter is disabled - so value from sell_param dict will NOT be used.
|
# Parameter is disabled - so value from sell_param dict will NOT be used.
|
||||||
assert strategy.sell_minusdi.value == 0.5
|
assert strategy.sell_minusdi.value == 0.5
|
||||||
all_params = strategy.detect_all_parameters()
|
all_params = strategy.detect_all_parameters()
|
||||||
|
Loading…
Reference in New Issue
Block a user