Coder Social home page Coder Social logo

coverage-jinja-plugin's Introduction

Jinja2 Coverage Plugin

A coverage.py plugin to measure the coverage of Jinja2 templates.

Install

$ pip install jinja_coverage

Configuration

Edit your .coveragerc to contain:

[run]
plugins =
    jinja_coverage

[jinja_coverage]
template_directory = path/to/templates

Known issues

This plugin appears to be collecting and reporting coverage information correctly. However Jinja2 does not provide enough information to map the collected data to the appropriate lines in the HTML template. For more information see Jinja #674.

Testing

$ pip install -r requirements.txt
$ python -m unittest discover

coverage-jinja-plugin's People

Contributors

atodorov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

coverage-jinja-plugin's Issues

Not published

This package isn't published to PyPi, so the given installation instructions don't work.

Support multiple and nested template directories

Regardless of how coverage sources are configured, this plugin only ever appear to work on a single top-level template directory.

You can set template_directory to a single sub-directory, but then everything in it reports 0% coverage.

This plugin needs to accept multiple top-level template directories, and it needs to correctly handle templates in sub-directories.

As an added bonus (if possible) it should also configure the sources so this doesn't need to be worked-around:

Only importable files (ones at the root of the tree, or in directories with a __init__.py file) will be considered

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.