cpython: 31dc480102fc (original) (raw)
Mercurial > cpython
changeset 102344:31dc480102fc
Issue #27369: Merge test_pyexpat from 3.5 [#27369]
Martin Panter vadmium+py@gmail.com | |
---|---|
date | Thu, 14 Jul 2016 03:36:53 +0000 |
parents | c821709a9275(current diff)0fbf3b88eed8(diff) |
children | 4f11e6b72e8f |
files | Misc/NEWS |
diffstat | 2 files changed, 8 insertions(+), 4 deletions(-)[+] [-] Lib/test/test_pyexpat.py 6 Misc/NEWS 6 |
line wrap: on
line diff
--- a/Lib/test/test_pyexpat.py +++ b/Lib/test/test_pyexpat.py @@ -656,11 +656,9 @@ class MalformedInputTest(unittest.TestCa # \xc2\x85 is UTF-8 encoded U+0085 (NEXT LINE) xml = b"\r\n" parser = expat.ParserCreate()
try:[](#l1.7)
err_pattern = r'XML declaration not well-formed: line 1, column \d+'[](#l1.8)
with self.assertRaisesRegex(expat.ExpatError, err_pattern):[](#l1.9) parser.Parse(xml, True)[](#l1.10)
self.fail()[](#l1.11)
except expat.ExpatError as e:[](#l1.12)
self.assertEqual(str(e), 'XML declaration not well-formed: line 1, column 14')[](#l1.13)
class ErrorMessageTest(unittest.TestCase): def test_codes(self):
--- a/Misc/NEWS +++ b/Misc/NEWS @@ -13,6 +13,12 @@ Core and Builtins Library ------- +Tests +----- + +- Issue #27369: In test_pyexpat, avoid testing an error message detail that