• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pytest-dev / pytest-django / 607 / 9
39%
master: 39%

Build:
DEFAULT BRANCH: master
Ran 04 Nov 2016 03:08PM UTC
Files 512
Run time 46s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

04 Nov 2016 03:08PM UTC coverage: 54.047%. First build
TESTENV=python3.2-master-sqlite_file

Pull #222

travis-ci

Johannes Hoppe
Adds tests for invalid template variables

Django catches all `VariableDoesNotExist` exceptions to replace
them in templates with a modifiable string that you can define in
your settings.
Sadly that doesn't allow you to find them in unit tests.

`_fail_for_invalid_template_variable` sets the setting
`TEMPLATE_STRING_IF_INVALID` to a custom class that not only fails
the current test but prints a pretty message including the template
name.

A new marker allows disabling this behavior, eg:

    @pytest.mark.ignore_template_errors
    def test_something():
        pass

This marker sets the setting to None, if you want it to be a string,
you can use the `settings` fixture to set it to your desired value.
Pull Request #222: Adds tests for invalid template variables

32564 of 60251 relevant lines covered (54.05%)

0.54 hits per line

Source Files on job 607.9 (TESTENV=python3.2-master-sqlite_file)
  • Tree
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 607
  • Travis Job 607.9
  • 9792fba0 on github
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc