From: Nikita Sobolev Date: Fri, 3 Nov 2023 08:28:14 +0000 (+0300) Subject: gh-111490: Make the exception type check in test_pyexpat more specific (GH-111491) X-Git-Tag: v3.13.0a2~211 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7bcf184dacf5cfbcb16b4c2735472314b03a009e;p=thirdparty%2FPython%2Fcpython.git gh-111490: Make the exception type check in test_pyexpat more specific (GH-111491) --- diff --git a/Lib/test/test_pyexpat.py b/Lib/test/test_pyexpat.py index a542abaf1f35..d941a1a8f9eb 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): """