From b9482f420db5ee73da454bc4dbaeb41631ad002b Mon Sep 17 00:00:00 2001 From: Mihail <30621622+mihalt@users.noreply.github.com> Date: Tue, 2 Sep 2025 19:25:08 +0000 Subject: [PATCH] Changed test_merge_informative_pair_monthly test to contain the data from previous informative candle on start too. --- tests/strategy/test_strategy_helpers.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/strategy/test_strategy_helpers.py b/tests/strategy/test_strategy_helpers.py index 605579191..8a2b4083b 100644 --- a/tests/strategy/test_strategy_helpers.py +++ b/tests/strategy/test_strategy_helpers.py @@ -101,6 +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"] candle2 = result.loc[(result["date"] == "2022-12-31T23:00:00.000Z")] assert candle2.iloc[0]["date"] == pd.Timestamp("2022-12-31T23:00:00.000Z") @@ -109,7 +110,8 @@ 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"] is pd.NaT + assert candle3.iloc[0]["date_1M"] + assert candle3.iloc[0]["volume_1M"] # First candle with 1M data merged. candle4 = result.loc[(result["date"] == "2022-11-30T23:00:00.000Z")]