File: defuse-timebomb.patch

package info (click to toggle)
dateparser 1.2.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,196 kB
  • sloc: python: 52,721; makefile: 155; sh: 15
file content (22 lines) | stat: -rw-r--r-- 837 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
From 6b23348b9367d43bebc9a40b00dda3363eb2acd5 Mon Sep 17 00:00:00 2001
From: MeggyCal <MeggyCal@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(-)

--- a/tests/test_search.py
+++ b/tests/test_search.py
@@ -1099,7 +1099,7 @@
             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