[Zope3-dev] Making tests loopable
Jim Fulton
jim at zope.com
Tue Sep 23 15:13:21 EDT 2003
I'm on a small crusade to make the Zope 3 tests runnable in a loop.
This is important so that we can look for memory leaks (using test.py's
-r and -L options).
Unit tests are supposed to leave their environment as they found it, so
they don't affect other tests. That would seem to mean that they should
not interfere with themselves. :)
There were about 15 tests that didn't run in a loop. I've fixed most of these.
There are still a few that don't run in a loop:
test_provideInterface (zope.app.dav.tests.test_directives.DirectivesTest)
test_newMessage (zope.app.mail.tests.test_maildir.TestMaildir)
testSend (zope.app.mail.tests.test_service.TestQueuedMailService)
test_register (zope.app.onlinehelp.tests.test_helpdirectives.DirectivesTest)
test_sourcetype (zope.app.renderer.tests.test_directives.DirectivesTest)
It would be great if someone (e.g. the test authors ;) would fix these.
To see the failures, run the tests with -L, as in:
python test.py -L --dir zope/app/renderer . test_sourcetype
Jim
P.S. You might want to look at my checkin messahes for today to see
the sorts of things I had to change for the tests I fixed.
--
Jim Fulton mailto:jim at zope.com Python Powered!
CTO (703) 361-1714 http://www.python.org
Zope Corporation http://www.zope.com http://www.zope.org
More information about the Zope3-dev
mailing list