rename analyze.py to exchange_helpers.py

This commit is contained in:
Janne Sinivirta
2018-07-17 12:12:25 +03:00
parent 4a26eb34ea
commit 85fd4dd3ff
6 changed files with 7 additions and 9 deletions

View File

@@ -0,0 +1,25 @@
# pragma pylint: disable=missing-docstring, C0103
"""
Unit test file for exchange_helpers.py
"""
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