Fixed #14520 -- fixed a memory leak when running the test suite.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14312 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
5864834fa5
commit
9d5d757bda
|
@ -222,10 +222,10 @@ class _AssertNumQueriesContext(object):
|
||||||
return self
|
return self
|
||||||
|
|
||||||
def __exit__(self, exc_type, exc_value, traceback):
|
def __exit__(self, exc_type, exc_value, traceback):
|
||||||
|
self.connection.use_debug_cursor = self.old_debug_cursor
|
||||||
if exc_type is not None:
|
if exc_type is not None:
|
||||||
return
|
return
|
||||||
|
|
||||||
self.connection.use_debug_cursor = self.old_debug_cursor
|
|
||||||
final_queries = len(self.connection.queries)
|
final_queries = len(self.connection.queries)
|
||||||
executed = final_queries - self.starting_queries
|
executed = final_queries - self.starting_queries
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue