(self)
| 4294 | b'''<site>\xf8</site>''')) |
| 4295 | |
| 4296 | def test_write_to_filename_as_unicode(self): |
| 4297 | self.addCleanup(os_helper.unlink, TESTFN) |
| 4298 | with open(TESTFN, 'w') as f: |
| 4299 | encoding = f.encoding |
| 4300 | os_helper.unlink(TESTFN) |
| 4301 | |
| 4302 | tree = ET.ElementTree(ET.XML('''<site>\xf8</site>''')) |
| 4303 | tree.write(TESTFN, encoding='unicode') |
| 4304 | with open(TESTFN, 'rb') as f: |
| 4305 | self.assertEqual(f.read(), b"<site>\xc3\xb8</site>") |
| 4306 | |
| 4307 | def test_write_to_text_file(self): |
| 4308 | self.addCleanup(os_helper.unlink, TESTFN) |
nothing calls this directly
no test coverage detected