diff options
author | Jesus Cea <jcea@jcea.es> | 2011-09-09 16:50:59 (GMT) |
---|---|---|
committer | Jesus Cea <jcea@jcea.es> | 2011-09-09 16:50:59 (GMT) |
commit | c6072d86758e1d199b50ecb647d81d2b12396955 (patch) | |
tree | 51105b61cd61cf4ebc860f5c1a5554295e0bd8dd /Lib/distutils | |
parent | fa4736ef2f3ccc82c3f4f11056e54e674599b3bb (diff) | |
download | cpython-c6072d86758e1d199b50ecb647d81d2b12396955.zip cpython-c6072d86758e1d199b50ecb647d81d2b12396955.tar.gz cpython-c6072d86758e1d199b50ecb647d81d2b12396955.tar.bz2 |
Issue #12333: fix test_distutils failures under Solaris and derivatives. Patch by Antoine Pitrou
Diffstat (limited to 'Lib/distutils')
-rw-r--r-- | Lib/distutils/tests/support.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/distutils/tests/support.py b/Lib/distutils/tests/support.py index 648a8e4..a2190c0 100644 --- a/Lib/distutils/tests/support.py +++ b/Lib/distutils/tests/support.py @@ -63,9 +63,13 @@ class TempdirManager(object): def setUp(self): super(TempdirManager, self).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(TempdirManager, self).tearDown() while self.tempdirs: d = self.tempdirs.pop() |