Fix broken tests
This commit is contained in:
@@ -204,8 +204,8 @@ class IResolver:
|
||||
def _build_rel_location(cls, directory: Path, entry: Path) -> str:
|
||||
|
||||
builtin = cls.initial_search_path == directory
|
||||
return f"<builtin>/{entry.relative_to(directory)}" if builtin else entry.relative_to(
|
||||
directory)
|
||||
return f"<builtin>/{entry.relative_to(directory)}" if builtin else str(
|
||||
entry.relative_to(directory))
|
||||
|
||||
@classmethod
|
||||
def _search_all_objects(
|
||||
|
@@ -272,7 +272,7 @@ class StrategyResolver(IResolver):
|
||||
def build_search_paths(cls, config: Config, user_subdir: Optional[str] = None,
|
||||
extra_dirs: List[str] = []) -> List[Path]:
|
||||
|
||||
if 'strategy_path' in config:
|
||||
if 'strategy_path' in config and config['strategy_path'] not in extra_dirs:
|
||||
extra_dirs = [config['strategy_path']] + extra_dirs
|
||||
return super().build_search_paths(config, user_subdir, extra_dirs)
|
||||
|
||||
|
@@ -1,13 +1,11 @@
|
||||
import logging
|
||||
from copy import deepcopy
|
||||
from pathlib import Path
|
||||
from typing import List, Optional
|
||||
|
||||
from fastapi import APIRouter, Depends, Query
|
||||
from fastapi.exceptions import HTTPException
|
||||
|
||||
from freqtrade import __version__
|
||||
from freqtrade.constants import USERPATH_STRATEGIES
|
||||
from freqtrade.data.history import get_datahandler
|
||||
from freqtrade.enums import CandleType, TradingMode
|
||||
from freqtrade.exceptions import OperationalException
|
||||
|
Reference in New Issue
Block a user