1. ホーム
  2. パイソン

python assertRaises

2022-02-24 23:08:20
with self.assertRaises(TypeError) as pe:
    f.fail()

self.assertEqual(
    'The draft must be public first.',
    str(pe.exception)
)