<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Randy, what I'm hoping is that the plugin feature is enough that
    other people can support their language of choice by writing
    plugins.  Ideally, the Jinja project would provide the coverage.py
    plugin, and support it.  But yes, I would love to be able to
    coverage-measure Jinja templates.<br>
    <br>
    --Ned.<br>
    <br>
    <div class="moz-cite-prefix">On 1/16/15 11:08 AM, Randy Syring
      wrote:<br>
    </div>
    <blockquote cite="mid:54B9376A.40806@thesyrings.us" type="cite">
      <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
      <div class="moz-cite-prefix">Hi Ned,<br>
        <br>
        Very nice!  If this works, will Jinja templates be something you
        would look to support as well?<br>
        <div class="moz-signature"><br>
          <b>Randy Syring</b><br>
          <small>Husband | Father | Redeemed Sinner</small><br>
          <br>
          <i><small>"For what does it profit a man to gain the whole
              world<br>
              and forfeit his soul?" (Mark 8:36 ESV)</small></i> <br>
          <br>
        </div>
        On 01/16/2015 10:46 AM, Ned Batchelder wrote:<br>
      </div>
      <blockquote cite="mid:54B93250.7020201@nedbatchelder.com"
        type="cite">
        <meta http-equiv="content-type" content="text/html;
          charset=utf-8">
        Hi,<br>
        <br>
        I've added support to coverage.py for plugins to support
        non-Python files, and I've written a plugin to measure Django
        templates.  I'm looking for people interested in trying it out
        in its current alpha-state.<br>
        <br>
        If you'd like to try it, the plugin itself is pip installable:
        pip install django_coverage_plugin . To run it, add these
        settings to your .coveragerc:<tt><br>
        </tt>
        <blockquote><tt>[run]</tt><br>
          <tt># won't be needed eventually</tt><tt><br>
          </tt><tt> </tt><tt>timid = True</tt><tt><br>
          </tt><tt><br>
            plugins =</tt><tt><br>
          </tt><tt>    django_coverage_plugin</tt><br>
        </blockquote>
        Then run your tests under coverage as you normally would.  It
        requires coverage.py&gt;=4.0a2, so it may not work with other
        coverage-related tools if you have them, such as coveralls.io. 
        You will see your templates listed in your coverage report
        alongside your Python modules (they have a .html extension but
        no directory, that's still to be fixed).<br>
        <br>
        The technique used to measure the coverage is the same that
        Dmitry Trofimov used in dtcov, but integrated into coverage.py,
        and made more performant.  I'd love to see how well it works in
        a real production project.  If you want to help me with, feel
        free to reply offlist if it's more appropriate.<br>
        <br>
        BTW, the coverage.py plugin mechanism is designed to be
        generally useful for hooking into the collection and reporting
        phases of coverage.py, specifically to support non-Python
        files.  I've also got a plugin for Mako templates, but it needs
        some fixes from Mako.  If you have non-Python files you'd like
        to add coverage support for, let's talk.<br>
        <br>
        Thanks,<br>
        <br>
        --Ned. <br>
        <fieldset class="mimeAttachmentHeader"></fieldset>
        <br>
        <pre wrap="">_______________________________________________
testing-in-python mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:testing-in-python@lists.idyll.org">testing-in-python@lists.idyll.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.idyll.org/listinfo/testing-in-python">http://lists.idyll.org/listinfo/testing-in-python</a>
</pre>
      </blockquote>
      <br>
    </blockquote>
    <br>
  </body>
</html>