mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-12-13 19:31:15 +00:00
test: update rel_mean test to use USDT Pairs
This will allow highlighting a problem pointed out in #12588
This commit is contained in:
@@ -290,20 +290,22 @@ def test_combine_dataframes_with_mean(testdatadir):
|
|||||||
|
|
||||||
|
|
||||||
def test_combined_dataframes_with_rel_mean(testdatadir):
|
def test_combined_dataframes_with_rel_mean(testdatadir):
|
||||||
pairs = ["ETH/BTC", "ADA/BTC"]
|
pairs = ["BTC/USDT", "XRP/USDT"]
|
||||||
data = load_data(datadir=testdatadir, pairs=pairs, timeframe="5m")
|
data = load_data(datadir=testdatadir, pairs=pairs, timeframe="5m")
|
||||||
df = combined_dataframes_with_rel_mean(
|
df = combined_dataframes_with_rel_mean(
|
||||||
data, datetime(2018, 1, 12, tzinfo=UTC), datetime(2018, 1, 28, tzinfo=UTC)
|
data,
|
||||||
|
fromdt=data["BTC/USDT"].at[0, "date"],
|
||||||
|
todt=data["BTC/USDT"].at[data["BTC/USDT"].index[-1], "date"],
|
||||||
)
|
)
|
||||||
assert isinstance(df, DataFrame)
|
assert isinstance(df, DataFrame)
|
||||||
assert "ETH/BTC" not in df.columns
|
assert "BTC/USDT" not in df.columns
|
||||||
assert "ADA/BTC" not in df.columns
|
assert "XRP/USDT" not in df.columns
|
||||||
assert "mean" in df.columns
|
assert "mean" in df.columns
|
||||||
assert "rel_mean" in df.columns
|
assert "rel_mean" in df.columns
|
||||||
assert "count" in df.columns
|
assert "count" in df.columns
|
||||||
assert df.iloc[0]["count"] == 2
|
assert df.iloc[0]["count"] == 2
|
||||||
assert df.iloc[-1]["count"] == 2
|
assert df.iloc[-1]["count"] == 2
|
||||||
assert len(df) < len(data["ETH/BTC"])
|
assert len(df) < len(data["BTC/USDT"])
|
||||||
|
|
||||||
|
|
||||||
def test_combine_dataframes_with_mean_no_data(testdatadir):
|
def test_combine_dataframes_with_mean_no_data(testdatadir):
|
||||||
|
|||||||
Reference in New Issue
Block a user