MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_read_from_bytesio

Method test_read_from_bytesio

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

Source from the content-addressed store, hash-verified

4347 self.assertEqual(stream.getvalue(), '''<site>\xf8</site>''')
4348
4349 def test_read_from_bytesio(self):
4350 tree = ET.ElementTree()
4351 raw = io.BytesIO(b'''<?xml version="1.0"?><site></site>''')
4352 tree.parse(raw)
4353 self.assertEqual(tree.getroot().tag, 'site')
4354
4355 def test_write_to_bytesio(self):
4356 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