Don't fail when --strategy-path is not a valid directory.

closes #7264
This commit is contained in:
Matthias
2022-08-22 09:18:51 +00:00
parent 914b6247e4
commit f55d5ffd8c
2 changed files with 8 additions and 1 deletions

View File

@@ -48,6 +48,10 @@ def test_search_all_strategies_with_failed():
assert len([x for x in strategies if x['class'] is not None]) == 9
assert len([x for x in strategies if x['class'] is None]) == 1
directory = Path(__file__).parent / "strats_nonexistingdir"
strategies = StrategyResolver.search_all_objects(directory, enum_failed=True)
assert len(strategies) == 0
def test_load_strategy(default_conf, result):
default_conf.update({'strategy': 'SampleStrategy',