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

Method test_read_from_bytesio

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

Source from the content-addressed store, hash-verified

4384 self.assertEqual(stream.getvalue(), '''<site>\xf8</site>''')
4385
4386 def test_read_from_bytesio(self):
4387 tree = ET.ElementTree()
4388 raw = io.BytesIO(b'''<?xml version="1.0"?><site></site>''')
4389 tree.parse(raw)
4390 self.assertEqual(tree.getroot().tag, 'site')
4391
4392 def test_write_to_bytesio(self):
4393 tree = ET.ElementTree(ET.XML('''<site>\xf8</site>'''))

Callers

nothing calls this directly

Calls 3

parseMethod · 0.95
getrootMethod · 0.95
assertEqualMethod · 0.45

Tested by

no test coverage detected