I'm trying pytest parametrization with pytest_generate_tests():
conftest.py
def pytest_generate_tests(metafunc):
if 'cliautoconfigargs' in metafunc.fixturenames:
metafunc.parametrize(
'cliautoconfigargs', list(<some list of params>))
)
test_cliautoconfig.py
def test_check_conf_mode(cliautoconfigargs):
assert True
def test_enable_disable_command(cliautoconfigargs):
assert True
In such configuration each test running with all its parameters and only after it completed the next test with its parameters starting. I'd like to configure testing in such way, when all tests should be cyclicaly run with their first parameter, then with second parameter, and so on.
For example a have the following output:
test_cliautoconfig.py::test_check_conf_mode[cliautoconfigargs0]
test_cliautoconfig.py::test_check_conf_mode[cliautoconfigargs1]
test_cliautoconfig.py::test_enable_disable_command[cliautoconfigargs0]
test_cliautoconfig.py::test_enable_disable_command[cliautoconfigargs1]
I want to have the next one:
test_cliautoconfig.py::test_check_conf_mode[cliautoconfigargs0]
test_cliautoconfig.py::test_enable_disable_command[cliautoconfigargs0]
test_cliautoconfig.py::test_check_conf_mode[cliautoconfigargs1]
test_cliautoconfig.py::test_enable_disable_command[cliautoconfigargs1]