Fix test_dataframe when ran standalone (#546)

* Fix dataframe test when ran standalone

* Fix standalone tests in hyperopt and optimize tests
This commit is contained in:
Matthias
2018-03-15 23:37:34 +01:00
committed by gcarq
parent 89e8286cbc
commit 94caf82ab2
2 changed files with 10 additions and 2 deletions

View File

@@ -1,8 +1,10 @@
# pragma pylint: disable=missing-docstring, C0103
import pandas
from freqtrade.optimize import load_data
from freqtrade.analyze import Analyze
from freqtrade.strategy.strategy import Strategy
_pairs = ['BTC_ETH']
@@ -19,11 +21,13 @@ def load_dataframe_pair(pairs):
def test_dataframe_load():
Strategy({'strategy': 'default_strategy'})
dataframe = load_dataframe_pair(_pairs)
assert isinstance(dataframe, pandas.core.frame.DataFrame)
def test_dataframe_columns_exists():
Strategy({'strategy': 'default_strategy'})
dataframe = load_dataframe_pair(_pairs)
assert 'high' in dataframe.columns
assert 'low' in dataframe.columns