summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2010-10-21 17:36:38 +0000
committerAlex Gaynor <alex.gaynor@gmail.com>2010-10-21 17:36:38 +0000
commit9d5d757bda5b83e9867ea695f1dd2ccde9aed1ed (patch)
treee4f8654670c21f24cdfc73e2859bf24fc8631004
parent5864834fa5cafb4705e42356b07054f450af8cc4 (diff)
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
-rw-r--r--django/test/testcases.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/test/testcases.py b/django/test/testcases.py
index c8f712d64b..6772370f09 100644
--- a/django/test/testcases.py
+++ b/django/test/testcases.py
@@ -222,10 +222,10 @@ class _AssertNumQueriesContext(object):
return self
def __exit__(self, exc_type, exc_value, traceback):
+ self.connection.use_debug_cursor = self.old_debug_cursor
if exc_type is not None:
return
- self.connection.use_debug_cursor = self.old_debug_cursor
final_queries = len(self.connection.queries)
executed = final_queries - self.starting_queries