mirror of
https://github.com/django/django.git
synced 2025-04-08 23:46:43 +00:00
[1.8.x] Skipped a dateformat test on Windows as needed.
Refs 1014ba026e879e56e0f265a8d9f54e6f39843348 Backport of 2765adc8dcbaa41662af9000c4de2820418bf0a2 from master
This commit is contained in:
parent
4164a4e166
commit
df4fea644f
@ -1,6 +1,8 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import sys
|
||||
from datetime import date, datetime
|
||||
from unittest import skipIf
|
||||
|
||||
from django.test import TestCase, override_settings
|
||||
from django.test.utils import TZ_SUPPORT, requires_tz_support
|
||||
@ -34,6 +36,7 @@ class DateFormatTests(TestCase):
|
||||
dt = datetime(2009, 5, 16, 5, 30, 30)
|
||||
self.assertEqual(datetime.fromtimestamp(int(format(dt, 'U'))), dt)
|
||||
|
||||
@skipIf(sys.platform.startswith('win') and not pytz, "Test requires pytz on Windows")
|
||||
def test_naive_ambiguous_datetime(self):
|
||||
# dt is ambiguous in Europe/Copenhagen. LocalTimezone guesses the
|
||||
# offset (and gets it wrong 50% of the time) while pytz refuses the
|
||||
|
Loading…
x
Reference in New Issue
Block a user