[Python-checkins] r84979 - python/branches/py3k/Lib/test/test_tarfile.py

antoine.pitrou python-checkins at python.org
Thu Sep 23 21:39:35 CEST 2010


Author: antoine.pitrou
Date: Thu Sep 23 21:39:35 2010
New Revision: 84979
Log:
Try harder to fix test_tarfile under Windows buildbots
Modified:
 python/branches/py3k/Lib/test/test_tarfile.py
Modified: python/branches/py3k/Lib/test/test_tarfile.py
==============================================================================
--- python/branches/py3k/Lib/test/test_tarfile.py	(original)
+++ python/branches/py3k/Lib/test/test_tarfile.py	Thu Sep 23 21:39:35 2010
@@ -25,7 +25,7 @@
 def md5sum(data):
 return md5(data).hexdigest()
 
-TEMPDIR = os.path.abspath(support.TESTFN)
+TEMPDIR = os.path.abspath(support.TESTFN) + "-tardir"
 tarname = support.findfile("testtar.tar")
 gzipname = os.path.join(TEMPDIR, "testtar.tar.gz")
 bz2name = os.path.join(TEMPDIR, "testtar.tar.bz2")
@@ -538,6 +538,7 @@
 self._test_member(tarinfo, size=7011, chksum=md5_regtype)
 
 def test_find_pax_umlauts(self):
+ self.tar.close()
 self.tar = tarfile.open(self.tarname, mode=self.mode, encoding="iso8859-1")
 tarinfo = self.tar.getmember("pax/umlauts-\xc4\xd6\xdc\xe4\xf6\xfc\xdf")
 self._test_member(tarinfo, size=7011, chksum=md5_regtype)
@@ -1228,6 +1229,7 @@
 self.assertEqual(t.gname, "\xe4\xf6\xfc")
 
 if self.format != tarfile.PAX_FORMAT:
+ tar.close()
 tar = tarfile.open(tmpname, encoding="ascii")
 t = tar.getmember("foo")
 self.assertEqual(t.uname, "\udce4\udcf6\udcfc")


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /