[Python-checkins] python/dist/src/Lib/test test_strptime.py, 1.21,
1.22
bcannon at users.sourceforge.net
bcannon at users.sourceforge.net
Mon Aug 11 13:06:15 EDT 2003
Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1:/tmp/cvs-serv2850/Lib/test
Modified Files:
test_strptime.py
Log Message:
Fix bug in test_bad_timezone where test was assuming locale knew of PDT.
Index: test_strptime.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_strptime.py,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** test_strptime.py 11 Aug 2003 07:24:05 -0000 1.21
--- test_strptime.py 11 Aug 2003 19:06:13 -0000 1.22
***************
*** 281,290 ****
if sys.platform == "mac":
return #MacOS9 has severely broken timezone support.
try:
original_tzname = time.tzname
original_daylight = time.daylight
! time.tzname = ("PDT", "PDT")
time.daylight = 1
! tz_value = _strptime.strptime("PDT", "%Z")[8]
self.failUnlessEqual(tz_value, -1)
finally:
--- 281,291 ----
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 = (tz_name, tz_name)
time.daylight = 1
! tz_value = _strptime.strptime(tz_name, "%Z")[8]
self.failUnlessEqual(tz_value, -1)
finally:
More information about the Python-checkins
mailing list