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

Class EchoTarget

Lib/test/test_xml_etree.py:2382–2384  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2380
2381 # Test custom builder.
2382 class EchoTarget:
2383 def close(self):
2384 return ET.Element("element") # simulate root
2385 parser = ET.XMLParser(target=EchoTarget())
2386 parser.feed("<element>some text</element>")
2387 self.assertEqual(parser.close().tag, 'element')

Callers 1

test_bug_200708_closeMethod · 0.85

Calls

no outgoing calls

Tested by 1

test_bug_200708_closeMethod · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…