stable/freqtrade/tests/test_indicator_helpers.py

16 lines
393 B
Python
Raw Normal View History

2018-07-29 14:09:44 +00:00
# pragma pylint: disable=missing-docstring
2018-02-13 09:37:59 +00:00
import pandas as pd
2018-03-17 21:44:47 +00:00
2018-07-04 07:31:35 +00:00
from freqtrade.indicator_helpers import went_down, went_up
2018-02-13 09:37:59 +00:00
def test_went_up():
series = pd.Series([1, 2, 3, 1])
assert went_up(series).equals(pd.Series([False, True, True, False]))
def test_went_down():
series = pd.Series([1, 2, 3, 1])
assert went_down(series).equals(pd.Series([False, False, False, True]))