pytest-testinfra
pytest-testinfra copied to clipboard
Order hosts in parametrized tests
Hi,
I use parameterized tests like these:
@pytest.mark.parametrize('parameter', parametermap)
def test_salt_state_apply(host, parameter):
<some test code>
Right now, the tests run each parameter per host:
host0-parameter0
host0-parameter1
host1-parameter0
host1-parameter1
Is there a way to instead have them test each host per parameter?
host0-parameter0
host1-parameter0
host0-parameter1
host1-parameter1
I tried to stack a second parameterized decorator for host, however it would still loop over the "original" hosts passed using --hosts.
Would appreciate any ideas!