Opened 11 years ago

Closed 11 years ago

#21992 closed Bug (fixed)

test_naturalday_uses_localtime fails on Windows

Reported by: anonymous Owned by: nobody
Component: contrib.humanize Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: no

Description

django.contrib.humanize.tests.test_naturalday_uses_localtime is decorated by a skipIf clause as per #19203.
However, running on a Windows machine -- with pytz not installed and system timezone set to UTC -- the skip condition still evaluates to False. This is since settings.TIME_ZONE does default to "America/Chicago", and, as a result, the test case fails.

Change History (4)

comment:1 by Marc Tamlyn, 11 years ago

Triage Stage: UnreviewedAccepted

comment:3 by Aymeric Augustin, 11 years ago

Patch needs improvement: set

I think @require_tz_support is the answer here. The test attempt to change the time zone and Windows cannot do that.

comment:4 by Aymeric Augustin, 11 years ago

Resolution: fixed
Status: newclosed

It looks like this was fixed in 651a6f76f30f4083dfa2a75c5acd86359c2fc4a2.

Note: See TracTickets for help on using tickets.
Back to Top