Try to display informations about a layer if its setup has failed

Bug #638153 reported by Jonathan Ballet
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
zope.testrunner
Fix Released
Undecided
Tres Seaver

Bug Description

If a layer fails to execute, zope.testrunner displays in its summary some not very interesting messages:

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

I made a patch to allow the SetUpLayerFailure to display something more useful, if the underlying layer supports it. It now calls the _str__ method of the layer object which has failed, which produces something like this:

        Tests with errors:
            Layer: some.tests.layer1
        Total: ...

I also plan to make a patch on zope.app.testing's functional ZCML layer to display the name of the ZCML file of the layer in its __str__, in order to have something like:

        Tests with errors:
           Layer: /foo/bar/baz/ftesting.zcml
           Layer: /flip/flap/flop/ftesting.zcml
        Total: ...

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

This patch looks very reasonable.

Changed in zope.testrunner:
status: New → In Progress
assignee: nobody → Tres Seaver (tseaver)
Revision history for this message
Tres Seaver (tseaver) wrote :

Thanks very much for the patch. I have committed it to the trunk for the zope.testrunner 4.0 release.

Changed in zope.testrunner:
status: In Progress → Fix Committed
Tres Seaver (tseaver)
Changed in zope.testrunner:
status: Fix Committed → Fix Released
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.