gh-111490: Make the exception type check in test_pyexpat more specific (GH-111491)

This commit is contained in:
Nikita Sobolev 2023-11-03 11:28:14 +03:00 committed by GitHub
parent 26c0e5e03a
commit 7bcf184dac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View 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):
"""