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

Method testRemoveNamedItem

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

Source from the content-addressed store, hash-verified

702 def testAttrListKeysNS(self): pass
703
704 def testRemoveNamedItem(self):
705 doc = parseString("<doc a=''/>")
706 e = doc.documentElement
707 attrs = e.attributes
708 a1 = e.getAttributeNode("a")
709 a2 = attrs.removeNamedItem("a")
710 self.assertTrue(a1.isSameNode(a2))
711 self.assertRaises(xml.dom.NotFoundErr, attrs.removeNamedItem, "a")
712
713 def testRemoveNamedItemNS(self):
714 doc = parseString("<doc xmlns:a='http://xml.python.org/' a:b=''/>")

Callers

nothing calls this directly

Calls 6

parseStringFunction · 0.90
getAttributeNodeMethod · 0.80
assertTrueMethod · 0.80
isSameNodeMethod · 0.80
removeNamedItemMethod · 0.45
assertRaisesMethod · 0.45

Tested by

no test coverage detected