From: Lars Gustäbel Date: Wed, 14 Feb 2007 14:45:12 +0000 (+0000) Subject: A missing binary mode in AppendTest caused failures in Windows X-Git-Tag: v2.6a1~2173 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d0b6040cedccb198deeae6b7703cba61f85c361e;p=thirdparty%2FPython%2Fcpython.git A missing binary mode in AppendTest caused failures in Windows Buildbot. --- diff --git a/Lib/test/test_tarfile.py b/Lib/test/test_tarfile.py index 642f37648e0b..f2dd97d7069d 100644 --- a/Lib/test/test_tarfile.py +++ b/Lib/test/test_tarfile.py @@ -336,7 +336,7 @@ class AppendTest(unittest.TestCase): self._test() def test_empty(self): - open(self.tarname, "w").close() + open(self.tarname, "wb").close() self._add_testfile() self._test() @@ -348,7 +348,7 @@ class AppendTest(unittest.TestCase): def test_fileobj(self): self._create_testtar() - data = open(self.tarname).read() + data = open(self.tarname, "rb").read() fobj = StringIO.StringIO(data) self._add_testfile(fobj) fobj.seek(0)