Refactor test to reuse variable
This commit is contained in:
parent
6e22607387
commit
a5d87859dc
@ -795,10 +795,10 @@ def test_backtest_one_detail(default_conf_usdt, fee, mocker, testdatadir, use_de
|
|||||||
pair = 'XRP/ETH'
|
pair = 'XRP/ETH'
|
||||||
# Pick a timerange adapted to the pair we use to test
|
# Pick a timerange adapted to the pair we use to test
|
||||||
timerange = TimeRange.parse_timerange('20191010-20191013')
|
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)
|
timerange=timerange)
|
||||||
if use_detail:
|
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)
|
timerange=timerange)
|
||||||
backtesting.detail_data = data_1m
|
backtesting.detail_data = data_1m
|
||||||
processed = backtesting.strategy.advise_all_indicators(data)
|
processed = backtesting.strategy.advise_all_indicators(data)
|
||||||
|
Loading…
Reference in New Issue
Block a user