samedi 10 mars 2018

How to repeat pytest test case?

I have few test cases as described below. But i want to repeat test1() after every other test case. how can i achieve this?

@pytest.mark.test1()
@pytest.mark.parametrize(a,b,c)
def test_test1():
   ......
   ......

@pytest.mark.test2()
def test_test2():
   ......
   ......

@pytest.mark.test3()
def test_test3():
   ......
   ......

run test1() again

Aucun commentaire:

Enregistrer un commentaire