#22184 closed Bug (fixed)

template_tests relies on leaking state

Reported by: aaugustin Owned by: anubhav9042
Component: Template system Version: master
Severity: Normal Keywords:
Cc: anubhav9042@… Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


./runtests.py template_tests.tests fails with a very long output, which simply says that the template loaders failed to locate the inclusion.html template.

./runtests.py template_tests.test_loaders template_tests.tests works.

We should figure out what part of template_tests.test_loaders template_tests.tests depends on and make it possible to run template_tests.tests by itself.

I discovered this while working on https://code.djangoproject.com/ticket/22130#comment:10.

Change History (5)

comment:1 Changed 21 months ago by claudep

  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 21 months ago by anubhav9042

  • Cc anubhav9042@… added
  • Owner changed from nobody to anubhav9042
  • Status changed from new to assigned

problem in TEMPLATE_DIRS.
Working on the fix.

Version 0, edited 21 months ago by anubhav9042 (next)

comment:3 Changed 21 months ago by anubhav9042

I think we need to use https://github.com/django/django/blob/master/tests/template_tests/tests.py#L547
in the loaders. I am having some problem in overriding settings(I have tried using this way).


comment:4 Changed 21 months ago by anubhav9042

An import was missing which created the function used in creating cache_loader

comment:5 Changed 21 months ago by Claude Paroz <claude@…>

  • Resolution set to fixed
  • Status changed from assigned to closed

In 659b5678fcb89417ce1967bc590fdd693f906e69:

Fixed #22184 -- Allowed template_tests.tests to be run isolated

Note: See TracTickets for help on using tickets.
Back to Top