Open files in binary mode.

This commit is contained in:
Walter Dörwald 2007-06-20 12:46:31 +00:00
parent 38e6a69a20
commit 11b41f6932
1 changed files with 2 additions and 2 deletions

View File

@ -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)