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

Method test_write_to_user_text_writer

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

Source from the content-addressed store, hash-verified

4407 self.assertEqual(tree.getroot().tag, 'site')
4408
4409 def test_write_to_user_text_writer(self):
4410 tree = ET.ElementTree(ET.XML('''<site>\xf8</site>'''))
4411 stream = io.StringIO()
4412 writer = self.dummy()
4413 writer.write = stream.write
4414 tree.write(writer, encoding='unicode')
4415 self.assertEqual(stream.getvalue(), '''<site>\xf8</site>''')
4416
4417 def test_read_from_user_binary_reader(self):
4418 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