From a5d87859dc6b836e8624ca1544e7b0e9c2b75119 Mon Sep 17 00:00:00 2001 From: Matthias Date: Fri, 20 Jan 2023 07:27:35 +0000 Subject: [PATCH] Refactor test to reuse variable --- tests/optimize/test_backtesting.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/optimize/test_backtesting.py b/tests/optimize/test_backtesting.py index 5ad59ae9f..b17cb8dbb 100644 --- a/tests/optimize/test_backtesting.py +++ b/tests/optimize/test_backtesting.py @@ -795,10 +795,10 @@ def test_backtest_one_detail(default_conf_usdt, fee, mocker, testdatadir, use_de pair = 'XRP/ETH' # Pick a timerange adapted to the pair we use to test timerange = TimeRange.parse_timerange('20191010-20191013') - data = history.load_data(datadir=testdatadir, timeframe='5m', pairs=['XRP/ETH'], + data = history.load_data(datadir=testdatadir, timeframe='5m', pairs=[pair], timerange=timerange) if use_detail: - data_1m = history.load_data(datadir=testdatadir, timeframe='1m', pairs=['XRP/ETH'], + data_1m = history.load_data(datadir=testdatadir, timeframe='1m', pairs=[pair], timerange=timerange) backtesting.detail_data = data_1m processed = backtesting.strategy.advise_all_indicators(data)