From 9d4257c2c05a20b595643b924b8718f2e315f75d Mon Sep 17 00:00:00 2001 From: Gert Wohlgemuth Date: Sat, 19 May 2018 15:34:18 -0700 Subject: [PATCH] merged changes from develop branch --- freqtrade/tests/strategy/test_strategy.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/freqtrade/tests/strategy/test_strategy.py b/freqtrade/tests/strategy/test_strategy.py index 244910790..21d4240ff 100644 --- a/freqtrade/tests/strategy/test_strategy.py +++ b/freqtrade/tests/strategy/test_strategy.py @@ -29,10 +29,17 @@ def test_load_strategy(result): def test_load_strategy_custom_directory(result): resolver = StrategyResolver() extra_dir = os.path.join('some', 'path') - with pytest.raises( - FileNotFoundError, - match=r".*No such file or directory: '{}'".format(extra_dir)): - resolver._load_strategy('TestStrategy', extra_dir) + + if os.name == 'nt': + with pytest.raises( + FileNotFoundError, + match="FileNotFoundError: [WinError 3] The system cannot find the path specified: '{}'".format(extra_dir)): + resolver._load_strategy('TestStrategy', extra_dir) + else: + with pytest.raises( + FileNotFoundError, + match=r".*No such file or directory: '{}'".format(extra_dir)): + resolver._load_strategy('TestStrategy', extra_dir) assert hasattr(resolver.strategy, 'populate_indicators') assert 'adx' in resolver.strategy.populate_indicators(result)