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

Method _check_element_factory_class

Lib/test/test_xml_etree.py:3876–3883  ·  view source on GitHub ↗
(self, cls)

Source from the content-addressed store, hash-verified

3874 self.assertEqual(lst, ['toplevel'])
3875
3876 def _check_element_factory_class(self, cls):
3877 tb = ET.TreeBuilder(element_factory=cls)
3878
3879 parser = ET.XMLParser(target=tb)
3880 parser.feed(self.sample1)
3881 e = parser.close()
3882 self.assertIsInstance(e, cls)
3883 self._check_sample1_element(e)
3884
3885 def test_element_factory_subclass(self):
3886 class MyElement(ET.Element):

Calls 4

feedMethod · 0.95
closeMethod · 0.95
assertIsInstanceMethod · 0.80

Tested by

no test coverage detected