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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user