def test_call_success(self): date = Executable("date") self.assertTrue(date.call().return_code() == 0)
def test_executable_error(self): e = Executable("test") with self.assertRaises(ExecutableError) as context: e.call() self.assertTrue(context.exception.return_code == 1)