← Back to team overview

sikuli-driver team mailing list archive

[Question #207359]: How to verify in tearDown that test failed

 

New question #207359 on Sikuli:
https://answers.launchpad.net/sikuli/+question/207359

This is maybe not a sikuli question but its worth asking here :-)

I would like to take some actions when particular test(in a test class) fail. The best/only way to do this is in tearDown method that is common for all tests in the class. The question is how to understand that the case before entering in tearDown was failed.

I tried 

def tearDown(self):
        if (self.failureException is AssertionError): 
                # do something to recover

but it seems it is executed even the particular test before that passed

Any ideas from jython masters


-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.