mirror of
https://github.com/freqtrade/freqtrade.git
synced 2026-03-05 13:24:20 +00:00
Merge pull request #12890 from hamadbinghalib/fix/download-data-convert-log-format
fix(configuration): avoid format-string IndexError for --convert in download-data
This commit is contained in:
@@ -410,7 +410,7 @@ class Configuration:
|
||||
("include_inactive", "Detected --include-inactive-pairs: {}"),
|
||||
("no_parallel_download", "Detected --no-parallel-download: {}"),
|
||||
("download_trades", "Detected --dl-trades: {}"),
|
||||
("convert_trades", "Detected --convert: {} - Converting Trade data to OHCV {}"),
|
||||
("convert_trades", "Detected --convert: {} - Converting trade data to OHLCV."),
|
||||
("dataformat_ohlcv", 'Using "{}" to store OHLCV data.'),
|
||||
("dataformat_trades", 'Using "{}" to store trades data.'),
|
||||
("show_timerange", "Detected --show-timerange"),
|
||||
|
||||
@@ -83,6 +83,30 @@ def test_setup_utils_configuration():
|
||||
assert config["dry_run"] is False
|
||||
|
||||
|
||||
def test_setup_utils_configuration_download_convert_flag():
|
||||
args = [
|
||||
"download-data",
|
||||
"--exchange",
|
||||
"kraken",
|
||||
"--pairs",
|
||||
"ETH/USDT",
|
||||
"--dl-trades",
|
||||
"--convert",
|
||||
"-t",
|
||||
"1m",
|
||||
"--timerange",
|
||||
"20260101-",
|
||||
"--config",
|
||||
"tests/testdata/testconfigs/main_test_config.json",
|
||||
]
|
||||
|
||||
config = setup_utils_configuration(get_args(args), RunMode.UTIL_EXCHANGE)
|
||||
|
||||
assert config["download_trades"] is True
|
||||
assert config["convert_trades"] is True
|
||||
assert config["timeframes"] == ["1m"]
|
||||
|
||||
|
||||
def test_start_trading_fail(mocker, caplog):
|
||||
mocker.patch("freqtrade.worker.Worker.run", MagicMock(side_effect=OperationalException))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user