Skip to content
This repository was archived by the owner on May 27, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions pytest_mp/hookspec.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
from pluggy import HookspecMarker


hookspec = HookspecMarker("pytest")


@hookspec
def pytest_mp_configure(clique_options):
"""
Allows plugins and conftest files to perform initial clique configuration.

This hook is called for every plugin and conftest file after command line options of cliques have been parsed.

:param list[argparse.Namespace] clique_options: list of options of cliques; empty if no clique explicitly created.
"""


@hookspec
def pytest_mp_prefork(clique_id):
"""
Allows plugins and conftest files to perform configuration for a specific clique before forking a new process.

This hook is called for every plugin and conftest file before forking a new process.

:param int clique_id: the clique id starting from 0.
"""
Loading