Merge pull request #1943 from freqtrade/fix/tests_windows
Fix tests on windows
This commit is contained in:
commit
c9a76be532
@ -5,6 +5,7 @@ import re
|
||||
from copy import deepcopy
|
||||
from datetime import datetime
|
||||
from functools import reduce
|
||||
from pathlib import Path
|
||||
from typing import List
|
||||
from unittest.mock import MagicMock, PropertyMock
|
||||
|
||||
@ -877,7 +878,7 @@ def tickers():
|
||||
|
||||
@pytest.fixture
|
||||
def result():
|
||||
with open('freqtrade/tests/testdata/UNITTEST_BTC-1m.json') as data_file:
|
||||
with Path('freqtrade/tests/testdata/UNITTEST_BTC-1m.json').open('r') as data_file:
|
||||
return parse_ticker_dataframe(json.load(data_file), '1m', fill_missing=True)
|
||||
|
||||
# FIX:
|
||||
|
@ -75,14 +75,10 @@ def test_load_strategy_byte64(result):
|
||||
|
||||
def test_load_strategy_invalid_directory(result, caplog):
|
||||
resolver = StrategyResolver()
|
||||
extra_dir = path.join('some', 'path')
|
||||
extra_dir = Path.cwd() / 'some/path'
|
||||
resolver._load_strategy('TestStrategy', config={}, extra_dir=extra_dir)
|
||||
|
||||
assert (
|
||||
'freqtrade.resolvers.strategy_resolver',
|
||||
logging.WARNING,
|
||||
'Path "{}" does not exist'.format(extra_dir),
|
||||
) in caplog.record_tuples
|
||||
assert log_has_re(r'Path .*' + r'some.*path.*' + r'.* does not exist', caplog.record_tuples)
|
||||
|
||||
assert 'adx' in resolver.strategy.advise_indicators(result, {'pair': 'ETH/BTC'})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user