(self)
| 15 | shutil.rmtree(self.tempdir) |
| 16 | |
| 17 | def test_write_exception(self): |
| 18 | error_message = "Some error message." |
| 19 | ex = Exception(error_message) |
| 20 | with open(self.outfile, 'w+', encoding='utf-8') as outfile: |
| 21 | write_exception(ex, outfile) |
| 22 | outfile.seek(0) |
| 23 | |
| 24 | expected_output = "\n%s\n" % error_message |
| 25 | self.assertEqual(outfile.read(), expected_output) |
nothing calls this directly
no test coverage detected