Give more information about a ZCML layer when printing it

Bug #638780 reported by Jonathan Ballet
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
zope.app.testing
New
Undecided
Unassigned

Bug Description

If you run tests containing some ZCML layers and some of them fail to setup properly, zope.testrunner along with zope.app.testing'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 http://svn.zope.org/zope.testrunner/?view=rev&rev=116424 ) 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.

Revision history for this message
Jonathan Ballet (multani) wrote :

With the good patch this time...

Fred Drake (fdrake)
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.