Commits

Anonymous committed 137e45f

Issue #12333: fix test_distutils failures under Solaris and derivatives

Comments (0)

Files changed (1)

Lib/distutils/tests/support.py

 
     def setUp(self):
         super().setUp()
+        self.old_cwd = os.getcwd()
         self.tempdirs = []
 
     def tearDown(self):
+        # Restore working dir, for Solaris and derivatives, where rmdir()
+        # on the current directory fails.
+        os.chdir(self.old_cwd)
         super().tearDown()
         while self.tempdirs:
             d = self.tempdirs.pop()