summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_strptime.py
diff options
context:
space:
mode:
authorBrett Cannon <bcannon@gmail.com>2003-08-11 19:06:13 (GMT)
committerBrett Cannon <bcannon@gmail.com>2003-08-11 19:06:13 (GMT)
commitc83124ab793a28c8995ff381d5867604c60bc07f (patch)
treeccae8d7d539a54a0b453d0755478a38d23d38612 /Lib/test/test_strptime.py
parent71665dc90d6bc79be710e2a6bea5dba417b2dcb3 (diff)
downloadcpython-c83124ab793a28c8995ff381d5867604c60bc07f.zip
cpython-c83124ab793a28c8995ff381d5867604c60bc07f.tar.gz
cpython-c83124ab793a28c8995ff381d5867604c60bc07f.tar.bz2
Fix bug in test_bad_timezone where test was assuming locale knew of PDT.
Diffstat (limited to 'Lib/test/test_strptime.py')
-rw-r--r--Lib/test/test_strptime.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/test/test_strptime.py b/Lib/test/test_strptime.py
index 4ce37f8..76bfd63 100644
--- a/Lib/test/test_strptime.py
+++ b/Lib/test/test_strptime.py
@@ -280,12 +280,13 @@ class StrptimeTests(unittest.TestCase):
# when time.tzname[0] == time.tzname[1] and time.daylight
if sys.platform == "mac":
return #MacOS9 has severely broken timezone support.
+ tz_name= time.tzname[0]
try:
original_tzname = time.tzname
original_daylight = time.daylight
- time.tzname = ("PDT", "PDT")
+ time.tzname = (tz_name, tz_name)
time.daylight = 1
- tz_value = _strptime.strptime("PDT", "%Z")[8]
+ tz_value = _strptime.strptime(tz_name, "%Z")[8]
self.failUnlessEqual(tz_value, -1)
finally:
time.tzname = original_tzname