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

Method testGetAttributeNS

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

Source from the content-addressed store, hash-verified

467 self.assertEqual(child.getAttribute('missing'), '')
468
469 def testGetAttributeNS(self):
470 dom = Document()
471 child = dom.appendChild(
472 dom.createElementNS("http://www.python.org", "python:abc"))
473 child.setAttributeNS("http://www.w3.org", "xmlns:python",
474 "http://www.python.org")
475 self.assertEqual(child.getAttributeNS("http://www.w3.org", "python"),
476 'http://www.python.org')
477 self.assertEqual(child.getAttributeNS("http://www.w3.org", "other"),
478 '')
479 child2 = child.appendChild(dom.createElement('abc'))
480 self.assertEqual(child2.getAttributeNS("http://www.python.org", "missing"),
481 '')
482
483 def testGetAttributeNode(self): pass
484

Callers

nothing calls this directly

Calls 8

appendChildMethod · 0.95
createElementNSMethod · 0.95
createElementMethod · 0.95
DocumentClass · 0.90
setAttributeNSMethod · 0.80
getAttributeNSMethod · 0.80
assertEqualMethod · 0.45
appendChildMethod · 0.45

Tested by

no test coverage detected