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

Function make_xml_file

Lib/test/test_sax.py:117–121  ·  view source on GitHub ↗
(doc, encoding, decl_encoding=...)

Source from the content-addressed store, hash-verified

115 return xml_str(doc, decl_encoding).encode(encoding, 'xmlcharrefreplace')
116
117def make_xml_file(doc, encoding, decl_encoding=...):
118 if decl_encoding is ...:
119 decl_encoding = encoding
120 with open(TESTFN, 'w', encoding=encoding, errors='xmlcharrefreplace') as f:
121 f.write(xml_str(doc, decl_encoding))
122
123
124class ParseTest(unittest.TestCase):

Callers 5

test_parse_textMethod · 0.85
test_parse_bytesMethod · 0.85

Calls 3

xml_strFunction · 0.85
openFunction · 0.50
writeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…