Use kwarg for parse_ticker_dataframe

This commit is contained in:
Matthias 2019-06-09 13:19:01 +02:00
parent 9967df8f45
commit d7c63347e1
3 changed files with 4 additions and 4 deletions

View File

@ -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}. '

View File

@ -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

View File

@ -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