Opened 11 years ago
Closed 11 years ago
#21756 closed Bug (fixed)
utils_tests.test_dateformat.DateFormatTests failing on Windows with pytz installed
Reported by: | Michael Manfre | Owned by: | Aymeric Augustin |
---|---|---|---|
Component: | Utilities | Version: | dev |
Severity: | Release blocker | Keywords: | timezone tzinfo |
Cc: | Triage Stage: | Accepted | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Running python runtests.py --noinput --settings=test_sqlite utils_tests.test_dateformat
With pytz installed:
====================================================================== FAIL: test_datetime_with_local_tzinfo (utils_tests.test_dateformat.DateFormatTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\project\django\django\tests\utils_tests\test_dateformat.py", line 38, in test_datetime_with_local_tzinfo self.assertEqual(datetime.fromtimestamp(int(format(dt, 'U'))), dt.replace(tzinfo=None)) AssertionError: datetime.datetime(2009, 5, 15, 23, 30, 30) != datetime.datetime(2009, 5, 16, 5, 30, 30) ====================================================================== FAIL: test_datetime_with_tzinfo (utils_tests.test_dateformat.DateFormatTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\project\django\django\tests\utils_tests\test_dateformat.py", line 47, in test_datetime_with_tzinfo self.assertEqual(datetime.fromtimestamp(int(format(dt, 'U'))), dt.astimezone(ltz).replace(tzinfo=None)) AssertionError: datetime.datetime(2009, 5, 15, 23, 30, 30) != datetime.datetime(2009, 5, 16, 5, 30, 30) ---------------------------------------------------------------------- Ran 13 tests in 0.134s FAILED (failures=2)
With pytz uninstalled:
Creating test database for alias 'default'... Creating test database for alias 'other'... ............. ---------------------------------------------------------------------- Ran 13 tests in 0.013s OK
Change History (5)
comment:1 by , 11 years ago
comment:2 by , 11 years ago
Component: | Testing framework → Utilities |
---|---|
Keywords: | timezone tzinfo added |
Severity: | Normal → Release blocker |
Triage Stage: | Unreviewed → Accepted |
Marking my own ticket as accepted and a release blocker because it's a bisected regression.
comment:3 by , 11 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
It's probably just a matter of skipping these tests, Windows can't use a time zone other than the system time zone.
comment:4 by , 11 years ago
Affected tests use 'Europe/Copenhagen', which is the same as 'Europe/Paris'; that's why I didn't notice the issue.
comment:5 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
Broken by d9413d33b2a8371731a92289123683cf6f440290 from #17262