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 @@ def handler(text):
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):
"""