Taking a look at color.c, I believe the bug may actually rest in the
Py<type>_FromUnsignedLong/Py<type>_FromDouble/Py<type>_FromString functions
provided by the Python libs. There is no logical or numerical reason why,
from the numbers we have, we would get those values with those operations.
The tests beforehand affirm that the r, g, b, and a variables all the proper
values, it just happens to be the one step in the code. I'll examine
further.

-Tyler

On Fri, May 1, 2009 at 3:28 PM, René Dudfield <[email protected]> wrote:

> hi,
>
> Below are the failing unittests for Color on 64bit ubuntu.
>
>
>
>
> ======================================================================
> > FAIL: ColorTypeTest.test_float
> > ----------------------------------------------------------------------
> > Traceback (most recent call last):
> >   File "/usr/lib/python2.5/site-packages/pygame/tests/color_test.py",
> line
> > 412, in test_float
> >     self.assertEquals (float (c), float (0xCC00CC00))
> > AssertionError: 1.844674407283719e+19 != 3422604288.0
> >
> > ======================================================================
> > FAIL: ColorTypeTest.test_hex
> > ----------------------------------------------------------------------
> > Traceback (most recent call last):
> >   File "/usr/lib/python2.5/site-packages/pygame/tests/color_test.py",
> line
> > 442, in test_hex
> >     self.assertEquals (hex (c), hex (0xCC00CC00))
> > AssertionError: '0xffffffffcc00cc00L' != '0xcc00cc00'
> >
> > ======================================================================
> > FAIL: ColorTypeTest.test_int
> > ----------------------------------------------------------------------
> > Traceback (most recent call last):
> >   File "/usr/lib/python2.5/site-packages/pygame/tests/color_test.py",
> line
> > 494, in test_int
> >     self.assertEquals (int (c), int (0xCC00CC00))
> > AssertionError: 18446744072837188608L != 3422604288
> >
> > ======================================================================
> > FAIL: ColorTypeTest.test_long
> > ----------------------------------------------------------------------
> > Traceback (most recent call last):
> >   File "/usr/lib/python2.5/site-packages/pygame/tests/color_test.py",
> line
> > 511, in test_long
> >     self.assertEquals (long (c), long (0xCC00CC00))
> > AssertionError: 18446744072837188608L != 3422604288L
> >
> > ======================================================================
> > FAIL: ColorTypeTest.test_oct
> > ----------------------------------------------------------------------
> > Traceback (most recent call last):
> >   File "/usr/lib/python2.5/site-packages/pygame/tests/color_test.py",
> line
> > 427, in test_oct
> >     self.assertEquals (oct (c), oct (0xCC00CC00))
> > AssertionError: '01777777777771400146000L' != '031400146000'
> >
> > ======================================================================
> > FAIL: ColorTypeTest.test_webstyle
> > ----------------------------------------------------------------------
> > Traceback (most recent call last):
> >   File "/usr/lib/python2.5/site-packages/pygame/tests/color_test.py",
> line
> > 458, in test_webstyle
> >     self.assertEquals (hex (c), hex (0xCC00CC11))
> > AssertionError: '0xffffffffcc00cc11L' != '0xcc00cc11'
> >
> >
>



-- 
Visit my blog at http://oddco.ca/zeroth/zblog

Reply via email to