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

pytest-dev / pytest-django / 607
39%

Build:
DEFAULT BRANCH: master
Ran 04 Nov 2016 03:08PM UTC
Jobs 2
Files 512
Run time 10min
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

pending completion
607

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

54028 of 60251 relevant lines covered (89.67%)

1.42 hits per line

Jobs
ID Job ID Ran Files Coverage
8 607.8 (TESTENV=python2.7-master-sqlite_file) 04 Nov 2016 03:18PM UTC 0
87.81
Travis Job 607.8
9 607.9 (TESTENV=python3.2-master-sqlite_file) 04 Nov 2016 03:08PM UTC 0
54.05
Travis Job 607.9
Source Files on build 607
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #607
  • Pull Request #222
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

© 2025 Coveralls, Inc