How run test in cycle?

Hello, guys!
I need your help. I created Driver’s class and instance of driver in separate file. Made testclass. Then i’m running all cases in cycle. But if one case is failing, other cases, after it, are failing, too. How I can resolve it? I’m using the latest version of Appium and test wrote on python.

we use java + testNG to control set of tests.

Thank you:) But i made it on python, so i need in variant on python