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

Method test_write_to_stringio

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

Source from the content-addressed store, hash-verified

4378 self.assertEqual(tree.getroot().tag, 'site')
4379
4380 def test_write_to_stringio(self):
4381 tree = ET.ElementTree(ET.XML('''<site>\xf8</site>'''))
4382 stream = io.StringIO()
4383 tree.write(stream, encoding='unicode')
4384 self.assertEqual(stream.getvalue(), '''<site>\xf8</site>''')
4385
4386 def test_read_from_bytesio(self):
4387 tree = ET.ElementTree()

Callers

nothing calls this directly

Calls 3

writeMethod · 0.95
getvalueMethod · 0.95
assertEqualMethod · 0.45

Tested by

no test coverage detected