summaryrefslogtreecommitdiff
path: root/Lib/test/test_file_eintr.py
diff options
context:
space:
mode:
authorInada Naoki <songofacandy@gmail.com>2021-04-01 11:23:03 +0900
committerGitHub <noreply@github.com>2021-04-01 11:23:03 +0900
commit55f31be44b7e3ee24a67134f99543512a9b630e4 (patch)
treed2b0e494ec4154687b70a84f93bfa25d3e5230fe /Lib/test/test_file_eintr.py
parentad493edf5791e7abb2588852e876b8584945c653 (diff)
downloadcpython-git-55f31be44b7e3ee24a67134f99543512a9b630e4.tar.gz
bpo-43651: Fix EncodingWarning in test_file and test_file_eintr (GH-25109)
Diffstat (limited to 'Lib/test/test_file_eintr.py')
-rw-r--r--Lib/test/test_file_eintr.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_file_eintr.py b/Lib/test/test_file_eintr.py
index f1efd266ff..01408d838a 100644
--- a/Lib/test/test_file_eintr.py
+++ b/Lib/test/test_file_eintr.py
@@ -213,7 +213,7 @@ class TestTextIOSignalInterrupt(TestFileIOSignalInterrupt):
def _generate_infile_setup_code(self):
"""Returns the infile = ... line of code to make a TextIOWrapper."""
return ('import %s as io ;'
- 'infile = io.open(sys.stdin.fileno(), "rt", newline=None) ;'
+ 'infile = io.open(sys.stdin.fileno(), encoding="utf-8", newline=None) ;'
'assert isinstance(infile, io.TextIOWrapper)' %
self.modname)