summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_minidom.py
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2008-05-23 15:18:28 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2008-05-23 15:18:28 (GMT)
commit27e4a179f277b568f04d482765ab773068ae6ab6 (patch)
treed3e1911917a15ff77cbd5a1846064c6a28606d52 /Lib/test/test_minidom.py
parent8c255e4173cfc86ff7015b8f75dccf0d41b24003 (diff)
downloadcpython-27e4a179f277b568f04d482765ab773068ae6ab6.zip
cpython-27e4a179f277b568f04d482765ab773068ae6ab6.tar.gz
cpython-27e4a179f277b568f04d482765ab773068ae6ab6.tar.bz2
Issue #1390: Raise ValueError in toxml when an invalid comment would
otherwise be produced.
Diffstat (limited to 'Lib/test/test_minidom.py')
-rw-r--r--Lib/test/test_minidom.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_minidom.py b/Lib/test/test_minidom.py
index 97bca2c..f1f1378 100644
--- a/Lib/test/test_minidom.py
+++ b/Lib/test/test_minidom.py
@@ -1314,6 +1314,11 @@ class MinidomTest(unittest.TestCase):
for i in range(len(n1.childNodes)):
stack.append((n1.childNodes[i], n2.childNodes[i]))
+ def testSerializeCommentNodeWithDoubleHyphen(self):
+ doc = create_doc_without_doctype()
+ doc.appendChild(doc.createComment("foo--bar"))
+ self.assertRaises(ValueError, doc.toxml)
+
def test_main():
run_unittest(MinidomTest)