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):
5252 # verify readinto refuses text files
5353 a = array ('b' , b'x' * 10 )
5454 self .f .close ()
55- self .f = self .open (TESTFN , 'r' )
55+ self .f = self .open (TESTFN , encoding = "utf-8" )
5656 if hasattr (self .f , "readinto" ):
5757 self .assertRaises (TypeError , self .f .readinto , a )
5858
Original file line number Diff line number Diff line change @@ -213,7 +213,7 @@ class TestTextIOSignalInterrupt(TestFileIOSignalInterrupt):
213213 def _generate_infile_setup_code (self ):
214214 """Returns the infile = ... line of code to make a TextIOWrapper."""
215215 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) ;'
217217 'assert isinstance(infile, io.TextIOWrapper)' %
218218 self .modname )
219219
You can’t perform that action at this time.
0 commit comments