diff options
author | R David Murray <rdmurray@bitdance.com> | 2014-04-20 04:46:05 (GMT) |
---|---|---|
committer | R David Murray <rdmurray@bitdance.com> | 2014-04-20 04:46:05 (GMT) |
commit | 9077d24d7f85e09e53def11b2beeaf40749e2464 (patch) | |
tree | e9ecb49bfa01f919f9e1f7d0d2a517aba4bed6c4 /Lib/test/test_minidom.py | |
parent | 09ae544ea3a6e33418ec8ab0100fc8288eef6d13 (diff) | |
download | cpython-9077d24d7f85e09e53def11b2beeaf40749e2464.zip cpython-9077d24d7f85e09e53def11b2beeaf40749e2464.tar.gz cpython-9077d24d7f85e09e53def11b2beeaf40749e2464.tar.bz2 |
#12220: improve minidom error when URI contains spaces.
Fix by 'amathew', test by Marek Stepniowski.
Diffstat (limited to 'Lib/test/test_minidom.py')
-rw-r--r-- | Lib/test/test_minidom.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_minidom.py b/Lib/test/test_minidom.py index a1516c2..5ab4bfe 100644 --- a/Lib/test/test_minidom.py +++ b/Lib/test/test_minidom.py @@ -1518,6 +1518,10 @@ class MinidomTest(unittest.TestCase): doc2 = parseString(doc.toxml()) self.confirm(doc2.namespaceURI == xml.dom.EMPTY_NAMESPACE) + def testExceptionOnSpacesInXMLNSValue(self): + with self.assertRaisesRegex(ValueError, 'Unsupported syntax'): + parseString('<element xmlns:abc="http:abc.com/de f g/hi/j k"><abc:foo /></element>') + def testDocRemoveChild(self): doc = parse(tstfile) title_tag = doc.documentElement.getElementsByTagName("TITLE")[0] |