[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[pygame] TODO: add pygame unittests, and test runner stuff to pygame.test package.
- To: pygame-users@xxxxxxxx
- Subject: [pygame] TODO: add pygame unittests, and test runner stuff to pygame.test package.
- From: "René Dudfield" <renesd@xxxxxxxxx>
- Date: Sat, 13 Sep 2008 18:49:51 +1000
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: pygame-users-outgoing@xxxxxxxx
- Delivered-to: pygame-users@xxxxxxxx
- Delivery-date: Sat, 13 Sep 2008 04:49:57 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=9luUwteLkIh+DUlUZ3jgmGoCs/kvWo0qdngtywEDMx0=; b=tG25agqyb7mI6qs7g1fzbpVi4ZVVgMPbWFGma5xXVDjOv/9ba6MRUYPae04P6w/F/i rzLBf982C0NU1O+07S79ntRm6cmJ/iQ7dt9HRpHnI0jiZl6Nn5GKeZt21rZukNOQWEA1 gszV/nxPWRp+GP07vGbtpBDPUY9qgsZd3jb4A=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=Dvt4vLEQXW4yJips65KN0W2FgRky9HR+QkRCH8KCVM6yquVM6bCm1ka9WtIWiNFyK1 vVEwKbpU7tCa3AHvSTdeQZeiTvWTXVkTezuI2Xz0iC4xCp27r4b5MuC3q7vaTyL6VneM /aSjDbu/LmVZ+PLZZcbfokukAXk+t2le4i6Tg=
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
hi,
what do you think of a pygame.test package?
Here's an idea Nicholas and I have been discussing for adding the
pygame unittests, and test framework into a pygame module.
We haven't really threshed out the ideas fully yet, but here are the
notes for further discussion.
>>> # load the various tests.
>>> pygame.test.load()
>>> # run the tests.
>>> pygame.test.run()
>>> # module for generating stubs for untested code.
>>> pygame.test.gen_stubs
That is, making the tests a package of pygame.
Why?
=====
- people can run the tests to see if everything works in their own programs.
- So you could for example run the tests on a persons computer to
see if everything in pygame+ your program is working.
- you could also test which driver/function combination works, or
works fastest.
- it would make testing a py2exe/pyapp generated binary much easier.
- other people can use our testing framework enhancements for their own tests.
- would make bug reporting easier. Since everyone could run
unittests, since they will be installed everywhere pygame is
installed.
- would allow unittest result submission easy. This would result in a
much larger base of computers running the unittests and submitting
problems. This would be opt in of course.
- make the testing stuff more a library, than a framework.
- allow people submit unittests more easily. Since they won't require
a source release of pygame to write unittests. eg people using a
windows binary install of pygame, or a ubuntu binary install can run
and submit unittests.
How will it affect writing tests?
======================
Hopefully it won't. Tests will be written as they are now.
Probably have to make the tests not rely on data in examples/data
directory like some do.
Will allow more people to write unittests. Since they won't need the
source install of pygame.
How do you plan to implement it?
========================
Not sure yet.
keep the test directory as it is now... basically on install... make a
copy of it?
Will need to move some stuff around. Probably move some stuff into a
lib/test/ directory.