summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_file.py
diff options
context:
space:
mode:
authorInada Naoki <songofacandy@gmail.com>2021-04-01 02:23:03 (GMT)
committerGitHub <noreply@github.com>2021-04-01 02:23:03 (GMT)
commit55f31be44b7e3ee24a67134f99543512a9b630e4 (patch)
treed2b0e494ec4154687b70a84f93bfa25d3e5230fe /Lib/test/test_file.py
parentad493edf5791e7abb2588852e876b8584945c653 (diff)
downloadcpython-55f31be44b7e3ee24a67134f99543512a9b630e4.zip
cpython-55f31be44b7e3ee24a67134f99543512a9b630e4.tar.gz
cpython-55f31be44b7e3ee24a67134f99543512a9b630e4.tar.bz2
bpo-43651: Fix EncodingWarning in test_file and test_file_eintr (GH-25109)
Diffstat (limited to 'Lib/test/test_file.py')
-rw-r--r--Lib/test/test_file.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_file.py b/Lib/test/test_file.py
index 1497675..fbfba64 100644
--- a/Lib/test/test_file.py
+++ b/Lib/test/test_file.py
@@ -52,7 +52,7 @@ class AutoFileTests:
# verify readinto refuses text files
a = array('b', b'x'*10)
self.f.close()
- self.f = self.open(TESTFN, 'r')
+ self.f = self.open(TESTFN, encoding="utf-8")
if hasattr(self.f, "readinto"):
self.assertRaises(TypeError, self.f.readinto, a)