MCPcopy Index your code
hub / github.com/python/cpython / testDocRemoveChild

Method testDocRemoveChild

Lib/test/test_minidom.py:1736–1743  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1734 )
1735
1736 def testDocRemoveChild(self):
1737 doc = parse(tstfile)
1738 title_tag = doc.documentElement.getElementsByTagName("TITLE")[0]
1739 self.assertRaises( xml.dom.NotFoundErr, doc.removeChild, title_tag)
1740 num_children_before = len(doc.childNodes)
1741 doc.removeChild(doc.childNodes[0])
1742 num_children_after = len(doc.childNodes)
1743 self.assertEqual(num_children_after, num_children_before - 1)
1744
1745 def testProcessingInstructionNameError(self):
1746 # wrong variable in .nodeValue property will

Callers

nothing calls this directly

Calls 5

parseFunction · 0.90
getElementsByTagNameMethod · 0.45
assertRaisesMethod · 0.45
removeChildMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected