-
Notifications
You must be signed in to change notification settings - Fork 485
Open
Description
While working on reproducible builds for openSUSE, I found that
our python-dateparser 1.2.2 package fails its tests when run after 2026-01-01T01:06:13
self = <tests.test_search.TestTranslateSearch testMethod=test_search_dates_with_prepositions>
def test_search_dates_with_prepositions(self):
"""Test `search_dates` for parsing Russian date ranges with prepositions and language detection."""
result = search_dates(
"Сервис будет недоступен с 12 января по 30 апреля.",
add_detected_language=True,
languages=["ru"],
)
expected = [
("12 января", datetime.datetime(2025, 1, 12, 0, 0), "ru"),
("30 апреля", datetime.datetime(2025, 4, 30, 0, 0), "ru"),
]
> assert result == expected
E AssertionError: assert [('12 января'... 0, 0), 'ru')] == [('12 января'... 0, 0), 'ru')]
E
E At index 0 diff: ('12 января', datetime.datetime(2041, 1, 12, 0, 0), 'ru') != ('12 января', datetime.datetime(2025, 1, 12, 0, 0), 'ru')
E
E Full diff:
E [
E (
E '12 января',...
E
E ...Full output truncated (15 lines hidden), use '-vv' to show
Tests should keep working in the future. e.g. you could mock the current time.
Metadata
Metadata
Assignees
Labels
No labels