]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #12125: fixed the failures under Solaris due to improper test cleanup.
authorTarek Ziade <tarek@ziade.org>
Mon, 23 May 2011 17:07:56 +0000 (19:07 +0200)
committerTarek Ziade <tarek@ziade.org>
Mon, 23 May 2011 17:07:56 +0000 (19:07 +0200)
Lib/packaging/tests/test_create.py
Lib/packaging/tests/test_manifest.py
Lib/packaging/tests/test_uninstall.py
Misc/NEWS

index 42cf34bdd1e3e9bf8087c2658871b1f0f85f5ed8..906ca8fa53983270790d6f5a2753c262433b02c2 100644 (file)
@@ -31,11 +31,11 @@ class CreateTestCase(support.TempdirManager,
             'doc': sys.prefix + '/share/doc/pyxfoil', }
 
     def tearDown(self):
-        super(CreateTestCase, self).tearDown()
         sys.stdin = self._stdin
         sys.stdout = self._stdout
         os.chdir(self._cwd)
         sysconfig.get_paths = self._old_get_paths
+        super(CreateTestCase, self).tearDown()
 
     def test_ask_yn(self):
         sys.stdin.write('y\n')
index 21a42c3be90875d7575cd3390e98f01b72f351a7..9fb8b633d066cadf9ef143a6585e391e0e849231 100644 (file)
@@ -26,6 +26,14 @@ class ManifestTestCase(support.TempdirManager,
                        support.LoggingCatcher,
                        unittest.TestCase):
 
+    def setUp(self):
+        super(ManifestTestCase, self).setUp()
+        self.cwd = os.getcwd()
+
+    def tearDown(self):
+        os.chdir(self.cwd)
+        super(ManifestTestCase, self).tearDown()
+
     def test_manifest_reader(self):
         tmpdir = self.mkdtemp()
         MANIFEST = os.path.join(tmpdir, 'MANIFEST.in')
index 2d0e896bb627871bce955ae9a62b392a7cbea5d0..578b10db5801b8e41cf34b49f90a433d1e7bd398 100644 (file)
@@ -36,8 +36,13 @@ class UninstallTestCase(support.TempdirManager,
         self.addCleanup(os.chdir, os.getcwd())
         self.addCleanup(enable_cache)
         self.root_dir = self.mkdtemp()
+        self.cwd = os.getcwd()
         disable_cache()
 
+    def tearDown(self):
+        os.chdir(self.cwd)
+        super(UninstallTestCase, self).tearDown()
+
     def run_setup(self, *args):
         # run setup with args
         args = ['run'] + list(args)
index 9e2c14df2a769cefb8f20989ffa3df7e83adfc70..01b95e231005bcfe64b4d504d71761ec44d7fc1b 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -153,6 +153,8 @@ Core and Builtins
 Library
 -------
 
+- Issue #12125: fixed the failures under Solaris due to improper test cleanup.
+
 - Issue #6501: os.device_encoding() returns None on Windows if the application
   has no console.