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

Method test_bug_200709_element_insert

Lib/test/test_xml_etree.py:2439–2447  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2437 self.assertEqual(a[0].tag, ET.PI)
2438
2439 def test_bug_200709_element_insert(self):
2440 a = ET.Element('a')
2441 b = ET.SubElement(a, 'b')
2442 c = ET.SubElement(a, 'c')
2443 d = ET.Element('d')
2444 a.insert(0, d)
2445 self.assertEqual(summarize_list(a), ['d', 'b', 'c'])
2446 a.insert(-1, d)
2447 self.assertEqual(summarize_list(a), ['d', 'b', 'd', 'c'])
2448
2449 def test_bug_200709_iter_comment(self):
2450 a = ET.Element('a')

Callers

nothing calls this directly

Calls 3

insertMethod · 0.95
summarize_listFunction · 0.85
assertEqualMethod · 0.45

Tested by

no test coverage detected