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

Method assertEqualElements

Lib/test/test_xml_etree.py:204–211  ·  view source on GitHub ↗
(self, alice, bob)

Source from the content-addressed store, hash-verified

202 return result
203
204 def assertEqualElements(self, alice, bob):
205 self.assertIsInstance(alice, (ET.Element, pyET.Element))
206 self.assertIsInstance(bob, (ET.Element, pyET.Element))
207 self.assertEqual(len(list(alice)), len(list(bob)))
208 for x, y in zip(alice, bob):
209 self.assertEqualElements(x, y)
210 properties = operator.attrgetter('tag', 'tail', 'text', 'attrib')
211 self.assertEqual(properties(alice), properties(bob))
212
213# --------------------------------------------------------------------
214# element tree tests

Callers 1

test_pickleMethod · 0.80

Calls 3

listClass · 0.85
assertIsInstanceMethod · 0.80
assertEqualMethod · 0.45

Tested by

no test coverage detected