diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-12-08 00:32:51 +0100 |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-12-08 00:32:51 +0100 |
commit | 0de2aaea7fbc5b9b5af1a01981db72e5e8e29283 (patch) | |
tree | 2d41b348f1aac4c91156f2de578c73980ff23358 | |
parent | 4988ca5c5559383122b345ba32657a1ab66f7320 (diff) | |
download | cpython-git-0de2aaea7fbc5b9b5af1a01981db72e5e8e29283.tar.gz |
Issue #11886: workaround an OS bug (time zone data) in test_time
Australian Eastern Standard Time (UTC+10) is called "EST" (as Eastern Standard
Time, UTC-5) instead of "AEST" on some operating systems (e.g. FreeBSD), which
is wrong. See for example this bug:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=93810
-rw-r--r-- | Lib/test/test_time.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Lib/test/test_time.py b/Lib/test/test_time.py index 0f00b1af52..28917ca856 100644 --- a/Lib/test/test_time.py +++ b/Lib/test/test_time.py @@ -184,7 +184,12 @@ class TimeTestCase(unittest.TestCase): environ['TZ'] = victoria time.tzset() self.assertNotEqual(time.gmtime(xmas2002), time.localtime(xmas2002)) - self.assertTrue(time.tzname[0] == 'AEST', str(time.tzname[0])) + + # Issue #11886: Australian Eastern Standard Time (UTC+10) is called + # "EST" (as Eastern Standard Time, UTC-5) instead of "AEST" on some + # operating systems (e.g. FreeBSD), which is wrong. See for example + # this bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=93810 + self.assertIn(time.tzname[0], ('AEST' 'EST'), time.tzname[0]) self.assertTrue(time.tzname[1] == 'AEDT', str(time.tzname[1])) self.assertEqual(len(time.tzname), 2) self.assertEqual(time.daylight, 1) |