components/python/python34/patches/28-expat.patch
changeset 7647 3a107326b5f8
parent 7646 80b442bd41f4
child 7648 20e09cf3cfaa
equal deleted inserted replaced
7646:80b442bd41f4 7647:3a107326b5f8
     1 This patch comes from upstream:
       
     2 
       
     3 http://bugs.python.org/issue27369
       
     4 
       
     5 --- a/Lib/test/test_pyexpat.py
       
     6 +++ b/Lib/test/test_pyexpat.py
       
     7 @@ -662,11 +662,9 @@ class MalformedInputTest(unittest.TestCa
       
     8          # \xc2\x85 is UTF-8 encoded U+0085 (NEXT LINE)
       
     9          xml = b"<?xml version\xc2\x85='1.0'?>\r\n"
       
    10          parser = expat.ParserCreate()
       
    11 -        try:
       
    12 +        err_pattern = r'XML declaration not well-formed: line 1, column \d+'
       
    13 +        with self.assertRaisesRegex(expat.ExpatError, err_pattern):
       
    14              parser.Parse(xml, True)
       
    15 -            self.fail()
       
    16 -        except expat.ExpatError as e:
       
    17 -            self.assertEqual(str(e), 'XML declaration not well-formed: line 1, column 14')
       
    18  
       
    19  class ErrorMessageTest(unittest.TestCase):
       
    20      def test_codes(self):