cpython: 17ec4d58c046 (original) (raw)
Mercurial > cpython
changeset 102341:17ec4d58c046 3.4
Issue #27369: Merge test_pyexpat from 3.3 into 3.4 [#27369]
Martin Panter vadmium+py@gmail.com | |
---|---|
date | Thu, 14 Jul 2016 02:09:17 +0000 |
parents | 5b712993dce5(current diff)1c06e02b968a(diff) |
children | 0fbf3b88eed8 3c19023c9fec |
files | Lib/test/test_pyexpat.py 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 @@ -662,11 +662,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