summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorAndrew M. Kuchling <amk@amk.ca>2010-07-25 23:38:47 (GMT)
committerAndrew M. Kuchling <amk@amk.ca>2010-07-25 23:38:47 (GMT)
commit688b9e384e065a1b63dcf4c2237e70ac180658a0 (patch)
treebf920452a33b3e75087e1896b5f862023c610efd /Lib/test
parentea64a6a4ca1ec000f1120362e5362e867fe1f4bb (diff)
downloadcpython-688b9e384e065a1b63dcf4c2237e70ac180658a0.zip
cpython-688b9e384e065a1b63dcf4c2237e70ac180658a0.tar.gz
cpython-688b9e384e065a1b63dcf4c2237e70ac180658a0.tar.bz2
#777884: make .normalize() do nothing for childless nodes, instead of raising an exception
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_minidom.py8
1 files changed, 8 insertions, 0 deletions
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 @@ class MinidomTest(unittest.TestCase):
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