  from __future__ import absolute_import
  
  from unittest import skipIf
  
  from .test_dummy import TemplateStringsTests
  
  try:
      import jinja2
 
</s> remove from django.template import Context, Engine, TemplateDoesNotExist, engines
 </s> add from django.template import Context, Engine, TemplateDoesNotExist </s> remove .. exception:: TemplateSyntaxError
 </s> add     ``backend``
        The template backend instance from which the exception originated.

    ``tried``
        A list of sources that were tried when finding the template. This is
        formatted as a list of tuples containing ``(origin, status)``, where
        ``origin`` is an :ref:`origin-like <template-origin-api>` object and
        ``status`` is a string with the reason the template wasn't found.

    ``chain``
        A list of intermediate :exc:`~django.template.TemplateDoesNotExist`
        exceptions raised when trying to load a template. This is used by
        functions, such as :func:`~django.template.loader.get_template`, that
        try to load a given template from multiple engines.

    .. versionadded:: 1.9

        The ``backend``, ``tried``, and ``chain`` arguments were added.

.. exception:: TemplateSyntaxError(msg) </s> remove     This exception is used when template loaders are unable to find a
    template. The tried argument is an optional list of tuples containing
    (origin, status), where origin is an Origin object and status is a string
    with the reason the template wasn't found.
 </s> add     The exception used by backends when a template does not exist. Accepts the
    following optional arguments:

    backend
        The template backend class used when raising this exception.

    tried
        A list of sources that were tried when finding the template. This
        is formatted as a list of tuples containing (origin, status), where
        origin is an Origin object and status is a string with the reason the
        template wasn't found.

    chain
        A list of intermediate TemplateDoesNotExist exceptions. This is used to
        encapsulate multiple exceptions when loading templates from multiple
        engines. </s> remove                 raise TemplateDoesNotExist(exc.args)
 </s> add                 raise TemplateDoesNotExist(exc.args, backend=self)
from django.template import TemplateSyntaxError

  from __future__ import absolute_import
  
  from unittest import skipIf
  
from django.template import TemplateSyntaxError

  from .test_dummy import TemplateStringsTests
  
  try:
      import jinja2
keep keep keep add keep keep keep keep
 Fixed #24119, #24120 -- Formalized debug integration for template backends. 
tests/template_backends/test_jinja2.py