Closed
Description
I made a modification in the hook pytest_collection_modifyitems to allow for multiple loadgroups to be combined into one. This is very useful when used with pytest.param and passing marks.
My use case was making ui tests with selenium automatically expand to include 3 different browsers, while maintaining the other mark of the specific test cases, allowing all of them to run in parallel.
The fixture was something like this:
@pytest.fixture(
scope="session",
params=[
pytest.param(
"chrome",
marks=pytest.mark.xdist_group("chrome"),
),
pytest.param(
"firefox",
marks=pytest.mark.xdist_group("firefox"),
),
pytest.param(
"edge",
marks=pytest.mark.xdist_group("edge"),
),
],
)
def setup_container(...):
...
I have a PR to address this, should it be accepted. Tests seem to be passing.
Metadata
Metadata
Assignees
Labels
No labels