[Zope-Coders] paging the testing committee
Jeremy Hylton
jeremy@zope.com
Tue, 16 Oct 2001 13:18:47 -0400 (EDT)
>>>>> "MF" == Martijn Faassen <faassen@vet.uu.nl> writes:
MF> Anyway, first I need to know what the testing standards are in
MF> the first place. Where do I look? I hear Guido say it was
MF> decided there was to be a committee to straighten things
MF> out. Who is in this committee and what progress has been made?
The committee included a bunch of people: Jim, Jeremy, Jeffrey, Fred,
Evan, Chris, Brian.
The simple stuff is really simple:
- Use the standard unittest module.
- Put tests in a subpackage named tests under the package being
tested.
- Never write tests that depend on being executed from a
particular location.
- If you need to store data in the tests directory, get at it
using imports. Example:
from ZODB.tests import MinPO
dir = os.path.dirname(MinPO.__file__)
- The test runner (person or program) is responsible for making
sure the Python path is set correctly to find all the needed
modules.
- Do not modify sys.path!
- Be aware that some tests need to work with Zope and
StandaloneZODB. If you modify those tests, make sure they work
with both checkouts.
packages: ZODB, BTrees, bsddb3Storage, ZEO, ExtensionClass,
Persistence, ThreadedAsync, zLOG, zdaemon
There was more stuff about the Testing package in Zope/lib/python.
I'm not sure I understand the details, but you need to import it to
use it.
There are a bunch of examples that execfile() something called
framework.py, but that's deprecated. I believe Tres has started
removing it.
Jeremy