[packages/python3-dateparser] - fixed tests to pass after 2025

qboosh qboosh at pld-linux.org
Mon Jan 26 21:14:39 CET 2026


commit 7a92fbcad4801fb139d99a28424d02ddebca5d17
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Mon Jan 26 21:14:46 2026 +0100

    - fixed tests to pass after 2025

 dateparser-tests-year.patch | 24 ++++++++++++++++++++++++
 python3-dateparser.spec     |  3 ++-
 2 files changed, 26 insertions(+), 1 deletion(-)
---
diff --git a/python3-dateparser.spec b/python3-dateparser.spec
index 1c78b03..f6c724a 100644
--- a/python3-dateparser.spec
+++ b/python3-dateparser.spec
@@ -13,6 +13,7 @@ Group:		Libraries/Python
 #Source0Download: https://pypi.org/simple/dateparser/
 Source0:	https://files.pythonhosted.org/packages/source/d/dateparser/dateparser-%{version}.tar.gz
 # Source0-md5:	badfd1500735e3d8e32386f7079deca6
+Patch0:		dateparser-tests-year.patch
 URL:		https://pypi.org/project/dateparser/
 BuildRequires:	python3-modules >= 1:3.8
 BuildRequires:	python3-setuptools
@@ -64,6 +65,7 @@ Dokumentacja API modułu Pythona dateparser.
 
 %prep
 %setup -q -n dateparser-%{version}
+%patch -P0 -p1
 
 # requires CLDR data downloaded
 %{__rm} tests/test_dateparser_data_integrity.py
@@ -73,7 +75,6 @@ Dokumentacja API modułu Pythona dateparser.
 
 %if %{with tests}
 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
-PYTEST_PLUGINS= \
 %{__python3} -m pytest tests
 %endif
 
diff --git a/dateparser-tests-year.patch b/dateparser-tests-year.patch
new file mode 100644
index 0000000..fc2f846
--- /dev/null
+++ b/dateparser-tests-year.patch
@@ -0,0 +1,24 @@
+From 6b23348b9367d43bebc9a40b00dda3363eb2acd5 Mon Sep 17 00:00:00 2001
+From: MeggyCal <MeggyCal at users.noreply.github.com>
+Date: Thu, 8 Jan 2026 00:25:02 +0100
+Subject: [PATCH] use current year in test_search_dates_with_prepositions
+ (#1294)
+
+---
+ tests/test_search.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/tests/test_search.py b/tests/test_search.py
+index fef747079..7c3b3322e 100644
+--- a/tests/test_search.py
++++ b/tests/test_search.py
+@@ -1100,7 +1100,7 @@ def test_search_dates_with_prepositions(self):
+             languages=["ru"],
+         )
+         expected = [
+-            ("12 января", datetime.datetime(2025, 1, 12, 0, 0), "ru"),
+-            ("30 апреля", datetime.datetime(2025, 4, 30, 0, 0), "ru"),
++            ("12 января", datetime.datetime(today.year, 1, 12, 0, 0), "ru"),
++            ("30 апреля", datetime.datetime(today.year, 4, 30, 0, 0), "ru"),
+         ]
+         assert result == expected
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python3-dateparser.git/commitdiff/7a92fbcad4801fb139d99a28424d02ddebca5d17



More information about the pld-cvs-commit mailing list