[Patches] [ python-Patches-1462361 ] Possible fix to #1334662 (int() wrong answers)
SourceForge.net
noreply at sourceforge.net
Fri Mar 31 22:55:16 CEST 2006
Patches item #1462361, was opened at 2006-03-31 21:23
Message generated for change (Comment added) made by titty
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1462361&group_id=5470
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: Core (C code)
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Ivan Vilata i Balaguer (ivilata)
Assigned to: Nobody/Anonymous (nobody)
Summary: Possible fix to #1334662 (int() wrong answers)
Initial Comment:
This is the patch I talked about in #1334662. I think
it fixes int() returning zero for non-zero literals
under some bases.
----------------------------------------------------------------------
Comment By: Ralf Schmitt (titty)
Date: 2006-03-31 22:55
Message:
Logged In: YES
user_id=17929
After applying the patch to mystrtoul all tests work.
tests were run on ubuntu dapper amd64
----------------------------------------------------------------------
Comment By: Ralf Schmitt (titty)
Date: 2006-03-31 22:51
Message:
Logged In: YES
user_id=17929
with patch to tests applied I get:
===============================================
=======================
FAIL: test_int (__main__.BuiltinTest)
-----------------------------------------------------------------
-----
Traceback (most recent call last):
File "Lib/test/test_builtin.py", line 685, in test_int
self.assertEqual(int('c9c336o0mlb7eg', 25), max_uint64)
AssertionError: 0 != 18446744073709551616L
-----------------------------------------------------------------
-----
Ran 60 tests in 0.118s
FAILED (failures=1)
Traceback (most recent call last):
File "Lib/test/test_builtin.py", line 103, in <module>
class BuiltinTest(unittest.TestCase):
File "Lib/test/test_builtin.py", line 1587, in test_main
run_unittest(*test_classes)
File "/home/ralf/python-trunk/Lib/test/test_support.py", line 300, in
run_unittest
run_suite(suite, testclass)
File "/home/ralf/python-trunk/Lib/test/test_support.py", line 285, in
run_suite
raise TestFailed(err)
test.test_support.TestFailed: Traceback (most recent call last):
File "Lib/test/test_builtin.py", line 685, in test_int
self.assertEqual(int('c9c336o0mlb7eg', 25), max_uint64)
AssertionError: 0 != 18446744073709551616L
----------------------------------------------------------------------
Comment By: Ivan Vilata i Balaguer (ivilata)
Date: 2006-03-31 22:12
Message:
Logged In: YES
user_id=1064183
This is a little modification to ``test_builtin.py`` to
check for the bug. It would be nice for someone to run it
under a 64-bit platform!
----------------------------------------------------------------------
Comment By: Ivan Vilata i Balaguer (ivilata)
Date: 2006-03-31 21:29
Message:
Logged In: YES
user_id=1064183
I *love* this web interface... Here you have the patch.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1462361&group_id=5470
More information about the Patches
mailing list