cpython: 0fbf3b88eed8 (original) (raw)
Mercurial > cpython
changeset 102343:0fbf3b88eed8 3.5
Issue #27369: Merge test_pyexpat from 3.4 into 3.5 [#27369]
Martin Panter vadmium+py@gmail.com | |
---|---|
date | Thu, 14 Jul 2016 03:35:15 +0000 |
parents | 6c7f356737a8(current diff)17ec4d58c046(diff) |
children | 31dc480102fc 453a88a41a58 |
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 @@ -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):