示例#1
0
 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
示例#2
0
 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
示例#3
0
 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
示例#4
0
 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
示例#5
0
 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
示例#6
0
 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 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)