﻿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
21765	Contexts cannot be compared for equality.	Keryn Knight <django@…>	onjin	"Currently, comparing two contexts for equality requires knowing the internals of how `Context` is implemented -- ie: that there is a `.dicts` attribute available on an instance. For the purposes of writing unit tests, I needed to compare a context and a mutated one, and was surprised to find there's no concept of context equality:
{{{
>>> from django.template import Context
>>> Context() == Context()
False
>>> Context().dicts == Context().dicts
True
>>> Context({'x': 'y'}).dicts == Context({'x': 'y'}).dicts
True
>>> Context({'x': 'y'}).dicts == Context({'x': 'z'}).dicts
False
>>>
}}}

It possibly doesn't make sense for `Context` to have the gt/ge/lt/le magic methods defined on it (though one could argue they check the length of the `.dicts`), but from an API standpoint it might be nice to see eq/ne implemented for clean comparisons.

Tagging with master as the context doesn't seem to have changed since 1.6.1, which is what I'm testing against."	New feature	closed	Template system	dev	Normal	fixed			Accepted	0	0	0	0	0	0
