merged changes from develop branch

This commit is contained in:
Gert Wohlgemuth 2018-05-19 15:34:18 -07:00
parent b01e9b3f2f
commit 9d4257c2c0

View File

@ -29,10 +29,17 @@ def test_load_strategy(result):
def test_load_strategy_custom_directory(result): def test_load_strategy_custom_directory(result):
resolver = StrategyResolver() resolver = StrategyResolver()
extra_dir = os.path.join('some', 'path') extra_dir = os.path.join('some', 'path')
with pytest.raises(
FileNotFoundError, if os.name == 'nt':
match=r".*No such file or directory: '{}'".format(extra_dir)): with pytest.raises(
resolver._load_strategy('TestStrategy', extra_dir) 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 hasattr(resolver.strategy, 'populate_indicators')
assert 'adx' in resolver.strategy.populate_indicators(result) assert 'adx' in resolver.strategy.populate_indicators(result)