[Python-checkins] python/dist/src/Lib/test test_strptime.py,1.14,1.15
rhettinger@users.sourceforge.net
rhettinger@users.sourceforge.net
Sun, 29 Jun 2003 08:57:52 -0700
Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1:/tmp/cvs-serv16059
Modified Files:
test_strptime.py
Log Message:
Removed invalid test.
Analysis by Bob Halley:
The test seems to expect that if time.daylight is true, then the
is_dst field of the tm structure will be 1 too. But this isn't
the case, since daylight is true if the timezone does DST, *not*
if DST is in effect.
Index: test_strptime.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_strptime.py,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** test_strptime.py 11 May 2003 06:23:36 -0000 1.14
--- test_strptime.py 29 Jun 2003 15:57:50 -0000 1.15
***************
*** 300,306 ****
strp_output = _strptime.strptime("GMT", "%Z")
self.failUnlessEqual(strp_output.tm_isdst, 0)
- if time.daylight:
- strp_output = _strptime.strptime(time.tzname[1], "%Z")
- self.failUnlessEqual(strp_output[8], 1)
time_tuple = time.localtime()
strf_output = time.strftime("%Z") #UTC does not have a timezone
--- 300,303 ----