[ python-Bugs-897817 ] test_strptime failures on FC2-test

SourceForge.net noreply at sourceforge.net
Mon Feb 23 23:26:31 EST 2004


Bugs item #897817, was opened at 2004-02-15 21:52
Message generated for change (Comment added) made by bcannon
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=897817&group_id=5470

Category: Python Library
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Anthony Baxter (anthonybaxter)
Assigned to: Anthony Baxter (anthonybaxter)
Summary: test_strptime failures on FC2-test

Initial Comment:
I'm seeing test_strptime failures on this box, running
a version of Fedora Core that's between 1 and the new
test release.

test test_strptime failed -- Traceback (most recent
call last): 
File "Lib/test/test_strptime.py", line 258, in
test_timezone
    self.failUnlessEqual(strp_output.tm_isdst, 0)
AssertionError: -1 != 0

Note that the following line (which tests GMT) also
fails with a -1.

The underlying failure:
>>> import _strptime
>>> strp_output = _strptime.strptime("UTC", "%Z")
>>> strp_output.tm_isdst
-1
>>> strp_output = _strptime.strptime("GMT", "%Z")
>>> strp_output.tm_isdst
-1


----------------------------------------------------------------------

>Comment By: Brett Cannon (bcannon)
Date: 2004-02-23 20:26

Message:
Logged In: YES 
user_id=357491

A possible cause for this, Anthony, is having the timezone set to ("UTC", 
"GMT") and time.daylight to a 1.  This would lead to not passing the test 
since there is an explicit test in the strptime code for when duplicate 
non-DST and DST timezones are the same and this would do it since UTC 
and GMT are injected into the non-DST timezone list for comparisons.  
The default is -1 since you can't tell the proper value if both non-DST and 
DST are the same.  And UTC and GMT should not be considered DST 
timezones obviously.

Anyway, I hope you don't find anything wrong and it was just a weird 
glitch in the date settings.

----------------------------------------------------------------------

Comment By: Anthony Baxter (anthonybaxter)
Date: 2004-02-23 19:05

Message:
Logged In: YES 
user_id=29957

Very very strange. I rebuilt python, and the problem has
gone away. I will assign this to myself and try and
reproduce it. 

----------------------------------------------------------------------

Comment By: Brett Cannon (bcannon)
Date: 2004-02-17 13:39

Message:
Logged In: YES 
user_id=357491

Anthony, can you let me know what the following commands spit out?::

import time; import _strptime
time.tzname
time.daylight
_strptime.LocaleTime().timezone
_strptime.TimeRE()['Z']

That should be enough info for me to debug this.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=897817&group_id=5470



More information about the Python-bugs-list mailing list