From 8ebab74927be5002f701fa6388e464a5c5834a96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Eustace?= Date: Sat, 25 Feb 2023 01:30:19 +0100 Subject: [PATCH] Fix diff tests for dates --- pendulum/date.py | 2 +- tests/date/test_diff.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pendulum/date.py b/pendulum/date.py index 4e2655ba..f2aec479 100644 --- a/pendulum/date.py +++ b/pendulum/date.py @@ -173,7 +173,7 @@ def is_anniversary(self, dt: date | None = None) -> bool: Compares the date/month values of the two dates. """ if dt is None: - dt = Date.today() + dt = self.__class__.today() instance = self.__class__(dt.year, dt.month, dt.day) diff --git a/tests/date/test_diff.py b/tests/date/test_diff.py index 56358cc8..cfececfc 100644 --- a/tests/date/test_diff.py +++ b/tests/date/test_diff.py @@ -9,7 +9,7 @@ @pytest.fixture def today(): - return pendulum.today().date() + return pendulum.Date.today() def test_diff_in_years_positive():