File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -603,11 +603,9 @@ def test2(self):
603
603
# \xc2\x85 is UTF-8 encoded U+0085 (NEXT LINE)
604
604
xml = b"<?xml version\xc2 \x85 ='1.0'?>\r \n "
605
605
parser = expat .ParserCreate ()
606
- try :
606
+ err_pattern = r'XML declaration not well-formed: line 1, column \d+'
607
+ with self .assertRaisesRegex (expat .ExpatError , err_pattern ):
607
608
parser .Parse (xml , True )
608
- self .fail ()
609
- except expat .ExpatError as e :
610
- self .assertEqual (str (e ), 'XML declaration not well-formed: line 1, column 14' )
611
609
612
610
class ErrorMessageTest (unittest .TestCase ):
613
611
def test_codes (self ):
Original file line number Diff line number Diff line change 60
60
Tests
61
61
-----
62
62
63
+ - Issue #27369: In test_pyexpat, avoid testing an error message detail that
64
+ changed in Expat 2.2.0.
65
+
63
66
- Issue #25940: Changed test_ssl and test_httplib to use
64
67
self-signed.pythontest.net. This avoids relying on svn.python.org, which
65
68
recently changed root certificate.
You can’t perform that action at this time.
0 commit comments