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

Method testGetAttrList

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

Source from the content-addressed store, hash-verified

437 dom.unlink()
438
439 def testGetAttrList(self):
440 dom = parseString("<abc/>")
441 self.addCleanup(dom.unlink)
442 el = dom.documentElement
443 el.setAttribute("spam", "jam")
444 self.assertEqual(len(el.attributes.items()), 1)
445 el.setAttribute("foo", "bar")
446 items = el.attributes.items()
447 self.assertEqual(len(items), 2)
448 self.assertIn(('spam', 'jam'), items)
449 self.assertIn(('foo', 'bar'), items)
450
451 def testGetAttrValues(self):
452 dom = parseString("<abc/>")

Callers

nothing calls this directly

Calls 6

parseStringFunction · 0.90
addCleanupMethod · 0.80
setAttributeMethod · 0.80
assertInMethod · 0.80
assertEqualMethod · 0.45
itemsMethod · 0.45

Tested by

no test coverage detected