From 11b41f6932bae5c3fecb436a564e2894aaf66f0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Walter=20D=C3=B6rwald?= Date: Wed, 20 Jun 2007 12:46:31 +0000 Subject: [PATCH] Open files in binary mode. --- Lib/test/pickletester.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lib/test/pickletester.py b/Lib/test/pickletester.py index 057cb5e7d31..927939eed7b 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)