本文整理汇总了Python中fit.Parse.Parse.tagIsError方法的典型用法代码示例。如果您正苦于以下问题:Python Parse.tagIsError方法的具体用法?Python Parse.tagIsError怎么用?Python Parse.tagIsError使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类fit.Parse.Parse
的用法示例。
在下文中一共展示了Parse.tagIsError方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: shouldHandleStringAsExceptionParameter
# 需要导入模块: from fit.Parse import Parse [as 别名]
# 或者: from fit.Parse.Parse import tagIsError [as 别名]
def shouldHandleStringAsExceptionParameter(self):
fix = Fixture()
cell = Parse(tag="td", body="Oops.")
fix.exception(cell, "What the heck?")
assert cell.body.find("What the heck?") > -1
assert cell.tagIsError()
assert fix.counts.exceptions == 1
示例2: shouldRecognizeFitFailureException
# 需要导入模块: from fit.Parse import Parse [as 别名]
# 或者: from fit.Parse.Parse import tagIsError [as 别名]
def shouldRecognizeFitFailureException(self):
fix = Fixture()
cell = Parse(tag="td", body="Oops.")
fix.exception(cell, FitFailureException("What the heck?"))
assert cell.body.find("What the heck?") > -1
assert cell.tagIsError()
assert fix.counts.exceptions == 1
示例3: shouldAnnotateOnErrorCall
# 需要导入模块: from fit.Parse import Parse [as 别名]
# 或者: from fit.Parse.Parse import tagIsError [as 别名]
def shouldAnnotateOnErrorCall(self):
fix = Fixture()
cell = Parse(tag="td", body="Oops.")
fix.error(cell, "Not good!")
assert cell.body.find("Not good!") > -1
assert cell.tagIsError()
assert fix.counts.exceptions == 1
示例4: shouldRaiseExceptionIfNoExit
# 需要导入模块: from fit.Parse import Parse [as 别名]
# 或者: from fit.Parse.Parse import tagIsError [as 别名]
def shouldRaiseExceptionIfNoExit(self):
obj = self.obj
heads = Parse(tag="td", body='label')
obj.bind(heads)
assert heads.tagIsError()
assert heads.body.find("processLabel not implemented") > 1