mirror of https://github.com/python/cpython
Open files in binary mode.
This commit is contained in:
parent
38e6a69a20
commit
11b41f6932
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue