File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -656,11 +656,9 @@ def test2(self):
656656 # \xc2\x85 is UTF-8 encoded U+0085 (NEXT LINE)
657657 xml = b"<?xml version\xc2 \x85 ='1.0'?>\r \n "
658658 parser = expat .ParserCreate ()
659- try :
659+ err_pattern = r'XML declaration not well-formed: line 1, column \d+'
660+ with self .assertRaisesRegex (expat .ExpatError , err_pattern ):
660661 parser .Parse (xml , True )
661- self .fail ()
662- except expat .ExpatError as e :
663- self .assertEqual (str (e ), 'XML declaration not well-formed: line 1, column 14' )
664662
665663class ErrorMessageTest (unittest .TestCase ):
666664 def test_codes (self ):
Original file line number Diff line number Diff line change 9090- Issue #26754: PyUnicode_FSDecoder() accepted a filename argument encoded as
9191 an iterable of integers. Now only strings and bytes-like objects are accepted.
9292
93+ Tests
94+ -----
95+
96+ - Issue #27369: In test_pyexpat, avoid testing an error message detail that
97+ changed in Expat 2.2.0.
98+
9399Tools/Demos
94100-----------
95101
You can’t perform that action at this time.
0 commit comments