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

Method testGetElementsByTagNameNS

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

Source from the content-addressed store, hash-verified

483 def testGetAttributeNode(self): pass
484
485 def testGetElementsByTagNameNS(self):
486 d="""<foo xmlns:minidom='http://pyxml.sf.net/minidom'>
487 <minidom:myelem/>
488 </foo>"""
489 dom = parseString(d)
490 elems = dom.getElementsByTagNameNS("http://pyxml.sf.net/minidom",
491 "myelem")
492 self.assertEqual(len(elems), 1)
493 self.assertEqual(elems[0].namespaceURI, "http://pyxml.sf.net/minidom")
494 self.assertEqual(elems[0].localName, "myelem")
495 self.assertEqual(elems[0].prefix, "minidom")
496 self.assertEqual(elems[0].tagName, "minidom:myelem")
497 self.assertEqual(elems[0].nodeName, "minidom:myelem")
498 dom.unlink()
499
500 def get_empty_nodelist_from_elements_by_tagName_ns_helper(self, doc, nsuri,
501 lname):

Callers

nothing calls this directly

Calls 4

parseStringFunction · 0.90
assertEqualMethod · 0.45
unlinkMethod · 0.45

Tested by

no test coverage detected