Bugs item #1671562, was opened at 2007-03-01 05:22
Message generated for change (Comment added) made by cgroves
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=112867&aid=1671562&group_id=12867
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: targeted for 2.2beta2
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Pekka Laukkanen (laukpe)
Assigned to: Nobody/Anonymous (nobody)
Summary: test_datetime is locale dependent
Initial Comment:
When running Lib/test/regrtest.py I got following failures from test_datetime. 'pe maalis 22 18:03:05 2002' is correct in Finnish locale so probably only the test is buggy.
test_datetime
........................................................................F.......
................................................................................
F.................................
======================================================================
FAIL: test_more_ctime (test_datetime.TestDateTime)
----------------------------------------------------------------------
Traceback (most recent call last):
File "d:\workspace\jython\dist\lib\unittest.py", line 213, in __call__
testMethod()
File "d:\workspace\jython\dist\lib\test\test_datetime.py", line 1052, in test_
more_ctime
self.assertEqual(t.ctime(), time.ctime(time.mktime(t.timetuple())))
File "d:\workspace\jython\dist\lib\unittest.py", line 286, in failUnlessEqual
raise self.failureException, \
AssertionError: 'Fri Mar 22 18:03:05 2002' != 'pe maalis 22 18:03:05 2002'
======================================================================
FAIL: test_more_ctime (test_datetime.TestDateTimeTZ)
----------------------------------------------------------------------
Traceback (most recent call last):
File "d:\workspace\jython\dist\lib\unittest.py", line 213, in __call__
testMethod()
File "d:\workspace\jython\dist\lib\test\test_datetime.py", line 1052, in test_
more_ctime
self.assertEqual(t.ctime(), time.ctime(time.mktime(t.timetuple())))
File "d:\workspace\jython\dist\lib\unittest.py", line 286, in failUnlessEqual
raise self.failureException, \
AssertionError: 'Fri Mar 22 18:03:05 2002' != 'pe maalis 22 18:03:05 2002'
----------------------------------------------------------------------
Ran 194 tests in 6.610s
FAILED (failures=2)
----------------------------------------------------------------------
>Comment By: Charles Groves (cgroves)
Date: 2007-04-23 00:31
Message:
Logged In: YES
user_id=1174327
Originator: NO
The test was actually correct. time.ctime and time.asctime aren't
supposed to be locale aware, but Jython was using the default locale's time
strings. Fixed in r3183.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=112867&aid=1671562&group_id=12867
|