Use TestCase.assertRaises (or TestCase.failUnlessRaises) from the unittest module, for example: import mymod class MyTestCase(unittest.
確定! 回上一頁