Author: Brian Kearns <[email protected]>
Branch: stdlib-2.7.8
Changeset: r73057:969e90db5911
Date: 2014-08-25 12:50 -0700
http://bitbucket.org/pypy/pypy/changeset/969e90db5911/
Log: fix test_tarfile so it passes on win32
diff --git a/lib-python/2.7/test/test_tarfile.py
b/lib-python/2.7/test/test_tarfile.py
--- a/lib-python/2.7/test/test_tarfile.py
+++ b/lib-python/2.7/test/test_tarfile.py
@@ -399,16 +399,16 @@
# Test hardlink extraction (e.g. bug #857297).
with tarfile.open(tarname, errorlevel=1, encoding="iso8859-1") as tar:
tar.extract("ustar/regtype", TEMPDIR)
- self.addCleanup(os.remove, os.path.join(TEMPDIR, "ustar/regtype"))
+ self.addCleanup(test_support.unlink, os.path.join(TEMPDIR,
"ustar/regtype"))
tar.extract("ustar/lnktype", TEMPDIR)
- self.addCleanup(os.remove, os.path.join(TEMPDIR, "ustar/lnktype"))
+ self.addCleanup(test_support.unlink, os.path.join(TEMPDIR,
"ustar/lnktype"))
with open(os.path.join(TEMPDIR, "ustar/lnktype"), "rb") as f:
data = f.read()
self.assertEqual(md5sum(data), md5_regtype)
tar.extract("ustar/symtype", TEMPDIR)
- self.addCleanup(os.remove, os.path.join(TEMPDIR, "ustar/symtype"))
+ self.addCleanup(test_support.unlink, os.path.join(TEMPDIR,
"ustar/symtype"))
with open(os.path.join(TEMPDIR, "ustar/symtype"), "rb") as f:
data = f.read()
self.assertEqual(md5sum(data), md5_regtype)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit