From 82350b1f83b59a9dd63ace915951a43f6e881af2 Mon Sep 17 00:00:00 2001 From: wilsonfreitas Date: Thu, 25 Jan 2024 16:45:01 -0300 Subject: [PATCH] Comparison of Timestamp with datetime.date is deprecated Comparison of Timestamp with datetime.date is deprecated in order to match the standard library behavior. --- test_bizdays_pandas.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test_bizdays_pandas.py b/test_bizdays_pandas.py index fcc6a04..6097c09 100644 --- a/test_bizdays_pandas.py +++ b/test_bizdays_pandas.py @@ -34,16 +34,16 @@ def test_bizdays_with_timestamp(): def test_adjust_with_timestamp(): dt = pd.to_datetime("2021-12-30") assert isinstance(actual.following(dt), pd.Timestamp) - assert actual.following(dt) == dt.date() - assert actual.preceding(dt) == dt.date() - assert actual.modified_following(dt) == dt.date() - assert actual.modified_preceding(dt) == dt.date() + assert actual.following(dt) == pd.Timestamp(dt.date()) + assert actual.preceding(dt) == pd.Timestamp(dt.date()) + assert actual.modified_following(dt) == pd.Timestamp(dt.date()) + assert actual.modified_preceding(dt) == pd.Timestamp(dt.date()) def test_offset_with_timestamp(): dt = pd.to_datetime("2021-01-01") assert isinstance(actual.offset(dt, 5), pd.Timestamp) - assert actual.offset(dt, 5) == pd.to_datetime("2021-01-06").date() + assert actual.offset(dt, 5) == pd.to_datetime("2021-01-06") def test_isbizday_with_datetimeindex():