When writing unit tests, it often happens that some tests "depend" on other tests.
For example, let's say I have a test that checks if I can instantiate a class. I have other tests that go straight ahead and create it, and then test other functions.
Let's also assume that a class cannot for any reason instantiate.
The result is a ton of tests that give errors. This is bad because I donβt see where the problem really is. I need a way to skip these tests if my instance test failed.
Is there a way to do this with the Python unittest module?
If this is not what I should do, what should I do to see where the problem really is when something breaks?
source share