cpython: c143e66e5efe (original) (raw)
Mercurial > cpython
changeset 73886:c143e66e5efe 3.2
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 [#11886]
Victor Stinner victor.stinner@haypocalc.com | |
---|---|
date | Thu, 08 Dec 2011 00:32:51 +0100 |
parents | 17ceebc61b65 |
children | c7638be1e430 7efad6256e58 |
files | Lib/test/test_time.py |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-)[+] [-] Lib/test/test_time.py 7 |
line wrap: on
line diff
--- a/Lib/test/test_time.py +++ b/Lib/test/test_time.py @@ -206,7 +206,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]))[](#l1.7)
# Issue #11886: Australian Eastern Standard Time (UTC+10) is called[](#l1.9)
# "EST" (as Eastern Standard Time, UTC-5) instead of "AEST" on some[](#l1.10)
# operating systems (e.g. FreeBSD), which is wrong. See for example[](#l1.11)
# this bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=93810[](#l1.12)
self.assertIn(time.tzname[0], ('AEST' 'EST'), time.tzname[0])[](#l1.13) self.assertTrue(time.tzname[1] == 'AEDT', str(time.tzname[1]))[](#l1.14) self.assertEqual(len(time.tzname), 2)[](#l1.15) self.assertEqual(time.daylight, 1)[](#l1.16)