Is it possible to get the results of a test (i.e. whether all assertions have passed) in a tearDown() method? I\'m running Selenium scripts, and I\'d like to do some reporti
Following on from amatellanes' answer, if you're on Python3.4, you can't use _outcomeForDoCleanups. Here's what I managed to hack together:
_outcomeForDoCleanups
def _test_has_failed(self): for method, error in self._outcome.errors: if error: return True return False
yucky, but it seems to work.