Backtesting: Add the Interval required when data is missing
Change the message: "No data for pair ETH/BTC, use --refresh-pairs-cached to download the data" for: "No data for pair: "ETH/BTC", Interval: 5m. Use --refresh-pairs-cached to download the data" The message structure is unified with the download message: "Download the pair: "ETH/BTC", Interval: 5m"
This commit is contained in:
parent
5e99df1759
commit
127cf5d619
@ -104,8 +104,10 @@ def load_data(datadir: str,
|
|||||||
result[pair] = pairdata
|
result[pair] = pairdata
|
||||||
else:
|
else:
|
||||||
logger.warning(
|
logger.warning(
|
||||||
'No data for pair %s, use --refresh-pairs-cached to download the data',
|
'No data for pair: "%s", Interval: %s. '
|
||||||
pair
|
'Use --refresh-pairs-cached to download the data',
|
||||||
|
pair,
|
||||||
|
ticker_interval
|
||||||
)
|
)
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
@ -105,7 +105,8 @@ def test_load_data_with_new_pair_1min(ticker_history, mocker, caplog) -> None:
|
|||||||
refresh_pairs=False,
|
refresh_pairs=False,
|
||||||
pairs=['MEME/BTC'])
|
pairs=['MEME/BTC'])
|
||||||
assert os.path.isfile(file) is False
|
assert os.path.isfile(file) is False
|
||||||
assert log_has('No data for pair MEME/BTC, use --refresh-pairs-cached to download the data',
|
assert log_has('No data for pair: "MEME/BTC", Interval: 1m. '
|
||||||
|
'Use --refresh-pairs-cached to download the data',
|
||||||
caplog.record_tuples)
|
caplog.record_tuples)
|
||||||
|
|
||||||
# download a new pair if refresh_pairs is set
|
# download a new pair if refresh_pairs is set
|
||||||
|
Loading…
Reference in New Issue
Block a user