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

Method test_write_to_user_text_writer

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

Source from the content-addressed store, hash-verified

4370 self.assertEqual(tree.getroot().tag, 'site')
4371
4372 def test_write_to_user_text_writer(self):
4373 tree = ET.ElementTree(ET.XML('''<site>\xf8</site>'''))
4374 stream = io.StringIO()
4375 writer = self.dummy()
4376 writer.write = stream.write
4377 tree.write(writer, encoding='unicode')
4378 self.assertEqual(stream.getvalue(), '''<site>\xf8</site>''')
4379
4380 def test_read_from_user_binary_reader(self):
4381 raw = io.BytesIO(b'''<?xml version="1.0"?><site></site>''')

Callers

nothing calls this directly

Calls 4

writeMethod · 0.95
getvalueMethod · 0.95
dummyMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected