Author: Alex
Date: 2010-10-21 12:36:38 -0500 (Thu, 21 Oct 2010)
New Revision: 14312

Modified:
   django/trunk/django/test/testcases.py
Log:
Fixed #14520 -- fixed a memory leak when running the test suite.

Modified: django/trunk/django/test/testcases.py
===================================================================
--- django/trunk/django/test/testcases.py       2010-10-21 14:56:49 UTC (rev 
14311)
+++ django/trunk/django/test/testcases.py       2010-10-21 17:36:38 UTC (rev 
14312)
@@ -222,10 +222,10 @@
         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
 

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to