Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 7
0
 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)
Exemplo n.º 8
0
 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)