mardi 12 avril 2016

pytest distributed testing xdist by class

currently I am running tests as follows: py.test test.py -s -v -d --tx 3*popen

which distributes all the pytest test functions we have among 3 python processes.

class TestClass():
    def test_1():
        pass
    def test_2():
        pass
    def test_3():
        pass

I want xdist/pytest to distribute the jobs by class.

class TestClass1():
    def test_1():
        pass
class TestClass2():
    def test_2():
        pass
class TestClass3():
    def test_3():
        pass

Is there a flag i can pass pytest/xdist to do this?

Thanks

Aucun commentaire:

Enregistrer un commentaire