diff options
author | Brett Cannon <bcannon@gmail.com> | 2003-07-03 19:59:57 (GMT) |
---|---|---|
committer | Brett Cannon <bcannon@gmail.com> | 2003-07-03 19:59:57 (GMT) |
commit | cde2200ff28a0a54a1dc62e6a63ca3936fee5177 (patch) | |
tree | 569f3472a7ee2c87c04d66442d6e9f3dd89d5a90 /Lib/test/test_strptime.py | |
parent | ebab26a70950f61b9c342b526b271aac36e1576e (diff) | |
download | cpython-cde2200ff28a0a54a1dc62e6a63ca3936fee5177.zip cpython-cde2200ff28a0a54a1dc62e6a63ca3936fee5177.tar.gz cpython-cde2200ff28a0a54a1dc62e6a63ca3936fee5177.tar.bz2 |
Fixes bug of timezone value being left as -1 when ``time.tzname[0] ==
time.tzname[1] and not time.daylight`` is true when it should only when
time.daylight is true. Tests are also fixed.
Closes bug #763047 and its cohort #763052.
Diffstat (limited to 'Lib/test/test_strptime.py')
-rw-r--r-- | Lib/test/test_strptime.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_strptime.py b/Lib/test/test_strptime.py index 2966e22..dcde2c3 100644 --- a/Lib/test/test_strptime.py +++ b/Lib/test/test_strptime.py @@ -303,14 +303,14 @@ class StrptimeTests(unittest.TestCase): strf_output = time.strftime("%Z") #UTC does not have a timezone strp_output = _strptime.strptime(strf_output, "%Z") locale_time = _strptime.LocaleTime() - if time.tzname[0] != time.tzname[1]: + if time.tzname[0] != time.tzname[1] or not time.daylight: self.failUnless(strp_output[8] == time_tuple[8], "timezone check failed; '%s' -> %s != %s" % (strf_output, strp_output[8], time_tuple[8])) else: self.failUnless(strp_output[8] == -1, - "LocaleTime().timezone has duplicate values but " - "timezone value not set to -1") + "LocaleTime().timezone has duplicate values and " + "time.daylight but timezone value not set to -1") def test_date_time(self): # Test %c directive |