#777884: make .normalize() do nothing for childless nodes, instead of raising an exception
diff --git a/Lib/test/test_minidom.py b/Lib/test/test_minidom.py
index 9a9acfb..d9d3be4 100644
--- a/Lib/test/test_minidom.py
+++ b/Lib/test/test_minidom.py
@@ -951,6 +951,14 @@
doc.unlink()
+ def testBug0777884(self):
+ doc = parseString("<o>text</o>")
+ text = doc.documentElement.childNodes[0]
+ self.assertEquals(text.nodeType, Node.TEXT_NODE)
+ # Should run quietly, doing nothing.
+ text.normalize()
+ doc.unlink()
+
def testBug1433694(self):
doc = parseString("<o><i/>t</o>")
node = doc.documentElement