Add test case for strategy overwriting
This commit is contained in:
parent
a8005819c9
commit
b106c88630
@ -358,8 +358,9 @@ def test_deprecate_populate_indicators(result, default_conf):
|
||||
|
||||
|
||||
@pytest.mark.filterwarnings("ignore:deprecated")
|
||||
def test_call_deprecated_function(result, monkeypatch, default_conf):
|
||||
def test_call_deprecated_function(result, monkeypatch, default_conf, caplog):
|
||||
default_location = Path(__file__).parent / "strats"
|
||||
del default_conf['timeframe']
|
||||
default_conf.update({'strategy': 'TestStrategyLegacy',
|
||||
'strategy_path': default_location})
|
||||
strategy = StrategyResolver.load_strategy(default_conf)
|
||||
@ -385,6 +386,9 @@ def test_call_deprecated_function(result, monkeypatch, default_conf):
|
||||
assert isinstance(selldf, DataFrame)
|
||||
assert 'sell' in selldf
|
||||
|
||||
assert log_has('DEPRECATED: Please migrate to using timeframe instead of ticker_interval.',
|
||||
caplog)
|
||||
|
||||
|
||||
def test_strategy_interface_versioning(result, monkeypatch, default_conf):
|
||||
default_conf.update({'strategy': 'DefaultStrategy'})
|
||||
|
Loading…
Reference in New Issue
Block a user