[TMP] Make tests not fail for now.

This commit is contained in:
Rokas Kupstys 2021-09-07 15:53:12 +03:00
parent dfa61b7ad2
commit f81df19b93

View File

@ -424,7 +424,8 @@ class IStrategy(ABC, HyperStrategyMixin):
Internal method which gathers all informative pairs (user or automatically defined). Internal method which gathers all informative pairs (user or automatically defined).
""" """
informative_pairs = self.informative_pairs() informative_pairs = self.informative_pairs()
informative_pairs += list(self._ft_informative.keys()) if hasattr(self, '_ft_informative'):
informative_pairs += list(self._ft_informative.keys())
return list(set(informative_pairs)) return list(set(informative_pairs))
def get_strategy_name(self) -> str: def get_strategy_name(self) -> str:
@ -844,13 +845,14 @@ class IStrategy(ABC, HyperStrategyMixin):
""" """
logger.debug(f"Populating indicators for pair {metadata.get('pair')}.") logger.debug(f"Populating indicators for pair {metadata.get('pair')}.")
# call populate_indicators_Nm() which were tagged with @informative decorator. if hasattr(self, '_ft_informative'):
for (pair, timeframe), informatives in self._ft_informative.items(): # call populate_indicators_Nm() which were tagged with @informative decorator.
for (informative_data, populate_fn) in informatives: for (pair, timeframe), informatives in self._ft_informative.items():
if not informative_data.asset and pair != metadata['pair']: for (informative_data, populate_fn) in informatives:
continue if not informative_data.asset and pair != metadata['pair']:
dataframe = _create_and_merge_informative_pair( continue
self, dataframe, metadata, informative_data, populate_fn) dataframe = _create_and_merge_informative_pair(
self, dataframe, metadata, informative_data, populate_fn)
if self._populate_fun_len == 2: if self._populate_fun_len == 2:
warnings.warn("deprecated - check out the Sample strategy to see " warnings.warn("deprecated - check out the Sample strategy to see "