diff --git a/django_coverage_plugin/plugin.py b/django_coverage_plugin/plugin.py index a033869..3b380da 100644 --- a/django_coverage_plugin/plugin.py +++ b/django_coverage_plugin/plugin.py @@ -78,6 +78,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):