Reduce download-data verbosity
This commit is contained in:
@@ -294,7 +294,7 @@ def refresh_backtest_ohlcv_data(exchange: Exchange, pairs: List[str], timeframes
|
|||||||
continue
|
continue
|
||||||
for timeframe in timeframes:
|
for timeframe in timeframes:
|
||||||
|
|
||||||
logger.info(f'Downloading pair {pair}, interval {timeframe}.')
|
logger.debug(f'Downloading pair {pair}, {candle_type}, interval {timeframe}.')
|
||||||
process = f'{idx}/{len(pairs)}'
|
process = f'{idx}/{len(pairs)}'
|
||||||
_download_pair_history(pair=pair, process=process,
|
_download_pair_history(pair=pair, process=process,
|
||||||
datadir=datadir, exchange=exchange,
|
datadir=datadir, exchange=exchange,
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
# pragma pylint: disable=missing-docstring, protected-access, C0103
|
# pragma pylint: disable=missing-docstring, protected-access, C0103
|
||||||
|
|
||||||
import json
|
import json
|
||||||
|
import logging
|
||||||
import uuid
|
import uuid
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from shutil import copyfile
|
from shutil import copyfile
|
||||||
@@ -503,9 +504,10 @@ def test_validate_backtest_data(default_conf, mocker, caplog, testdatadir) -> No
|
|||||||
])
|
])
|
||||||
def test_refresh_backtest_ohlcv_data(
|
def test_refresh_backtest_ohlcv_data(
|
||||||
mocker, default_conf, markets, caplog, testdatadir, trademode, callcount):
|
mocker, default_conf, markets, caplog, testdatadir, trademode, callcount):
|
||||||
dl_mock = mocker.patch('freqtrade.data.history.history_utils._download_pair_history',
|
caplog.set_level(logging.DEBUG)
|
||||||
MagicMock())
|
dl_mock = mocker.patch('freqtrade.data.history.history_utils._download_pair_history')
|
||||||
mocker.patch(f'{EXMS}.markets', PropertyMock(return_value=markets))
|
mocker.patch(f'{EXMS}.markets', PropertyMock(return_value=markets))
|
||||||
|
|
||||||
mocker.patch.object(Path, "exists", MagicMock(return_value=True))
|
mocker.patch.object(Path, "exists", MagicMock(return_value=True))
|
||||||
mocker.patch.object(Path, "unlink", MagicMock())
|
mocker.patch.object(Path, "unlink", MagicMock())
|
||||||
|
|
||||||
@@ -520,7 +522,7 @@ def test_refresh_backtest_ohlcv_data(
|
|||||||
assert dl_mock.call_count == callcount
|
assert dl_mock.call_count == callcount
|
||||||
assert dl_mock.call_args[1]['timerange'].starttype == 'date'
|
assert dl_mock.call_args[1]['timerange'].starttype == 'date'
|
||||||
|
|
||||||
assert log_has("Downloading pair ETH/BTC, interval 1m.", caplog)
|
assert log_has_re(r"Downloading pair ETH/BTC, .* interval 1m\.", caplog)
|
||||||
|
|
||||||
|
|
||||||
def test_download_data_no_markets(mocker, default_conf, caplog, testdatadir):
|
def test_download_data_no_markets(mocker, default_conf, caplog, testdatadir):
|
||||||
|
|||||||
Reference in New Issue
Block a user