Skip to content

Support starting only once with xdist #144

Open
@FRidh

Description

@FRidh

Is your feature request related to a problem? Please describe.
It is not uncommon wanting to start and stop a global service during a pytest run. Often test runs are also parallelized using pytest-xdist.

Describe the solution you'd like
Possibility to start a process when the fixture is first needed, and destruct when the fixture is not in use anymore at all. Both with single worker and multiple (local) workers.

Describe alternatives you've considered
Using https://pytest-xdist.readthedocs.io/en/stable/how-to.html#xdist.is_xdist_master separately or together for this purpose does not seem to work.

An alternative is another entry point that then starts pytest.

Additional context
Add any other context or screenshots about the feature request here.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions