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

Re: [pygame] What's next for Pygame project?



On 15-07-15 05:44 AM, Sam Bull wrote:
On Sun, 2015-07-12 at 18:48 -0700, Lenard Lindstrom wrote:
A Pygame buildbot two tasks, building a Pygame installer for a
particular operating system, then running the Pygame unit tests on the
new build.
On the note of testing, I would also like to see pygame's unittest to be
removed and for the tests to use Python's built-in unnittest module.

Does anybody know the reason this exists? Is there a valid reason we're
not already using the standard library unittest module?

Pygame's unittest appears to emulate the standard library, but the
implementation is different, and some things aren't tested properly.

For example, assertNotEqual does not test if they are not equal (with
!=), but rather if their equality is false (with ==). When running the
rect tests under the standard library implementation which actually
tests not equals, one of the tests failed.

I've fixed that test now, but it would make more sense to be using the
standard library implementation that everyone else is using and is well
maintained.
The reasons for a custom unittest are listed at the bottom of test/test_utils/unittest_patch.py. The unittest is taken from Python 2.5, updated for Python 3 compatibility. But I agree, we should try to use the standard unittest library.