On 2009-07-13, Marius Gedminas mar...@gedmin.as wrote:
On Mon, Jul 13, 2009 at 12:27:50PM +, 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
On 2009-07-13, Marius Gedminas mar...@gedmin.as wrote:
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.
zope/testing/testrunner/runner.py's order_by_bases() function orders
layers by inheritance, basically. So if you've got a
FunctionalTestLayer that inherits from some BasicTestLayer, the tests
that use the basic test layer will be executed before the functional
test layer ones.
If there's no
On Mon, Jul 13, 2009 at 09:27:54AM +, Reinout van Rees wrote:
zope/testing/testrunner/runner.py's order_by_bases() function orders
layers by inheritance, basically. So if you've got a
FunctionalTestLayer that inherits from some BasicTestLayer, the tests
that use the basic test layer will
On 2009-07-13, Marius Gedminas mar...@gedmin.as wrote:
Whatever grok does that interferes with coverage should be fixed.
I did some more debugging. In the end it boils down to this:
With z3c.testsetup, you can specify a zcml file at the top of your test file.
z3c.testsetup creates a ZCMLLayer
On Mon, Jul 13, 2009 at 5:55 AM, Marius Gedminasmar...@gedmin.as wrote:
Personally I would much prefer for the unit test layer to be sorted
first. It is already treated specially by zope.testing; I see no harm
in hardcoding its sort order.
+1
--
Benji York
Senior Software Engineer
Zope
On Mon, Jul 13, 2009 at 12:27:50PM +, Reinout van Rees wrote:
On 2009-07-13, Marius Gedminas mar...@gedmin.as wrote:
Whatever grok does that interferes with coverage should be fixed.
I did some more debugging. In the end it boils down to this:
With z3c.testsetup, you can specify a
On Mon, Jul 13, 2009 at 3:36 PM, Marius Gedminasmar...@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