summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_pyexpat.py
diff options
context:
space:
mode:
authorNikita Sobolev <mail@sobolevn.me>2023-11-03 08:28:14 (GMT)
committerGitHub <noreply@github.com>2023-11-03 08:28:14 (GMT)
commit7bcf184dacf5cfbcb16b4c2735472314b03a009e (patch)
treedeedb411abc13981d377b0bd29e548e2bff69454 /Lib/test/test_pyexpat.py
parent26c0e5e03a8603eccfd98045bc69fde2e24682e3 (diff)
downloadcpython-7bcf184dacf5cfbcb16b4c2735472314b03a009e.zip
cpython-7bcf184dacf5cfbcb16b4c2735472314b03a009e.tar.gz
cpython-7bcf184dacf5cfbcb16b4c2735472314b03a009e.tar.bz2
gh-111490: Make the exception type check in test_pyexpat more specific (GH-111491)
Diffstat (limited to 'Lib/test/test_pyexpat.py')
-rw-r--r--Lib/test/test_pyexpat.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_pyexpat.py b/Lib/test/test_pyexpat.py
index a542aba..d941a1a 100644
--- a/Lib/test/test_pyexpat.py
+++ b/Lib/test/test_pyexpat.py
@@ -544,7 +544,7 @@ class sf1296433Test(unittest.TestCase):
parser = expat.ParserCreate()
parser.CharacterDataHandler = handler
- self.assertRaises(Exception, parser.Parse, xml.encode('iso8859'))
+ self.assertRaises(SpecificException, parser.Parse, xml.encode('iso8859'))
class ChardataBufferTest(unittest.TestCase):
"""