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

Method _my_loader

Lib/test/test_xml_etree.py:2059–2066  ·  view source on GitHub ↗
(self, href, parse)

Source from the content-addressed store, hash-verified

2057 return None
2058
2059 def _my_loader(self, href, parse):
2060 # Used to avoid a test-dependency problem where the default loader
2061 # of ElementInclude uses the pyET parser for cET tests.
2062 if parse == 'xml':
2063 with open(href, 'rb') as f:
2064 return ET.parse(f).getroot()
2065 else:
2066 return None
2067
2068 def test_xinclude_default(self):
2069 from xml.etree import ElementInclude

Callers

nothing calls this directly

Calls 3

getrootMethod · 0.80
openFunction · 0.50
parseMethod · 0.45

Tested by

no test coverage detected