MCPcopy Index your code
hub / github.com/aws/aws-cli / test_write_exception

Method test_write_exception

tests/functional/test_utils.py:17–25  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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)

Callers

nothing calls this directly

Calls 3

write_exceptionFunction · 0.90
seekMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected