mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Open files in binary mode.
This commit is contained in:
parent
38e6a69a20
commit
11b41f6932
1 changed files with 2 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue