[Zope-dev] test setup layer sorting

Reinout van Rees reinout at vanrees.org
Tue Jul 14 11:49:46 EDT 2009


On 2009-07-13, Marius Gedminas <marius at gedmin.as> wrote:
>
>
> On Mon, Jul 13, 2009 at 12:27:50PM +0000, Reinout van Rees wrote:
>> I my test files, I had two separate zcml files (one registered a bit
>> more than the other).  So I ended up with two separate ZCMLLayer
>> subclasses.  And both did some grokking.  So apparently the teardown
>> of a ZCMLLayer subclass when going from one to the next isn't that
>> clean.  There *is* a warning in zope.testing that teardown isn't fully
>> supported.
>
> Ah, that one.
>
> zope.testing supports test layers that muck up the global state
> irrepairably (by letting the layer's tearDown method raise
> NotImplementedError) and continues running the subsequent test layers in
> a fresh and squeaky-clean subprocess.
>
> Unfortunately, a separate process means separate coverage data tracking,
> and currently zope.testing doesn't support merging coverage data from
> several processes.

Thanks a lot, now I finally understand the cause of the problem I've been
seeing.  It is OK to figure out *when* something goes wrong, but the *why* is
more important.  Thanks!

Reinout

-- 
Reinout van Rees - reinout at vanrees.org - http://reinout.vanrees.org
Software developer at http://www.thehealthagency.com
"Military engineers build missiles. Civil engineers build targets"



More information about the Zope-Dev mailing list