summaryrefslogtreecommitdiff
path: root/Lib/test
diff options
context:
space:
mode:
authorPetri Lehtinen <petri@digip.org>2012-06-26 10:26:53 +0300
committerPetri Lehtinen <petri@digip.org>2012-06-26 10:26:53 +0300
commit239197411080a3d41fd9ddca19aaa63c7aa9304e (patch)
treebbfd0b2abd19bfea9c482cdf6a3fea1754b3bf3f /Lib/test
parent6c3f1dd83493e1904c8ab7d191038dddda7ef50b (diff)
parent969288e488f6d261fbfbab43dcbe6bb6afce28c0 (diff)
downloadcpython-git-239197411080a3d41fd9ddca19aaa63c7aa9304e.tar.gz
Merge heads
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_posix.py2
-rw-r--r--Lib/test/test_shutil.py3
2 files changed, 4 insertions, 1 deletions
diff --git a/Lib/test/test_posix.py b/Lib/test/test_posix.py
index 776439f926..9bedc7d237 100644
--- a/Lib/test/test_posix.py
+++ b/Lib/test/test_posix.py
@@ -730,7 +730,7 @@ class PosixTester(unittest.TestCase):
if os.utime in os.supports_follow_symlinks:
try:
posix.utime(support.TESTFN, follow_symlinks=False, dir_fd=f)
- except RuntimeError:
+ except ValueError:
# whoops! using both together not supported on this platform.
pass
diff --git a/Lib/test/test_shutil.py b/Lib/test/test_shutil.py
index d23deee624..49be391ec5 100644
--- a/Lib/test/test_shutil.py
+++ b/Lib/test/test_shutil.py
@@ -1174,6 +1174,7 @@ class TestShutil(unittest.TestCase):
# copytree returns its destination path.
src_dir = self.mkdtemp()
dst_dir = src_dir + "dest"
+ self.addCleanup(shutil.rmtree, dst_dir, True)
src = os.path.join(src_dir, 'foo')
write_file(src, 'foo')
rv = shutil.copytree(src_dir, dst_dir)
@@ -1184,6 +1185,7 @@ class TestWhich(unittest.TestCase):
def setUp(self):
self.temp_dir = tempfile.mkdtemp()
+ self.addCleanup(shutil.rmtree, self.temp_dir, True)
# Give the temp_file an ".exe" suffix for all.
# It's needed on Windows and not harmful on other platforms.
self.temp_file = tempfile.NamedTemporaryFile(dir=self.temp_dir,
@@ -1506,6 +1508,7 @@ class TestCopyFile(unittest.TestCase):
# but a different case.
self.src_dir = tempfile.mkdtemp()
+ self.addCleanup(shutil.rmtree, self.src_dir, True)
dst_dir = os.path.join(
os.path.dirname(self.src_dir),
os.path.basename(self.src_dir).upper())