From 7bcf184dacf5cfbcb16b4c2735472314b03a009e Mon Sep 17 00:00:00 2001 From: Nikita Sobolev Date: Fri, 3 Nov 2023 11:28:14 +0300 Subject: gh-111490: Make the exception type check in test_pyexpat more specific (GH-111491) --- Lib/test/test_pyexpat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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): """ -- cgit v0.12