mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-11-29 08:33:07 +00:00
fix tests: use testdatadir
This commit is contained in:
@@ -17,39 +17,39 @@ def read_csv(filename, converter_columns: list = ['side', 'type']):
|
|||||||
parse_dates=True, converters={col: str.strip for col in converter_columns})
|
parse_dates=True, converters={col: str.strip for col in converter_columns})
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(scope="module")
|
@pytest.fixture
|
||||||
def populate_dataframe_with_trades_dataframe():
|
def populate_dataframe_with_trades_dataframe(testdatadir):
|
||||||
return pd.read_feather('tests/testdata/populate_dataframe_with_trades_DF.feather')
|
return pd.read_feather(testdatadir / 'populate_dataframe_with_trades_DF.feather')
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(scope="module")
|
@pytest.fixture
|
||||||
def populate_dataframe_with_trades_trades():
|
def populate_dataframe_with_trades_trades(testdatadir):
|
||||||
return pd.read_feather('tests/testdata/populate_dataframe_with_trades_TRADES.feather')
|
return pd.read_feather(testdatadir / 'populate_dataframe_with_trades_TRADES.feather')
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(scope="module")
|
@pytest.fixture
|
||||||
def candles():
|
def candles(testdatadir):
|
||||||
return pd.read_json('tests/testdata/candles.json').copy()
|
return pd.read_json(testdatadir / 'candles.json').copy()
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(scope="module")
|
@pytest.fixture
|
||||||
def public_trades_list():
|
def public_trades_list(testdatadir):
|
||||||
return read_csv('tests/testdata/public_trades_list.csv').copy()
|
return read_csv(testdatadir / 'public_trades_list.csv').copy()
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(scope="module")
|
@pytest.fixture
|
||||||
def public_trades_list_simple():
|
def public_trades_list_simple(testdatadir):
|
||||||
return read_csv('tests/testdata/public_trades_list_simple_example.csv').copy()
|
return read_csv(testdatadir / 'public_trades_list_simple_example.csv').copy()
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(scope="module")
|
@pytest.fixture
|
||||||
def public_trades_list_simple_results():
|
def public_trades_list_simple_results(testdatadir):
|
||||||
return read_csv('tests/testdata/public_trades_list_simple_results.csv').copy()
|
return read_csv(testdatadir / 'public_trades_list_simple_results.csv').copy()
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(scope="module")
|
@pytest.fixture
|
||||||
def public_trades_list_simple_bidask():
|
def public_trades_list_simple_bidask(testdatadir):
|
||||||
return read_csv('tests/testdata/public_trades_list_simple_bidask.csv').copy()
|
return read_csv(testdatadir / 'public_trades_list_simple_bidask.csv').copy()
|
||||||
|
|
||||||
|
|
||||||
def test_public_trades_columns_before_change(
|
def test_public_trades_columns_before_change(
|
||||||
|
|||||||
Reference in New Issue
Block a user