Skip to content

Fix template tags missing when the tags module is imported during test collection #64

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
sudo: false
language: python
dist: xenial
python:
- "2.7"
- "3.4"
Expand Down
2 changes: 2 additions & 0 deletions django_coverage_plugin/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ def check_debug():
return False
if not hasattr(django.template.backends.django, "DjangoTemplates"):
raise DjangoTemplatePluginException("Can't use non-Django templates.")
if not django.template.engines._engines:
return False

for engine in django.template.engines.all():
if not isinstance(engine, django.template.backends.django.DjangoTemplates):
Expand Down
7 changes: 4 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
envlist =
py27-django{18,19,110,111,111tip},
py34-django{18,19,110,111,111tip,20},
py35-django{18,19,110,111,111tip,20,21,tip},
py36-django{18,19,110,111,111tip,20,21,tip},
py37-django{20,21,tip},
py35-django{18,19,110,111,111tip,20,21,22},
py36-django{18,19,110,111,111tip,20,21,22,tip},
py37-django{20,21,22,tip},
check,pkgcheck,doc

[testenv]
Expand All @@ -31,6 +31,7 @@ deps =
django111tip: https://github.com/django/django/archive/stable/1.11.x.tar.gz
django20: Django>=2.0,<2.1
django21: Django>=2.1,<2.2
django22: Django>=2.2,<3.0
djangotip: https://github.com/django/django/archive/master.tar.gz

commands =
Expand Down