Merge branch 'StopLossSupport' into wohlgemuth

# Conflicts:
#	freqtrade/arguments.py
#	scripts/plot_dataframe.py
This commit is contained in:
Gert Wohlgemuth
2018-05-20 12:12:08 -07:00
24 changed files with 435 additions and 143 deletions

View File

@@ -38,10 +38,17 @@ def test_load_strategy_from_url(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)