(self)
| 4257 | b'''<site>\xf8</site>''')) |
| 4258 | |
| 4259 | def test_write_to_filename_as_unicode(self): |
| 4260 | self.addCleanup(os_helper.unlink, TESTFN) |
| 4261 | with open(TESTFN, 'w') as f: |
| 4262 | encoding = f.encoding |
| 4263 | os_helper.unlink(TESTFN) |
| 4264 | |
| 4265 | tree = ET.ElementTree(ET.XML('''<site>\xf8</site>''')) |
| 4266 | tree.write(TESTFN, encoding='unicode') |
| 4267 | with open(TESTFN, 'rb') as f: |
| 4268 | self.assertEqual(f.read(), b"<site>\xc3\xb8</site>") |
| 4269 | |
| 4270 | def test_write_to_text_file(self): |
| 4271 | self.addCleanup(os_helper.unlink, TESTFN) |
nothing calls this directly
no test coverage detected