Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b4e9986

Browse files
committed
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.
1 parent e3454af commit b4e9986

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

Lib/test/test_strptime.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -299,9 +299,6 @@ def test_timezone(self):
299299
self.failUnlessEqual(strp_output.tm_isdst, 0)
300300
strp_output = _strptime.strptime("GMT", "%Z")
301301
self.failUnlessEqual(strp_output.tm_isdst, 0)
302-
if time.daylight:
303-
strp_output = _strptime.strptime(time.tzname[1], "%Z")
304-
self.failUnlessEqual(strp_output[8], 1)
305302
time_tuple = time.localtime()
306303
strf_output = time.strftime("%Z") #UTC does not have a timezone
307304
strp_output = _strptime.strptime(strf_output, "%Z")

0 commit comments

Comments
 (0)