From 0e9cc93e3749bc57fc7344d1ca99c4d97cd446bf Mon Sep 17 00:00:00 2001 From: adustman Date: Tue, 28 Mar 2006 12:59:24 +0000 Subject: [PATCH] Fix leak test for subclassing --- MySQLdb/test_capabilities.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/MySQLdb/test_capabilities.py b/MySQLdb/test_capabilities.py index 40b6874..886a968 100644 --- a/MySQLdb/test_capabilities.py +++ b/MySQLdb/test_capabilities.py @@ -30,9 +30,8 @@ class DatabaseTest(unittest.TestCase): leak_test = True - if leak_test: - - def tearDown(self): + def tearDown(self): + if self.leak_test: import gc del self.cursor orphans = gc.collect()