summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_multibytecodec.py
diff options
context:
space:
mode:
authorInada Naoki <songofacandy@gmail.com>2025-04-30 01:11:09 (GMT)
committerGitHub <noreply@github.com>2025-04-30 01:11:09 (GMT)
commit4e294f6feb3193854d23e0e8be487213a80b232f (patch)
tree5bd03678ff6136ef2a7ffb03a088388c275713c7 /Lib/test/test_multibytecodec.py
parent732d1b02417e91d6a4247879e290065287cc6b51 (diff)
downloadcpython-4e294f6feb3193854d23e0e8be487213a80b232f.zip
cpython-4e294f6feb3193854d23e0e8be487213a80b232f.tar.gz
cpython-4e294f6feb3193854d23e0e8be487213a80b232f.tar.bz2
gh-133036: Deprecate codecs.open (#133038)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Co-authored-by: Victor Stinner <vstinner@python.org>
Diffstat (limited to 'Lib/test/test_multibytecodec.py')
-rw-r--r--Lib/test/test_multibytecodec.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_multibytecodec.py b/Lib/test/test_multibytecodec.py
index 1b55f1e..d7a2333 100644
--- a/Lib/test/test_multibytecodec.py
+++ b/Lib/test/test_multibytecodec.py
@@ -314,7 +314,8 @@ class Test_StreamReader(unittest.TestCase):
f.write(b'\xa1')
finally:
f.close()
- f = codecs.open(TESTFN, encoding='cp949')
+ with self.assertWarns(DeprecationWarning):
+ f = codecs.open(TESTFN, encoding='cp949')
try:
self.assertRaises(UnicodeDecodeError, f.read, 2)
finally: