Opened 11 years ago

Closed 11 years ago

#22184 closed Bug (fixed)

template_tests relies on leaking state

Reported by: Aymeric Augustin Owned by: ANUBHAV JOSHI
Component: Template system Version: dev
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

Description

./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 by Claude Paroz, 11 years ago

Triage Stage: UnreviewedAccepted

comment:2 by ANUBHAV JOSHI, 11 years ago

Cc: anubhav9042@… added
Owner: changed from nobody to ANUBHAV JOSHI
Status: newassigned

problem in TEMPLATE_DIRS.
Working on the fix.

Version 0, edited 11 years ago by ANUBHAV JOSHI (next)

comment:3 by ANUBHAV JOSHI, 11 years ago

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).

Thoughts?

comment:4 by ANUBHAV JOSHI, 11 years ago

An import was missing which created the function used in creating cache_loader
https://github.com/django/django/pull/2433

comment:5 by Claude Paroz <claude@…>, 11 years ago

Resolution: fixed
Status: assignedclosed

In 659b5678fcb89417ce1967bc590fdd693f906e69:

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

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