[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Tests crashing Automatic Build page + Compiling PyGame on Windows



cool.

BTW, I think it's great that you are splitting up the tests to be in their own process. I always thought it was very unnatural of the test runner to run all the tests in the same process - so that pygame will get init and quit and have the display surface created and all that over an over again. Not that it would be bad to have a test that tests recreating the display surface and all that - just that 99.9% of all pygame apps will be launch process, init, set mode, then process exits, so testing that model is important.

On Sat, Jun 21, 2008 at 5:05 PM, Nicholas Dudfield <ndudfield@xxxxxxxxx> wrote:
Nice Find! Thanks a million Brian.

There must have been other tests that initialized the display and set the bit depth before hand implicitly.

That must be why it worked when run independently. The transfrom_test themselves are probably explicit.

Again, thanks!




Brian Fisher wrote:
hey Nick,
 is your desktop set to 16-bit maybe?
I haven't looked at the test code, but if bit depth isn't explicitly set it will use the desktop depth

On Sat, Jun 21, 2008 at 4:40 PM, Nicholas Dudfield <ndudfield@xxxxxxxxx <mailto:ndudfield@xxxxxxxxx>> wrote:


   ======================================================================
   ERROR: see if the destination surface can be passed in to use.
   ----------------------------------------------------------------------
   Traceback (most recent call last):
    File "D:\Losty\PyGame\trunk\test\transform_test.py", line 114, in
   test_scale_d
   estination
     s2 = pygame.transform.smoothscale(s, (64,64))
   ValueError: Only 24-bit or 32-bit surfaces can be smoothly scaled

   ======================================================================
   FAIL: test_average_surfaces (transform_test.TransformTest)
   ----------------------------------------------------------------------
   Traceback (most recent call last):
    File "D:\Losty\PyGame\trunk\test\transform_test.py", line 239, in
   test_average
   _surfaces
     self.assertEqual(sr.get_at((0,0)), (10,15,70,255))
   AssertionError: (8, 12, 66, 255) != (10, 15, 70, 255)

   ======================================================================
   FAIL: test_threshold_surface (transform_test.TransformTest)
   ----------------------------------------------------------------------
   Traceback (most recent call last):
    File "D:\Losty\PyGame\trunk\test\transform_test.py", line 145, in
   test_thresho
   ld_surface
     self.assertEqual(num_threshold_pixels, s1.get_height() *
   s1.get_width())
   AssertionError: 0 != 1024

   ----------------------------------------------------------------------
   Ran 264 tests in 5.703s

   FAILED (failures=2, errors=1)


   Then running transform_test.py independently:

   D:\Losty\PyGame\trunk\test>transform_test.py
   .....
   ----------------------------------------------------------------------
   Ran 5 tests in 0.016s

   OK


   _What the_?

   Any ideas guys? What am I doing wrong?