Python pytest类分布式测试xdist

Python pytest类分布式测试xdist,python,testing,pytest,xdist,Python,Testing,Pytest,Xdist,目前,我正在运行以下测试: py.test test.py -s -v -d --tx 3*popen 它将我们所有的pytest函数分布在3个python进程中 class TestClass(): def test_1(): pass def test_2(): pass def test_3(): pass 我希望xdist/pytest按类分发作业: class TestClass1(): def tes

目前,我正在运行以下测试:

py.test test.py -s -v -d --tx 3*popen
它将我们所有的pytest函数分布在3个python进程中

class TestClass():
    def test_1():
        pass
    def test_2():
        pass
    def test_3():
        pass
我希望xdist/pytest按类分发作业:

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

是否有一个标志我可以通过pytest/xdist来执行此操作?

目前无法更改测试分发的粒度。但这是很多人(包括我在内)想要的功能。这里有一个悬而未决的问题: