summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_sax.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_sax.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_sax.py')
-rw-r--r--Lib/test/test_sax.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_sax.py b/Lib/test/test_sax.py
index 0d0f86c..5c10bce 100644
--- a/Lib/test/test_sax.py
+++ b/Lib/test/test_sax.py
@@ -1,5 +1,4 @@
# regression test for SAX 2.0
-# $Id$
from xml.sax import make_parser, ContentHandler, \
SAXException, SAXReaderNotAvailable, SAXParseException
@@ -832,8 +831,9 @@ class StreamReaderWriterXmlgenTest(XmlgenTest, unittest.TestCase):
fname = os_helper.TESTFN + '-codecs'
def ioclass(self):
- writer = codecs.open(self.fname, 'w', encoding='ascii',
- errors='xmlcharrefreplace', buffering=0)
+ with self.assertWarns(DeprecationWarning):
+ writer = codecs.open(self.fname, 'w', encoding='ascii',
+ errors='xmlcharrefreplace', buffering=0)
def cleanup():
writer.close()
os_helper.unlink(self.fname)