#文件./test_case/test_login2.py
import pytest
class Test_login_fail():
def test_login_fail(self):
print('测试用例2操作')
if __name__ == '__main__':
pytest.main()
#文件./test_case/test_login3.py
import pytest
class Test_login_fail():
def test_login_fail(self):
print('测试用例3操作')
if __name__ == "__main__":
pytest.main(["-s", "test_b.py", '--workers=2', '--tests-per-worker=4'])
#文件run.py
import pytest
pytest.main(["-s", "./test_case",'--workers=1', '--tests-per-worker=2'])
执行 run.py 报错: