Give more information about a ZCML layer when printing it

Bug #638780 reported by Jonathan Ballet on 2010-09-15
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

If you run tests containing some ZCML layers and some of them fail to setup properly, zope.testrunner along with's functional layer used to display something like:

        Tests with errors:
            runTest (zope.testrunner.runner.SetUpLayerFailure)
            runTest (zope.testrunner.runner.SetUpLayerFailure)
            runTest (zope.testrunner.runner.SetUpLayerFailure)
        Total: ...

Which is not very helpful. I proposed a patch for zope.testrunner which have been merged in r116424 (see ) which allows to display more informations about failing layers.
Attached to this bug report, I propose a small patch which will fit nicely with the new feature of zope.testrunner.

I'm not sure about the implementation details though: the thing I'm interested in is to have the ZCML file which failed and as such, only the __str__ has some interests. However, I don't know if it's a good idea to return the ZCML path to represent the str of a ZCMLLayer object.
So if you have better ideas for the implementation of this, feel free to change the patch.

Jonathan Ballet (multani) wrote :

With the good patch this time...

Fred Drake (fdrake) on 2011-06-02
summary: - Give more informations about a ZCML layer when printing it
+ Give more information about a ZCML layer when printing it
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers