From d7c63347e12f41a99e3caaed498669f0230ea16e Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 9 Jun 2019 13:19:01 +0200 Subject: [PATCH] Use kwarg for parse_ticker_dataframe --- freqtrade/data/history.py | 2 +- freqtrade/tests/conftest.py | 4 ++-- freqtrade/tests/strategy/test_interface.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/freqtrade/data/history.py b/freqtrade/data/history.py index 2dacce8c6..72f7111f6 100644 --- a/freqtrade/data/history.py +++ b/freqtrade/data/history.py @@ -106,7 +106,7 @@ def load_pair_history(pair: str, logger.warning('Missing data at end for pair %s, data ends at %s', pair, arrow.get(pairdata[-1][0] // 1000).strftime('%Y-%m-%d %H:%M:%S')) - return parse_ticker_dataframe(pairdata, ticker_interval, fill_up_missing) + return parse_ticker_dataframe(pairdata, ticker_interval, fill_missing=fill_up_missing) else: logger.warning( f'No history data for pair: "{pair}", interval: {ticker_interval}. ' diff --git a/freqtrade/tests/conftest.py b/freqtrade/tests/conftest.py index a907b33ed..dcc69fcb1 100644 --- a/freqtrade/tests/conftest.py +++ b/freqtrade/tests/conftest.py @@ -649,7 +649,7 @@ def ticker_history_list(): @pytest.fixture def ticker_history(ticker_history_list): - return parse_ticker_dataframe(ticker_history_list, "5m", True) + return parse_ticker_dataframe(ticker_history_list, "5m", fill_missing=True) @pytest.fixture @@ -854,7 +854,7 @@ def tickers(): @pytest.fixture def result(): with open('freqtrade/tests/testdata/UNITTEST_BTC-1m.json') as data_file: - return parse_ticker_dataframe(json.load(data_file), '1m', True) + return parse_ticker_dataframe(json.load(data_file), '1m', fill_missing=True) # FIX: # Create an fixture/function diff --git a/freqtrade/tests/strategy/test_interface.py b/freqtrade/tests/strategy/test_interface.py index d6ef0c8e7..e384003dc 100644 --- a/freqtrade/tests/strategy/test_interface.py +++ b/freqtrade/tests/strategy/test_interface.py @@ -111,7 +111,7 @@ def test_tickerdata_to_dataframe(default_conf) -> None: timerange = TimeRange(None, 'line', 0, -100) tick = load_tickerdata_file(None, 'UNITTEST/BTC', '1m', timerange=timerange) - tickerlist = {'UNITTEST/BTC': parse_ticker_dataframe(tick, '1m', True)} + tickerlist = {'UNITTEST/BTC': parse_ticker_dataframe(tick, '1m', fill_missing=True)} data = strategy.tickerdata_to_dataframe(tickerlist) assert len(data['UNITTEST/BTC']) == 102 # partial candle was removed