]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fixed #6131: test_modulefinder leaked when run after test_distutils
authorTarek Ziadé <ziade.tarek@gmail.com>
Fri, 29 May 2009 08:08:07 +0000 (08:08 +0000)
committerTarek Ziadé <ziade.tarek@gmail.com>
Fri, 29 May 2009 08:08:07 +0000 (08:08 +0000)
Lib/distutils/tests/test_bdist_dumb.py
Lib/distutils/tests/test_dir_util.py
Lib/distutils/tests/test_file_util.py
Lib/distutils/tests/test_register.py
Misc/NEWS

index 2863b620dbd889a0213f2985b0cd36599ce69ede..d2ea201bd49a3f83a706fed7a7d58ac95a3d086f 100644 (file)
@@ -22,16 +22,14 @@ class BuildDumbTestCase(support.TempdirManager,
                         unittest.TestCase):
 
     def setUp(self):
-        support.TempdirManager.setUp(self)
-        support.LoggingSilencer.setUp(self)
+        super(BuildDumbTestCase, self).setUp()
         self.old_location = os.getcwd()
         self.old_sys_argv = sys.argv[:]
 
     def tearDown(self):
         os.chdir(self.old_location)
         sys.argv = self.old_sys_argv[:]
-        support.LoggingSilencer.tearDown(self)
-        support.TempdirManager.tearDown(self)
+        super(BuildDumbTestCase, self).tearDown()
 
     def test_simple_built(self):
 
index 6b22f05ff0064baab7886167f03840abc8bd4a88..0f694aa0202a9523a2e4a2513aa89afbd12787c0 100644 (file)
@@ -18,7 +18,7 @@ class DirUtilTestCase(support.TempdirManager, unittest.TestCase):
             self._logs.append(msg)
 
     def setUp(self):
-        support.TempdirManager.setUp(self)
+        super(DirUtilTestCase, self).setUp()
         self._logs = []
         tmp_dir = self.mkdtemp()
         self.root_target = os.path.join(tmp_dir, 'deep')
@@ -29,7 +29,7 @@ class DirUtilTestCase(support.TempdirManager, unittest.TestCase):
 
     def tearDown(self):
         log.info = self.old_log
-        support.TempdirManager.tearDown(self)
+        super(DirUtilTestCase, self).tearDown()
 
     def test_mkpath_remove_tree_verbosity(self):
 
index 9373af8503a96e934e96d3db642313cf68627157..fac4a5d1a9b374f9350eb200b5f050138875af1f 100644 (file)
@@ -16,7 +16,7 @@ class FileUtilTestCase(support.TempdirManager, unittest.TestCase):
             self._logs.append(msg)
 
     def setUp(self):
-        support.TempdirManager.setUp(self)
+        super(FileUtilTestCase, self).setUp()
         self._logs = []
         self.old_log = log.info
         log.info = self._log
@@ -27,7 +27,7 @@ class FileUtilTestCase(support.TempdirManager, unittest.TestCase):
 
     def tearDown(self):
         log.info = self.old_log
-        support.TempdirManager.tearDown(self)
+        super(FileUtilTestCase, self).tearDown()
 
     def test_move_file_verbosity(self):
         f = open(self.source, 'w')
index 91d3581373f5ea9c90c73e74c5d28bdc6ba0a111..0c6bf669895bd546ca9ffb5a83eb9bbc44454128 100644 (file)
@@ -66,7 +66,7 @@ class FakeOpener(object):
 class RegisterTestCase(PyPIRCCommandTestCase):
 
     def setUp(self):
-        PyPIRCCommandTestCase.setUp(self)
+        super(RegisterTestCase, self).setUp()
         # patching the password prompt
         self._old_getpass = getpass.getpass
         def _getpass(prompt):
@@ -78,7 +78,7 @@ class RegisterTestCase(PyPIRCCommandTestCase):
     def tearDown(self):
         getpass.getpass = self._old_getpass
         urllib2.build_opener = self.old_opener
-        PyPIRCCommandTestCase.tearDown(self)
+        super(RegisterTestCase, self).tearDown()
 
     def _get_cmd(self, metadata=None):
         if metadata is None:
index 94405c5b3129676a26ff4ff369ad06a3be09ec91..a0547892d782f16fe1a86334759cda5a31613d98 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -311,6 +311,9 @@ Core and Builtins
 Library
 -------
 
+- Issue #6131: test_modulefinder leaked when run after test_distutils.
+  Patch by Hirokazu Yamamoto.
+
 - Issue #6048: Now Distutils uses the tarfile module in archive_util.
 
 - Issue #5150: IDLE's format menu now has an option to strip trailing