pytest parametrize tests并行运行所有场景

时间:2016-05-31 00:37:29

标签: python python-2.7 popen pytest pytest-django

我可以一个接一个地运行pytest paramatrize测试,如下所示

@pytest.mark.parametrize("asetup", ['a1','a2'])
@pytest.mark.parametrize("bsetup", ['b1','b2'])

以下是4个场景。我可以并行运行吗?

  <Function 'test_1[b1-a1]'>
  <Function 'test_1[b1-a2]'>
  <Function 'test_1[b2-a1]'>
  <Function 'test_1[b2-a2]'>

我尝试过使用xdist,但它仍然依旧运行。

py.test -d --tx 3*popen//python=python2.7 tests_suite.py -vv -k 'test_1' -s

我将scopemodule更改为function,但我没有看到它们并行运行。

@pytest.fixture(scope="function")

0 个答案:

没有答案
相关问题