]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #11886: Fix also test_time for the non-DST timezone name (EST/AEST)
authorVictor Stinner <victor.stinner@haypocalc.com>
Sat, 10 Dec 2011 13:37:53 +0000 (14:37 +0100)
committerVictor Stinner <victor.stinner@haypocalc.com>
Sat, 10 Dec 2011 13:37:53 +0000 (14:37 +0100)
Lib/test/test_time.py

index cc5de21fd1c6cb9dc4dee5be36ecfa6df2845ad7..a73588cfcadadf8c0e78241b09d3428c218723a0 100644 (file)
@@ -252,11 +252,13 @@ class TimeTestCase(unittest.TestCase):
             self.assertNotEqual(time.gmtime(xmas2002), time.localtime(xmas2002))
 
             # 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
+            # "EST" (as Eastern Standard Time, UTC-5) instead of "AEST"
+            # (non-DST timezone), and "EDT" instead of "AEDT" (DST timezone),
+            # 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] in ('AEDT', 'EDT'), str(time.tzname[1]))
             self.assertEqual(len(time.tzname), 2)
             self.assertEqual(time.daylight, 1)
             self.assertEqual(time.timezone, -36000)