Adding tests

This commit is contained in:
hippocritical
2023-01-01 12:37:15 +01:00
parent 82218d01f4
commit a51e44eea3
3 changed files with 76 additions and 25 deletions

View File

@@ -25,12 +25,16 @@ def start_strategy_update(args: Dict[str, Any]) -> None:
config, enum_failed=True, recursive=config.get('recursive_strategy_search', False))
filtered_strategy_objs = []
for strategy_obj in strategy_objs:
for args_strategy in args['strategy_list']:
for args_strategy in args['strategy_list']:
found = False
for strategy_obj in strategy_objs:
if strategy_obj['name'] == args_strategy and strategy_obj not in filtered_strategy_objs:
filtered_strategy_objs.append(strategy_obj)
found = True
break
print(f"strategy {strategy_obj['name']} could not be loaded or found and is skipped.")
if not found:
print(f"strategy {strategy_obj['name']} could not be loaded or found and is skipped.")
for filtered_strategy_obj in filtered_strategy_objs:
# Initialize backtesting object