Re: zope.testing coverage support

Attila Oláh <[email protected]>
Newsgroups gmane.comp.web.zope.devel
Message-ID <[email protected]>
Hi,

On Sun, Jan 17, 2010 at 16:08, Martin Aspeli <[email protected]> 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  -  [email protected]
> 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 )
>
_______________________________________________
Zope-Dev maillist  -  [email protected]
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 )
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.