From 4edf8f2079e63c0078e0fd455d73d3733f2c54a2 Mon Sep 17 00:00:00 2001 From: Janne Sinivirta Date: Sun, 29 Oct 2017 15:10:18 +0200 Subject: [PATCH] copy only needed columns before iterating over them --- freqtrade/tests/test_backtesting.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/freqtrade/tests/test_backtesting.py b/freqtrade/tests/test_backtesting.py index 4929676f5..c32337f18 100644 --- a/freqtrade/tests/test_backtesting.py +++ b/freqtrade/tests/test_backtesting.py @@ -51,7 +51,7 @@ def backtest(conf, pairs, mocker): mocker.patch('freqtrade.analyze.get_ticker_history', return_value=data) mocker.patch('arrow.utcnow', return_value=arrow.get('2017-08-20T14:50:00')) - ticker = analyze_ticker(pair) + ticker = analyze_ticker(pair)[['close', 'date', 'buy']].copy() # for each buy point for index, row in ticker[ticker.buy == 1].iterrows(): trade = Trade(