Blame 00209-fix-test-pyexpat-failure.patch

a8ffdf3
diff -r 682a8e36dd18 Lib/test/test_pyexpat.py
a8ffdf3
--- a/Lib/test/test_pyexpat.py	Tue Jul 05 17:08:52 2016 +0300
a8ffdf3
+++ b/Lib/test/test_pyexpat.py	Thu Jul 07 17:04:35 2016 +0800
a8ffdf3
@@ -656,11 +656,9 @@
a8ffdf3
         # \xc2\x85 is UTF-8 encoded U+0085 (NEXT LINE)
a8ffdf3
         xml = b"\r\n"
a8ffdf3
         parser = expat.ParserCreate()
a8ffdf3
-        try:
a8ffdf3
+        err_pattern = r'XML declaration not well-formed: line 1, column \d+'
a8ffdf3
+        with self.assertRaisesRegex(expat.ExpatError, err_pattern):
a8ffdf3
             parser.Parse(xml, True)
a8ffdf3
-            self.fail()
a8ffdf3
-        except expat.ExpatError as e:
a8ffdf3
-            self.assertEqual(str(e), 'XML declaration not well-formed: line 1, column 14')
a8ffdf3
 
a8ffdf3
 class ErrorMessageTest(unittest.TestCase):
a8ffdf3
     def test_codes(self):