[Python-bugs-list] [ python-Bugs-763047 ] test_strptime fails on Linux
SourceForge.net
noreply@sourceforge.net
Thu, 03 Jul 2003 02:12:02 -0700
Bugs item #763047, was opened at 2003-06-30 11:33
Message generated for change (Comment added) made by hdima
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=763047&group_id=5470
Category: Python Library
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Dmitry Vasiliev (hdima)
Assigned to: Brett Cannon (bcannon)
Summary: test_strptime fails on Linux
Initial Comment:
Python 2.3b2+ (#1, Jun 30 2003, 10:50:39)
Linux version 2.4.18-19.7asp
test_strptime
test test_strptime failed -- Traceback (most recent
call last):
File
"/home/dima/src/other/python/dist/src/Lib/test/test_strptime.py",
line 312, in test_timezone
"LocaleTime().timezone has duplicate values but "
File
"/home/dima/src/other/python/dist/src/Lib/unittest.py",
line 268, in failUnless
if not expr: raise self.failureException, msg
AssertionError: LocaleTime().timezone has duplicate
values but timzone value not set to -1
1 test failed:
test_strptime
----------------------------------------------------------------------
>Comment By: Dmitry Vasiliev (hdima)
Date: 2003-07-03 13:12
Message:
Logged In: YES
user_id=388573
Ok, tz_daylight.diff fixes the problem.
----------------------------------------------------------------------
Comment By: Paul Jarc (prjsf)
Date: 2003-07-03 03:10
Message:
Logged In: YES
user_id=412110
I had the same problem; tz_daylight.diff indeed fixes it for me.
----------------------------------------------------------------------
Comment By: Brett Cannon (bcannon)
Date: 2003-07-03 01:34
Message:
Logged In: YES
user_id=357491
OK, so I didn't need to completely restructure how timezones are
handled (although I will for Python 2.4). The new patch adds a
check to see if time.daylight is true or not to decide whether it
should worry about duplicate values in time.tzname .
----------------------------------------------------------------------
Comment By: Brett Cannon (bcannon)
Date: 2003-07-02 00:27
Message:
Logged In: YES
user_id=357491
I knew it. Okay, I know exactly what the issue is and I came up
with a way to deal with it. Problem is that I need to completely
restructure how timezones are handled to do it. But it will
simplify the code and help remove special casing.
Unfortunately I am going to be taking a rather long drive today so
I won't get to this today (I think; I have been known to say this
and make it turn out to be a lie =). But I will get it down this
week and have a patch to test.
----------------------------------------------------------------------
Comment By: Dmitry Vasiliev (hdima)
Date: 2003-07-01 14:41
Message:
Logged In: YES
user_id=388573
Python 2.3b2+ (#1, Jul 1 2003, 10:37:33)
[GCC 2.96 20000731 (ASPLinux 7.3 2.96-112)] on linux2
Type "help", "copyright", "credits" or "license" for more
information.
>>> import time
>>> time.tzname
('UTC', 'UTC')
>>> time.daylight
0
>>>
----------------------------------------------------------------------
Comment By: Brett Cannon (bcannon)
Date: 2003-07-01 14:03
Message:
Logged In: YES
user_id=357491
What is time.tzname and time.daylight set for both of you guys?
----------------------------------------------------------------------
Comment By: Dmitry Vasiliev (hdima)
Date: 2003-07-01 13:32
Message:
Logged In: YES
user_id=388573
New patch produce new error:
-----------------------------
test_strptime
test test_strptime failed -- Traceback (most recent call last):
File
"/home/dima/src/other/python/dist/src/Lib/test/test_strptime.py",
line 299, in test_timezone
self.failUnlessEqual(strp_output.tm_isdst, 0)
File
"/home/dima/src/other/python/dist/src/Lib/unittest.py", line
292, in failUnlessEqual
raise self.failureException, \
AssertionError: -1 != 0
1 test failed:
test_strptime
------------------------------
Last time when I ran the test and it passed it was Python
2.3b1 (#1, Apr 28 2003, 11:09:08).
----------------------------------------------------------------------
Comment By: Dmitry Vasiliev (hdima)
Date: 2003-07-01 12:01
Message:
Logged In: YES
user_id=388573
Maybe it may helps: locale_time.timezone is ['UTC', 'GMT',
'UTC', ''] during testing
----------------------------------------------------------------------
Comment By: Brett Cannon (bcannon)
Date: 2003-07-01 11:42
Message:
Logged In: YES
user_id=357491
Damn. OK, lets take Raymond's suggestion and try removing the
time.tzset call. Try the new patch and let me know how it goes.
Also, when was the last time you ran the test and it passed? I am
trying to isolate if this is all happening because of my attempt to
take time.daylight into account.
----------------------------------------------------------------------
Comment By: Dmitry Vasiliev (hdima)
Date: 2003-07-01 11:25
Message:
Logged In: YES
user_id=388573
No, the same error remains
----------------------------------------------------------------------
Comment By: Brett Cannon (bcannon)
Date: 2003-07-01 05:46
Message:
Logged In: YES
user_id=357491
So it wasn't what I thought it would be. But I do think I found the
error. Dmitry, can you apply the patch that I attached to the
report and see if it fixes the problem?
----------------------------------------------------------------------
Comment By: Brett Cannon (bcannon)
Date: 2003-07-01 03:43
Message:
Logged In: YES
user_id=357491
It is the same error and I am 99% sure I know the problem
(stupid mistake on my part in the test). As soon as I am done
recompiling I will fix it locally and see if it takes.
----------------------------------------------------------------------
Comment By: Walter Dörwald (doerwalter)
Date: 2003-06-30 16:04
Message:
Logged In: YES
user_id=89016
This might be a duplicate of 763052, which reported to same
error under Windows.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=763047&group_id=5470