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

Method testNodeListItem

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

Source from the content-addressed store, hash-verified

1236 doc.unlink()
1237
1238 def testNodeListItem(self):
1239 doc = parseString("<doc><e/><e/></doc>")
1240 children = doc.childNodes
1241 docelem = children[0]
1242 self.confirm(children[0] is children.item(0)
1243 and children.item(1) is None
1244 and docelem.childNodes.item(0) is docelem.childNodes[0]
1245 and docelem.childNodes.item(1) is docelem.childNodes[1]
1246 and docelem.childNodes.item(0).childNodes.item(0) is None,
1247 "test NodeList.item()")
1248 doc.unlink()
1249
1250 def testEncodings(self):
1251 doc = parseString('<foo>&#x20ac;</foo>')

Callers

nothing calls this directly

Calls 4

confirmMethod · 0.95
parseStringFunction · 0.90
itemMethod · 0.45
unlinkMethod · 0.45

Tested by

no test coverage detected