Added exact dates to test_merge_informative_pair_monthly.

This commit is contained in:
Mihail
2025-09-03 12:20:38 +00:00
parent b9482f420d
commit d36fdc1d69

View File

@@ -101,7 +101,7 @@ def test_merge_informative_pair_monthly():
candle1 = result.loc[(result["date"] == "2022-12-31T22:00:00.000Z")]
assert candle1.iloc[0]["date"] == pd.Timestamp("2022-12-31T22:00:00.000Z")
assert candle1.iloc[0]["date_1M"] == pd.Timestamp("2022-11-01T00:00:00.000Z")
assert candle1.iloc[0]["volume_1M"]
assert candle1.iloc[0]["volume_1M"] == np.float64(199.11048557037446)
candle2 = result.loc[(result["date"] == "2022-12-31T23:00:00.000Z")]
assert candle2.iloc[0]["date"] == pd.Timestamp("2022-12-31T23:00:00.000Z")
@@ -110,8 +110,7 @@ def test_merge_informative_pair_monthly():
# Candle is empty, as the start-date did fail.
candle3 = result.loc[(result["date"] == "2022-11-30T22:00:00.000Z")]
assert candle3.iloc[0]["date"] == pd.Timestamp("2022-11-30T22:00:00.000Z")
assert candle3.iloc[0]["date_1M"]
assert candle3.iloc[0]["volume_1M"]
assert candle3.iloc[0]["volume_1M"] == np.float64(199.2462638356425)
# First candle with 1M data merged.
candle4 = result.loc[(result["date"] == "2022-11-30T23:00:00.000Z")]