test: Add test case for no parallel on 1 combo

This commit is contained in:
Matthias
2025-11-23 13:47:26 +01:00
parent aa7aac3a14
commit 73dccb0780

View File

@@ -582,6 +582,23 @@ def test_refresh_backtest_ohlcv_data(
assert log_has_re(r"Downloading pair ETH/BTC, funding_rate, interval 8h\.", caplog) assert log_has_re(r"Downloading pair ETH/BTC, funding_rate, interval 8h\.", caplog)
assert log_has_re(r"Downloading pair ETH/BTC, mark, interval 4h\.", caplog) assert log_has_re(r"Downloading pair ETH/BTC, mark, interval 4h\.", caplog)
# Test with only one pair - no parallel download should happen 1 pair/timeframe combination
# doesn't justify parallelization
parallel_mock.reset_mock()
dl_mock.reset_mock()
refresh_backtest_ohlcv_data(
exchange=ex,
pairs=[
"ETH/BTC",
],
timeframes=["5m"],
datadir=testdatadir,
timerange=timerange,
erase=False,
trading_mode=trademode,
)
assert parallel_mock.call_count == 0
def test_download_data_no_markets(mocker, default_conf, caplog, testdatadir): def test_download_data_no_markets(mocker, default_conf, caplog, testdatadir):
dl_mock = mocker.patch( dl_mock = mocker.patch(