Commit 11b41f69 authored by Walter Dörwald's avatar Walter Dörwald

Open files in binary mode.

parent 38e6a69a
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment