﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
17086	humanize and markup tests modify global templatetags library state	Carl Meyer	nobody	"The tests for both `contrib.humanize` and `contrib.markitup` use `add_to_builtins` to (permanently) add their respective template tag libraries to the context of all rendered templates. This is done at module-level in their test modules, and there is no attempt to clean up or isolate the effect of this change.

This can cause templates rendered in unrelated user tests to behave differently depending on whether they are run alone or as part of a suite including the markup/humanize tests. For instance, if a template fails to `{% load markup %}` or `{% load humanize %}` when it should, and a test renders that template, that test would succeed under a full `manage.py test` but fail if run without the contrib/humanize tests.

This also affects Django's own test suite.

I think the proper solution here is to (a) use the appropriate `{% load %}` tags in the test templates for those test suites, and (b) temporarily monkeypatch `django.template.base.templatetags_modules` so that it includes the templatetag module for humanize during humanize's tests, and likewise for markup.

If #17085 is fixed, it would provide an alternative way to fix this without needing the monkeypatch."	Bug	closed	contrib.humanize	dev	Normal	fixed			Accepted	0	0	0	0	0	0
