()
| 844 | writer = codecs.open(self.fname, 'w', encoding='ascii', |
| 845 | errors='xmlcharrefreplace', buffering=0) |
| 846 | def cleanup(): |
| 847 | writer.close() |
| 848 | os_helper.unlink(self.fname) |
| 849 | self.addCleanup(cleanup) |
| 850 | def getvalue(): |
| 851 | # Windows will not let use reopen without first closing |