lundi 1 juin 2015

Pytest - custom marker on parameters

do you know if it's possible to mark parameters with my custom marker 'pytest.mark.smoke' to run command 'pytest -m smoke' and execute only tests with marker ? :

@pytest.fixture(params=[pytest.mark.smoke("/tmp"), "/tmp/myfolder", "/mydir/myfolder"])
def paths(request):
     return request.param

def test_printdir(paths):
    print paths

A got many fixtures like that, some of my tests nodes seems deselected but some of non-smoke parameters still running.

Could you tell me if the way i use custom markers is correct. Thx

Aucun commentaire:

Enregistrer un commentaire