[Zope-dev] test setup layer sorting

Fred Drake fdrake at gmail.com
Mon Jul 13 16:51:48 EDT 2009


On Mon, Jul 13, 2009 at 3:36 PM, Marius Gedminas<marius at gedmin.as> wrote:
> Fortunately, the NotImplementedError in ZCMLLayer's tearDown is just a
> precaution, 99% of the time it is sufficient to run CleanUp.tearDown
> to get the global state restored to its pristine condition.

Keep in mind that a number of commonly-used ZCML directives stamp
interfaces on classes; these aren't cleaned up with the general
tear-down.

If each layer stamps the same interfaces on the same classes, the only
issue is ensuring that unit tests run first.  If, however, you have
different layers that may apply different sets of interfaces to
different classes, you're may be relying on the process boundary as
part of the required isolation.


  -Fred

-- 
Fred L. Drake, Jr.    <fdrake at gmail.com>
"Chaos is the score upon which reality is written." --Henry Miller


More information about the Zope-Dev mailing list