Skip to content

Commit

Permalink
Issue #27369: Merge test_pyexpat from 3.3 into 3.4
Browse files Browse the repository at this point in the history
  • Loading branch information
vadmium committed Jul 14, 2016
2 parents 8cf1496 + d27a7c1 commit b7b5d35
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Lib/test/test_pyexpat.py
Original file line number Diff line number Diff line change
Expand Up @@ -662,11 +662,9 @@ def test2(self):
# \xc2\x85 is UTF-8 encoded U+0085 (NEXT LINE)
xml = b"<?xml version\xc2\x85='1.0'?>\r\n"
parser = expat.ParserCreate()
try:
err_pattern = r'XML declaration not well-formed: line 1, column \d+'
with self.assertRaisesRegex(expat.ExpatError, err_pattern):
parser.Parse(xml, True)
self.fail()
except expat.ExpatError as e:
self.assertEqual(str(e), 'XML declaration not well-formed: line 1, column 14')

class ErrorMessageTest(unittest.TestCase):
def test_codes(self):
Expand Down
6 changes: 6 additions & 0 deletions Misc/NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ Core and Builtins
Library
-------

Tests
-----

- Issue #27369: In test_pyexpat, avoid testing an error message detail that
changed in Expat 2.2.0.


What's New in Python 3.4.5?
===========================
Expand Down

0 comments on commit b7b5d35

Please sign in to comment.