[Zope3-Users] Questions about placefull vs placeless tests

Amos Latteier amos at latteier.com
Tue Feb 1 16:33:59 EST 2005


Hi,

I'm trying to figure out the differences between placefull and placeless 
unit tests.

I think that I understand the use of zope.app.tests.placelesssetup. It 
seems to allow you to setup the component architecture so that you can 
register adapters and views in your unit tests. I'm unclear on which if 
any ZCML configuration files are used in these cases (it seems that none 
are, since adapters have to be manually registered in unit tests.)

I'm less clear on when it's necessary or a good idea to use 
placefulSetUp. It seems to give you access to a site object, though I 
would assume that most of the stuff you'd do with a site object should 
be done with a functional rather than a unit test. I do see examples of 
using placefulsetup in order to allow a class to implement 
IAttributeAnnotatable. I don't understand if/why this is necessary.

Thanks for any pointers!

-Amos


More information about the Zope3-users mailing list