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

Method test_treebuilder_end

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

Source from the content-addressed store, hash-verified

3135 gc_collect()
3136
3137 def test_treebuilder_end(self):
3138 # Issue #27863
3139 def element_factory(x, y):
3140 return []
3141 b = ET.TreeBuilder(element_factory=element_factory)
3142
3143 b.start('tag', {})
3144 b.data('ABCD')
3145 self.assertRaises(AttributeError, b.end, 'tag')
3146 del b
3147 gc_collect()
3148
3149 def test_deepcopy_clear(self):
3150 # Prevent crashes when __deepcopy__() clears the children list.

Callers

nothing calls this directly

Calls 4

startMethod · 0.95
dataMethod · 0.95
gc_collectFunction · 0.90
assertRaisesMethod · 0.45

Tested by

no test coverage detected