[ python-Bugs-983585 ] test_repr() fails with id() values that
appear negative
SourceForge.net
noreply at sourceforge.net
Thu Jul 1 16:02:02 EDT 2004
Bugs item #983585, was opened at 2004-07-01 14:15
Message generated for change (Comment added) made by tim_one
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=983585&group_id=5470
Category: Python Library
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Fred L. Drake, Jr. (fdrake)
>Assigned to: Fred L. Drake, Jr. (fdrake)
Summary: test_repr() fails with id() values that appear negative
Initial Comment:
test_repr() fails when memory allocations are handed
out at high addresses.
test_repr
test test_repr failed -- Traceback (most recent call last):
File
"/home/fdrake/projects/python/trunk/Lib/test/test_repr.py",
line 109, in test_instance
eq(r(i3), ("<ClassWithFailingRepr instance at
%x>"%id(i3)))
AssertionError: '<ClassWithFailingRepr instance at
x42373cf4>' != '<ClassWithFailingRepr instance at
-42373cf4>'
----------------------------------------------------------------------
>Comment By: Tim Peters (tim_one)
Date: 2004-07-01 16:02
Message:
Logged In: YES
user_id=31435
Fred, please try the attached patch. If it works on your box,
just check it in. repr.py was doing a dumb thing, assuming
that hex(number) always starts with '0x'. The patch also
does a dumb thing, but it's the same as the dumb thing
test_repr.py does <wink>.
----------------------------------------------------------------------
Comment By: Fred L. Drake, Jr. (fdrake)
Date: 2004-07-01 14:16
Message:
Logged In: YES
user_id=3066
I'll add that this was run on a Fedora Core 1 system.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=983585&group_id=5470
More information about the Python-bugs-list
mailing list