Answering my own post, I just discovered something else:

Paul Winkler said:
> It mostly seems to work, but as far as I can tell, you *must*
> inherit in exactly that order, i.e.
>
> class MyTest(ZopeTestCase.Sandboxed, CMFTestCase.CMFTestCase):

As it turns out, even with my modification to setupCMFSite(),
you really *want* to inherit in this order anyway.
If you don't, Sandboxed doesn't seem to do any good.
i.e. if you inherit in that order, you will avoid polluting
the ZODB after the test suite finishes.  (At least that
seems to be the case from some quick experimentation, and
AFAICT that's the intended purpose of Sandboxed, right?)

If you inherit in the other order, e.g.
class Foo(CMFTestCase.CMFTestCase, ZopeTestCase.Sandboxed),
then you have to be sure you've deleted anything
that might still be around in beforeTearDown().
So I guess in that case there's no point in inheriting
from Sandboxed.

-- 
Paul Winkler
http://www.slinkp.com



_______________________________________________
Zope-CMF maillist  -  Zope-CMF@lists.zope.org
http://mail.zope.org/mailman/listinfo/zope-cmf

See http://collector.zope.org/CMF for bug reports and feature requests

Reply via email to