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
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
def shouldBeAbleToColorExceptionAsWrong(self): fix = Fixture() cell = Parse(tag="td", body="Oops.") fix.exception(cell, "What the heck?", color="wrong") assert cell.body.find("What the heck?") > -1 assert cell.tagIsWrong() assert fix.counts.wrong == 1
def exception(self, e): tables = Parse(tag="body", body="Unable to parse input. Input ignored.", parts=None, more=None) Fixture.exception(self.fixture, tables, e)
def exception(self,e): tables = Parse(tag="body", body="Unable to parse input. Input ignored.", parts=None, more=None) Fixture.exception(self.fixture, tables, e)