File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ def testReadinto_text(self):
52
52
# verify readinto refuses text files
53
53
a = array ('b' , b'x' * 10 )
54
54
self .f .close ()
55
- self .f = self .open (TESTFN , 'r' )
55
+ self .f = self .open (TESTFN , encoding = "utf-8" )
56
56
if hasattr (self .f , "readinto" ):
57
57
self .assertRaises (TypeError , self .f .readinto , a )
58
58
Original file line number Diff line number Diff line change @@ -213,7 +213,7 @@ class TestTextIOSignalInterrupt(TestFileIOSignalInterrupt):
213
213
def _generate_infile_setup_code (self ):
214
214
"""Returns the infile = ... line of code to make a TextIOWrapper."""
215
215
return ('import %s as io ;'
216
- 'infile = io.open(sys.stdin.fileno(), "rt ", newline=None) ;'
216
+ 'infile = io.open(sys.stdin.fileno(), encoding="utf-8 ", newline=None) ;'
217
217
'assert isinstance(infile, io.TextIOWrapper)' %
218
218
self .modname )
219
219
You can’t perform that action at this time.
0 commit comments