Skip to content

Commit 7bcf184

Browse files
authored
gh-111490: Make the exception type check in test_pyexpat more specific (GH-111491)
1 parent 26c0e5e commit 7bcf184

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/test/test_pyexpat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ def handler(text):
544544
parser = expat.ParserCreate()
545545
parser.CharacterDataHandler = handler
546546

547-
self.assertRaises(Exception, parser.Parse, xml.encode('iso8859'))
547+
self.assertRaises(SpecificException, parser.Parse, xml.encode('iso8859'))
548548

549549
class ChardataBufferTest(unittest.TestCase):
550550
"""

0 commit comments

Comments
 (0)