Add test for dynamic_pairlist_expand

This commit is contained in:
Matthias
2022-08-13 10:18:57 +02:00
parent 1ac6ec1446
commit 5aaab75d1c
3 changed files with 21 additions and 4 deletions

View File

@@ -1,5 +1,5 @@
import re
from typing import List
from typing import Any, Dict, List
def expand_pairlist(wildcardpl: List[str], available_pairs: List[str],
@@ -42,7 +42,7 @@ def expand_pairlist(wildcardpl: List[str], available_pairs: List[str],
return result
def dynamic_expand_pairlist(config: dict, markets: list) -> List[str]:
def dynamic_expand_pairlist(config: Dict[str, Any], markets: List[str]) -> List[str]:
expanded_pairs = expand_pairlist(config['pairs'], markets)
if config.get('freqai', {}).get('enabled', False):
corr_pairlist = config['freqai']['feature_parameters']['include_corr_pairlist']

View File

@@ -157,7 +157,8 @@ class IStrategy(ABC, HyperStrategyMixin):
class DummyClass():
def start(self, *args, **kwargs):
raise OperationalException(
'freqAI is not enabled. Please enable it in your config to use this strategy.')
'freqAI is not enabled. '
'Please enable it in your config to use this strategy.')
self.freqai = DummyClass() # type: ignore
def ft_bot_start(self, **kwargs) -> None: