mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-14 12:13:57 +00:00
22 lines
699 B
Python
22 lines
699 B
Python
# pragma pylint: disable=missing-docstring, C0103
|
|
|
|
from freqtrade.exchange.exchange_helpers import parse_ticker_dataframe
|
|
|
|
|
|
def test_dataframe_correct_length(result):
|
|
dataframe = parse_ticker_dataframe(result)
|
|
assert len(result.index) - 1 == len(dataframe.index) # last partial candle removed
|
|
|
|
|
|
def test_dataframe_correct_columns(result):
|
|
assert result.columns.tolist() == \
|
|
['date', 'open', 'high', 'low', 'close', 'volume']
|
|
|
|
|
|
def test_parse_ticker_dataframe(ticker_history):
|
|
columns = ['date', 'open', 'high', 'low', 'close', 'volume']
|
|
|
|
# Test file with BV data
|
|
dataframe = parse_ticker_dataframe(ticker_history)
|
|
assert dataframe.columns.tolist() == columns
|