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
This commit is contained in:
parent
4988ca5c55
commit
0de2aaea7f
|
@ -184,7 +184,12 @@ class TimeTestCase(unittest.TestCase):
|
||||||
environ['TZ'] = victoria
|
environ['TZ'] = victoria
|
||||||
time.tzset()
|
time.tzset()
|
||||||
self.assertNotEqual(time.gmtime(xmas2002), time.localtime(xmas2002))
|
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.assertTrue(time.tzname[1] == 'AEDT', str(time.tzname[1]))
|
||||||
self.assertEqual(len(time.tzname), 2)
|
self.assertEqual(len(time.tzname), 2)
|
||||||
self.assertEqual(time.daylight, 1)
|
self.assertEqual(time.daylight, 1)
|
||||||
|
|
Loading…
Reference in New Issue