def check_assertions(self, checklist, all=False):
"""Check a set of assertions
@param all boolean if False, stop at first failure
@return: False if any assertion fails.
"""
assert isinstance(checklist, dict) and 'checks' in checklist
retval = None
retlist = []
for assertion in checklist['checks']:
retval = self.check_assertion(**assertion)
retlist.append(retval)
if not retval.success and not all:
print "Error message:", retval[3]
return retlist
return retlist
assertionchecker.py 文件源码
python
阅读 25
收藏 0
点赞 0
评论 0
评论列表
文章目录