cpython: 2d6e6600c210 (original) (raw)
Mercurial > cpython
changeset 102342:2d6e6600c210 2.7
Issue #27369: Don’t test error message detail that changed in Expat 2.2.0 [#27369]
Martin Panter vadmium+py@gmail.com | |
---|---|
date | Thu, 14 Jul 2016 01:31:46 +0000 |
parents | 130d97217e36 |
children | 345ec7455b75 |
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 @@ -610,11 +610,9 @@ class MalformedInputText(unittest.TestCa def test2(self): xml = "\r\n" parser = expat.ParserCreate()
try:[](#l1.7)
err_pattern = r'XML declaration not well-formed: line 1, column \d+'[](#l1.8)
with self.assertRaisesRegexp(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 ForeignDTDTests(unittest.TestCase): """
--- a/Misc/NEWS +++ b/Misc/NEWS @@ -62,6 +62,12 @@ Documentation resulting links to use lowercase. Patch by Sean Rodman, test by Kaushik Nadikuditi. +Tests +----- + +- Issue #27369: In test_pyexpat, avoid testing an error message detail that