In the following code
class TestSomething(unittest.TestCase):
def setUp(self):
print("setting up")
@unittest.skip("skip reason")
def test_1(self):
print("in test 1")
def test_2(self):
print("in test 2")
I expect only test_2 to run. But both the tests are running. I suspect that this is due to the setUp function, because if I remove it then only test_2 runs, as expected.
Is there a fix for this?