]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-111490: Make the exception type check in test_pyexpat more specific (GH-111491)
authorNikita Sobolev <mail@sobolevn.me>
Fri, 3 Nov 2023 08:28:14 +0000 (11:28 +0300)
committerGitHub <noreply@github.com>
Fri, 3 Nov 2023 08:28:14 +0000 (10:28 +0200)
Lib/test/test_pyexpat.py

index a542abaf1f35aadcc7f5e0cefbeca1a3c66e1ca7..d941a1a8f9ebc6ba3b3da8f581e818eb95bb93ba 100644 (file)
@@ -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):
     """