Adjust some imports
This commit is contained in:
parent
1cd8415723
commit
bf2c0390e7
@ -151,6 +151,11 @@ def patch_coinmarketcap(mocker) -> None:
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture(scope='function')
|
||||||
|
def init_persistence(default_conf):
|
||||||
|
persistence.init(default_conf['db_url'], default_conf['dry_run'])
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(scope="function")
|
@pytest.fixture(scope="function")
|
||||||
def default_conf():
|
def default_conf():
|
||||||
""" Returns validated configuration suitable for most tests """
|
""" Returns validated configuration suitable for most tests """
|
||||||
|
@ -4,15 +4,12 @@ from arrow import Arrow
|
|||||||
import pytest
|
import pytest
|
||||||
from pandas import DataFrame, to_datetime
|
from pandas import DataFrame, to_datetime
|
||||||
|
|
||||||
from freqtrade.arguments import Arguments, TimeRange
|
from freqtrade.arguments import TimeRange
|
||||||
from freqtrade.data.btanalysis import (BT_DATA_COLUMNS,
|
from freqtrade.data.btanalysis import (BT_DATA_COLUMNS,
|
||||||
extract_trades_of_period,
|
extract_trades_of_period,
|
||||||
load_backtest_data, load_trades)
|
load_backtest_data, load_trades)
|
||||||
from freqtrade.data.history import load_pair_history, make_testdata_path
|
from freqtrade.data.history import load_pair_history, make_testdata_path
|
||||||
from freqtrade.persistence import Trade, init
|
from freqtrade.tests.test_persistence import create_mock_trades
|
||||||
from freqtrade.strategy.interface import SellType
|
|
||||||
from freqtrade.tests.test_persistence import (create_mock_trades,
|
|
||||||
init_persistence)
|
|
||||||
|
|
||||||
|
|
||||||
def test_load_backtest_data():
|
def test_load_backtest_data():
|
||||||
@ -85,4 +82,3 @@ def test_extract_trades_of_period():
|
|||||||
assert trades1.iloc[0].close_time == Arrow(2017, 11, 14, 10, 41, 0).datetime
|
assert trades1.iloc[0].close_time == Arrow(2017, 11, 14, 10, 41, 0).datetime
|
||||||
assert trades1.iloc[-1].open_time == Arrow(2017, 11, 14, 14, 20, 0).datetime
|
assert trades1.iloc[-1].open_time == Arrow(2017, 11, 14, 14, 20, 0).datetime
|
||||||
assert trades1.iloc[-1].close_time == Arrow(2017, 11, 14, 15, 25, 0).datetime
|
assert trades1.iloc[-1].close_time == Arrow(2017, 11, 14, 15, 25, 0).datetime
|
||||||
|
|
||||||
|
@ -11,11 +11,6 @@ from freqtrade.persistence import Trade, clean_dry_run_db, init
|
|||||||
from freqtrade.tests.conftest import log_has
|
from freqtrade.tests.conftest import log_has
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(scope='function')
|
|
||||||
def init_persistence(default_conf):
|
|
||||||
init(default_conf['db_url'], default_conf['dry_run'])
|
|
||||||
|
|
||||||
|
|
||||||
def create_mock_trades(fee):
|
def create_mock_trades(fee):
|
||||||
"""
|
"""
|
||||||
Create some fake trades ...
|
Create some fake trades ...
|
||||||
|
Loading…
Reference in New Issue
Block a user