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

Method testDeleteAttr

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

Source from the content-addressed store, hash-verified

338 dom.unlink()
339
340 def testDeleteAttr(self):
341 dom = Document()
342 child = dom.appendChild(dom.createElement("abc"))
343
344 self.assertEqual(len(child.attributes), 0)
345 child.setAttribute("def", "ghi")
346 self.assertEqual(len(child.attributes), 1)
347 del child.attributes["def"]
348 self.assertEqual(len(child.attributes), 0)
349 dom.unlink()
350
351 def testRemoveAttr(self):
352 dom = Document()

Callers

nothing calls this directly

Calls 6

appendChildMethod · 0.95
createElementMethod · 0.95
unlinkMethod · 0.95
DocumentClass · 0.90
setAttributeMethod · 0.80
assertEqualMethod · 0.45

Tested by

no test coverage detected