← Back to team overview

launchpad-dev team mailing list archive

Re: LayerIsolationError

 

Ok, so it turns out that there are two distinct behaviours for layer
teardown in zope.testrunner.

In one mode, it stops at the first exception.
In the other, it continues (see runner.py line 633).

Changing the layer order won't work:

def order_by_bases(layers):
    """Order the layers from least to most specific (bottom to top)
    """
    named_layers = [(name_from_layer(layer), layer) for layer in layers]
    named_layers.sort()

^ the layer name acts as a tie when two layers are at the same level
in the graph.

That seems like a goal to make things 'stable' even though it removes
control; the right thing to do is to make all the layers teardownable,
however making the code tolerant of both optional and nonoptional mode
for teardowns is needed.

Patch coming up.

-Rob



References