[Zope-dev] zope.testing coverage support
Attila Oláh
attilaolah at gmail.com
Sun Jan 17 10:29:46 EST 2010
Hi,
On Sun, Jan 17, 2010 at 16:08, Martin Aspeli <optilude+lists at gmail.com> wrote:
> Hi,
>
> A couple of questions about zope.testing's --coverage option:
>
> 1. When specifying the coverage output directory, I have to specify an
> absolute path:
>
> ./bin/test -s plone.caching --coverage="$(pwd)/coverage"
>
> works
>
> ./bin/test -s plone.caching --coverage="coverage"
>
> does not. Is this intentional? It took me ages to figure out this was
> necessary.
Relative paths work for me.
$ ./bin/test --coverage=coverage
# ...
$ ls parts/test/coverage/
zope.interface.adapter.cover
zope.interface.exceptions.cover
zope.interface.tests.test_advice.cover
zope.interface.advice.cover
zope.interface.interface.cover
zope.interface.tests.test_declarations.cover
zope.interface.common.__init__.cover
zope.interface.ro.cover
zope.interface.tests.test_document.cover
zope.interface.common.idatetime.cover
zope.interface.tests.__init__.cover
zope.interface.tests.test_element.cover
zope.interface.common.interfaces.cover
zope.interface.tests.dummy.cover
zope.interface.tests.test_interface.cover
zope.interface.common.tests.__init__.cover
zope.interface.tests.ifoo.cover
zope.interface.tests.test_odd_declarations.cover
zope.interface.common.tests.test_idatetime.cover
zope.interface.tests.m1.cover
zope.interface.tests.test_sorting.cover
zope.interface.common.tests.test_import_interfaces.cover
zope.interface.tests.m2.cover
zope.interface.tests.test_verify.cover
zope.interface.declarations.cover
zope.interface.tests.odd.cover
zope.interface.tests.unitfixtures.cover
zope.interface.document.cover
zope.interface.tests.test_adapter.cover zope.interface.verify.cover
You can get the same result as with `pwd` by using --coverage=../../coverage
> 2. Is there anything that can read the coverage output files and
> present them with syntax highlighting and highlight problem areas? I
> know other tools (like Cobertura) have this. Is there a standard, or is
> it a custom format?
>
> 3. I get coverage reporting for my tests (i.e. it lists coverage of
> the tests package). The PyPI page for zope.testing talks about ignoring
> tests, but that part of the doctest is not useful as documentation. Is
> this a bug or a feature or something I'm supposed to be specifying on
> the command line?
>
> I'm using zope.testing-3.7.7, which is what comes with Zope 2.12.
>
> Martin
>
> --
> Author of `Professional Plone Development`, a book for developers who
> want to work with Plone. See http://martinaspeli.net/plone-book
>
> _______________________________________________
> Zope-Dev maillist - Zope-Dev at zope.org
> https://mail.zope.org/mailman/listinfo/zope-dev
> ** No cross posts or HTML encoding! **
> (Related lists -
> https://mail.zope.org/mailman/listinfo/zope-announce
> https://mail.zope.org/mailman/listinfo/zope )
>
More information about the Zope-Dev
mailing list