Re: [Pyunit-interest] Run all tests in the current directory
Brought to you by:
purcell
From: Jeremy H. <je...@zo...> - 2002-03-15 00:15:46
|
There's a fairly elaborate test driver that we use for Zope and StandaloneZODB. It's basic function is to find all the unittest suites in a large collection of Python packages, based on a few simple naming conventions. Test suites are contained in subpackages named tests, in module with names that start with 'test'. Each module has a function test_suite() that returns the unittest suite. It's got a bunch of other handy features: - connected to distutils setup/build commands - use regexes to specify particular modules or tests methods - print tracebacks immediately, rather than at the end (very handy when the full test suite takes 5-10 minutes) - run the tests in a loop to look for memory leaks You can find it at cvs.zope.org. Look for Zope3/test.py on the Zope-3x-branch or StandaloneZODB/test.py on the trunk. Jeremy |