summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_time.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-12-07 23:33:14 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-12-07 23:33:14 (GMT)
commitbc9f0c68f5fc2376817206354833af101985e3e2 (patch)
treea3f8b071f095b1e3c3dce5e2f4e53faafd1f2461 /Lib/test/test_time.py
parent0c4fbff6a72164ed18146fbc05d4601eb8881dc5 (diff)
parent0cd479074d3e607e81661e73440eff87264cf737 (diff)
downloadcpython-bc9f0c68f5fc2376817206354833af101985e3e2.zip
cpython-bc9f0c68f5fc2376817206354833af101985e3e2.tar.gz
cpython-bc9f0c68f5fc2376817206354833af101985e3e2.tar.bz2
(Merge 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
Diffstat (limited to 'Lib/test/test_time.py')
-rw-r--r--Lib/test/test_time.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/Lib/test/test_time.py b/Lib/test/test_time.py
index f8db499..cc5de21 100644
--- a/Lib/test/test_time.py
+++ b/Lib/test/test_time.py
@@ -250,7 +250,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)