Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.bugs.dist > #1251652

Bug#1065357: parsedatetime: testNextMonth fails around February 29

From Graham Inggs <ginggs@debian.org>
Newsgroups linux.debian.bugs.dist
Subject Bug#1065357: parsedatetime: testNextMonth fails around February 29
Date 2025-07-02 13:10 +0200
Message-ID <L43vH-eHvr-3@gated-at.bofh.it> (permalink)
References <IdRTb-e7S9-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Possibly related, the autopkgtest fails on June 30 [1].

I've copied what I hope is the relevant output below.


[1] https://ci.debian.net/packages/p/parsedatetime/testing/amd64/


27s =================================== FAILURES
===================================
27s ______________________ test.testDate3ConfusedHourAndYear
_______________________
27s
27s self = <tests.TestComplexDateTimes.test
testMethod=testDate3ConfusedHourAndYear>
27s
27s def testDate3ConfusedHourAndYear(self):
27s start = datetime(
27s self.yr, self.mth, self.dy, self.hr, self.mn, self.sec).timetuple()
27s self.assertExpectedResult(
27s self.cal.parse('Aug 05, 2014 4:15 AM'),
27s (datetime(2014, 8, 5, 4, 15, 0).timetuple(), 3))
27s self.assertExpectedResult(
27s self.cal.parse('Aug 05, 2003 3:15 AM'),
27s (datetime(2003, 8, 5, 3, 15, 0).timetuple(), 3))
27s self.assertExpectedResult(
27s self.cal.parse('Aug 05, 2003 03:15 AM'),
27s (datetime(2003, 8, 5, 3, 15, 0).timetuple(), 3))
27s > self.assertExpectedResult(
27s self.cal.parse('June 30th 12PM', start),
27s (datetime(self.yr
27s if datetime.now() < datetime(self.yr, 6, 30, 12)
27s else self.yr + 1,
27s 6, 30, 12, 0, 0).timetuple(), 3))
27s
27s tests/TestComplexDateTimes.py:42:
27s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _
27s tests/utils.py:22: in decoratedComparator
27s self.fail(failureMessage % (errMsg, result, check))
27s E AssertionError: Result does not match target value
27s E
27s E Result:
27s E (time.struct_time(tm_year=2025, tm_mon=6, tm_mday=30,
tm_hour=12, tm_min=0, tm_sec=0, tm_wday=0, tm_yday=181, tm_isdst=-1),
3)
27s E
27s E Expected:
27s E (time.struct_time(tm_year=2026, tm_mon=6, tm_mday=30,
tm_hour=12, tm_min=0, tm_sec=0, tm_wday=1, tm_yday=181, tm_isdst=-1),
3)

Back to linux.debian.bugs.dist | Previous | Next | Find similar | Unroll thread


Thread

Bug#1065357: parsedatetime: testNextMonth fails around February 29 Graham Inggs <ginggs@debian.org> - 2025-07-02 13:10 +0200

csiph-web