[lxml-dev] xslt coverage
![](https://secure.gravatar.com/avatar/bd55d72cd1482d47fd55a63dbbb04bd9.jpg?s=120&d=mm&r=g)
Hi, are there any possibilities to get something like a line coverage from a xsl-transformation. That would be pretty useful, if integrated in a test-code-coverage run. --dirk
![](https://secure.gravatar.com/avatar/8b97b5aad24c30e4a1357b38cc39aeaa.jpg?s=120&d=mm&r=g)
Dirk Rothe wrote:
are there any possibilities to get something like a line coverage from a xsl-transformation. That would be pretty useful, if integrated in a test-code-coverage run.
There's the profiler (pass "profile_run=True" to the XSLT run), but it won't give you line coverage. http://codespeak.net/lxml/api/lxml.etree.XSLT-class.html#__call__ Stefan
![](https://secure.gravatar.com/avatar/bd55d72cd1482d47fd55a63dbbb04bd9.jpg?s=120&d=mm&r=g)
On Tue, 16 Dec 2008 12:42:35 +0100, Stefan Behnel <stefan_ml@behnel.de> wrote:
Dirk Rothe wrote:
are there any possibilities to get something like a line coverage from a xsl-transformation. That would be pretty useful, if integrated in a test-code-coverage run.
There's the profiler (pass "profile_run=True" to the XSLT run), but it won't give you line coverage.
http://codespeak.net/lxml/api/lxml.etree.XSLT-class.html#__call__
jep, I've seen that. Would be quite a task to generate a "function-level" report by extracting the template-matches. (with line numbers, respecting xsl:include ...) One would have to assume full coverage of all the conditional branches. Hmm, maybe I will try it some day :). thnx, dirk
participants (2)
-
Dirk Rothe
-
Stefan Behnel