@override_settings(INSTALLED_APPS=['template_backends.apps.importerror'])
    def test_templatetag_discovery_import_error(self):
        with self.assertRaisesMessage(
            InvalidTemplateLibrary,
            "ImportError raised when trying to load "
            "'template_backends.apps.importerror.templatetags.broken_tags'"
        ):
            DjangoTemplates({
                'DIRS': [],
                'APP_DIRS': False,
                'NAME': 'django',
                'OPTIONS': {},
            })
Import errors in tag modules should be reraised with a helpful message.
dataset/ETHPy150Open django/django/tests/template_backends/test_django.py/DjangoTemplatesTests.test_templatetag_discovery_import_error