From b106c886309f446861bd01b4062e3e285c23a3ff Mon Sep 17 00:00:00 2001 From: Matthias Date: Tue, 2 Jun 2020 13:08:21 +0200 Subject: [PATCH] Add test case for strategy overwriting --- tests/strategy/test_strategy.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/strategy/test_strategy.py b/tests/strategy/test_strategy.py index f2cf11712..85cb8c132 100644 --- a/tests/strategy/test_strategy.py +++ b/tests/strategy/test_strategy.py @@ -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'})