From: Victor Stinner Date: Wed, 7 Dec 2011 23:32:51 +0000 (+0100) Subject: Issue #11886: workaround an OS bug (time zone data) in test_time X-Git-Tag: v3.2.3rc1~304 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0cd479074d3e607e81661e73440eff87264cf737;p=thirdparty%2FPython%2Fcpython.git 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 --- diff --git a/Lib/test/test_time.py b/Lib/test/test_time.py index 8499af815771..ce57d876add3 100644 --- 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])) + + # 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)