From: Walter Dörwald Date: Wed, 20 Jun 2007 12:46:31 +0000 (+0000) Subject: Open files in binary mode. X-Git-Tag: v3.0a1~747 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=11b41f6932bae5c3fecb436a564e2894aaf66f0d;p=python Open files in binary mode. --- diff --git a/Lib/test/pickletester.py b/Lib/test/pickletester.py index 057cb5e7d3..927939eed7 100644 --- a/Lib/test/pickletester.py +++ b/Lib/test/pickletester.py @@ -936,7 +936,7 @@ class AbstractPickleModuleTests(unittest.TestCase): def test_dump_closed_file(self): import os - f = open(TESTFN, "w") + f = open(TESTFN, "wb") try: f.close() self.assertRaises(ValueError, self.module.dump, 123, f) @@ -945,7 +945,7 @@ class AbstractPickleModuleTests(unittest.TestCase): def test_load_closed_file(self): import os - f = open(TESTFN, "w") + f = open(TESTFN, "wb") try: f.close() self.assertRaises(ValueError, self.module.dump, 123, f)