Opened 7 years ago
Closed 7 years ago
#12978 closed defect (fixed)
Test failure with pytz 2018.3
Reported by: | Ryan J Ollos | Owned by: | Jun Omae |
---|---|---|---|
Priority: | normal | Milestone: | 1.0.17 |
Component: | general | Version: | |
Severity: | normal | Keywords: | pytz |
Cc: | Branch: | ||
Release Notes: |
Remove unit tests which fails when pytz is 2018c and tzdata package is not 2018c. |
||
API Changes: | |||
Internal Changes: |
Description
====================================================================== FAIL: test_pytz_tokyo (trac.util.tests.datefmt.LocalTimezoneTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/util/tests/datefmt.py", line 2050, in test_pytz_tokyo self._compare_pytz(tz, '1948-05-02T02:00') # +1:00 (DST start) File "/Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/util/tests/datefmt.py", line 1965, in _compare_pytz self._compare_pytz_arithmetic(tz, dt_naive) File "/Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/util/tests/datefmt.py", line 1929, in _compare_pytz_arithmetic self.assertEqual(dt_tz.isoformat(), dt_localtz.isoformat()) AssertionError: '1948-05-02T01:00:00+10:00' != '1948-05-02T00:00:00+09:00'
Attachments (0)
Change History (3)
comment:1 by , 7 years ago
Owner: | set to |
---|---|
Status: | new → assigned |
comment:2 by , 7 years ago
In https://github.com/eggert/tz/commit/bbd0ea690201acab766db57142f9aa0abba30613, Asia/Tokyo
DST transition times are changed from 2018b to 2018c. Ideally, we should invoke the unit tests to compare LocalTimezone
and pytz's timezone if tzdata versions are same in between pytz and libc. However, no way to retrieve tzdata version in libc.
Therefore, I'll remove LocalTimezoneTestCase.test_pytz_tokyo
.
comment:3 by , 7 years ago
Release Notes: | modified (diff) |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
Fixed in [16431] and merged in [16432-16433].
If tzdata version between pytz and debian package is same, the unit test passes.
I'm considering whether we modify/remove the unit test.