Re: [Zope-dev] zope.testing coverage support
Stephan Richter wrote: > On Sunday 17 January 2010, Martin Aspeli wrote: >> I'm using zope.testing-3.7.7, which is what comes with Zope 2.12. > > Here is what I have in effectively any package: > > [coverage-test] > recipe = zc.recipe.testrunner > eggs = pkg [test] > defaults = ['--coverage', '../../coverage'] > > [coverage-report] > recipe = zc.recipe.egg > eggs = z3c.coverage > scripts = coverage=coverage-report > arguments = ('coverage', 'coverage/report') Thanks! As a matter of constructive criticism, it would be useful to have something like this on the z3c.caching PyPI page. Right now, there is no way that I can see to understand how the package is meant to be used from that page, or any of the other documentation. It'd also be useful to note that enscript must be installed for syntax highlighting to work. I only figured that out by reading the source. 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@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 )
Re: [Zope-dev] zope.testing coverage support
On Sunday 17 January 2010, Martin Aspeli wrote: > I'm using zope.testing-3.7.7, which is what comes with Zope 2.12. Here is what I have in effectively any package: [coverage-test] recipe = zc.recipe.testrunner eggs = pkg [test] defaults = ['--coverage', '../../coverage'] [coverage-report] recipe = zc.recipe.egg eggs = z3c.coverage scripts = coverage=coverage-report arguments = ('coverage', 'coverage/report') Regards, Stephan -- Entrepreneur and Software Geek Google me. "Zope Stephan Richter" ___ Zope-Dev maillist - Zope-Dev@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 )
Re: [Zope-dev] zope.testing coverage support
Hi. On Sun, Jan 17, 2010 at 4:08 PM, Martin Aspeli wrote: > A couple of questions about zope.testing's --coverage option: I think the standard option is to use something like this buildout snippet: [coverage-test] recipe = zc.recipe.testrunner eggs = ${buildout:eggs} defaults = ['--coverage', '../../coverage'] [coverage-report] recipe = zc.recipe.egg eggs = z3c.coverage scripts = coverage=coverage-report arguments = ('coverage', 'report') And then run: bin/coverage-test bin/coverage-report Hanno ___ Zope-Dev maillist - Zope-Dev@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 )
Re: [Zope-dev] zope.testing coverage support
Attila Oláh wrote: > You can get the same result as with `pwd` by using --coverage=../../coverage D'oh! The current path is parts/test (via zc.recipe.testrunner). I did *not* expect that. I think this needs to be documented at least, though I think it would make more sense if the current directory was, well, the current directory. :) 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@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 )
Re: [Zope-dev] zope.testing coverage support
Hi, On Sun, Jan 17, 2010 at 16:08, Martin Aspeli 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-...@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 ) > ___ Zope-Dev maillist - Zope-Dev@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 )
[Zope-dev] zope.testing coverage support
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. 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@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 )
[Zope-dev] Zope Tests: 6 OK
Summary of messages to the zope-tests list. Period Sat Jan 16 12:00:00 2010 UTC to Sun Jan 17 12:00:00 2010 UTC. There were 6 messages: 6 from Zope Tests. Tests passed OK --- Subject: OK : Zope-2.10 Python-2.4.6 : Linux From: Zope Tests Date: Sat Jan 16 20:37:53 EST 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-January/013395.html Subject: OK : Zope-2.11 Python-2.4.6 : Linux From: Zope Tests Date: Sat Jan 16 20:39:53 EST 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-January/013396.html Subject: OK : Zope-2.12 Python-2.6.4 : Linux From: Zope Tests Date: Sat Jan 16 20:41:53 EST 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-January/013397.html Subject: OK : Zope-2.12-alltests Python-2.6.4 : Linux From: Zope Tests Date: Sat Jan 16 20:43:53 EST 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-January/013398.html Subject: OK : Zope-trunk Python-2.6.4 : Linux From: Zope Tests Date: Sat Jan 16 20:45:53 EST 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-January/013399.html Subject: OK : Zope-trunk-alltests Python-2.6.4 : Linux From: Zope Tests Date: Sat Jan 16 20:47:54 EST 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-January/013400.html ___ Zope-Dev maillist - Zope-Dev@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 )