Correct me if I'm wrong, but doesn't unittest specifically give you a way to perform setup and tear-down actions before/after each test? Seems like that would be a good candidate for calling init and quit.
-FM On 6/29/08, Lenard Lindstrom <[EMAIL PROTECTED]> wrote: > Marcus von Appen wrote: >> On, Sun Jun 29, 2008, Lenard Lindstrom wrote: >> >> >>> Lenard Lindstrom wrote: >>> >> >> [...] >> >>> I take that back. Rearranging the test execution to that of the >>> automated build site gives me an error. It is unrelated to PixelArray. >>> >>> ERROR: test_surfarray_ref (surflock_test.SurfaceLockTest) >>> ---------------------------------------------------------------------- >>> Traceback (most recent call last): >>> File "test\surflock_test.py", line 141, in test_surfarray_ref >>> ar = pygame.surfarray.pixels2d (sf) >>> File "C:\PRG\PYTHON25\lib\site-packages\pygame\surfarray.py", line >>> 122, in pix >>> els2d >>> return numericsf.pixels2d (surface) >>> ValueError: unsupport bit depth for 2D reference array >>> >>> ---------------------------------------------------------------------- >>> Ran 469 tests in 24.000s >>> >>> FAILED (errors=1) >>> >>> >>> My experience is such errors are related to the display's settings. One >>> or more unit tests which call pygame.display.set_mode fail to do proper >>> cleanup by later calling pygame.quit . >>> >> >> Probably you've got a 24bpp setting active, which caused the surflock >> test to fail as I forgot to explicitly set the surface depth to 32 >> bit. Fixed in rev. >> >> > Okay, it works. But one should be able to rely on the default > pre-pygame.init() setting, 32 bpp, for each unit test. A unit test that > confirms this default could fail. Too much interference between test > modules. > > -- > Lenard Lindstrom > <[EMAIL PROTECTED]> > >