diff options
| author | Tim Graham <timograham@gmail.com> | 2016-01-04 19:08:21 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-01-05 13:12:09 -0500 |
| commit | 2b17ac2469ec2a7a0c01d33ca869b72e8064d0bc (patch) | |
| tree | fde0854c67b0594f5b589973d591311b281f7728 /tests/utils_tests | |
| parent | 35fd2a6fd53c758b9804596dd0e81f5bd71e7ea5 (diff) | |
[1.9.x] Skipped a dateformat test on Windows as needed.
Refs 1014ba026e879e56e0f265a8d9f54e6f39843348
Backport of 2765adc8dcbaa41662af9000c4de2820418bf0a2 from master
Diffstat (limited to 'tests/utils_tests')
| -rw-r--r-- | tests/utils_tests/test_dateformat.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/utils_tests/test_dateformat.py b/tests/utils_tests/test_dateformat.py index 918cc2a518..143fbee4e3 100644 --- a/tests/utils_tests/test_dateformat.py +++ b/tests/utils_tests/test_dateformat.py @@ -1,6 +1,8 @@ from __future__ import unicode_literals +import sys from datetime import date, datetime +from unittest import skipIf from django.test import SimpleTestCase, override_settings from django.test.utils import TZ_SUPPORT, requires_tz_support @@ -34,6 +36,7 @@ class DateFormatTests(SimpleTestCase): 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 |
