Skip to content

Clarify pytest_configure hook call order #2554

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
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
14 changes: 11 additions & 3 deletions _pytest/hookspec.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,17 @@ def pytest_addoption(parser):

@hookspec(historic=True)
def pytest_configure(config):
""" called after command line options have been parsed
and all plugins and initial conftest files been loaded.
This hook is called for every plugin.
"""
Allows plugins and conftest files to perform initial configuration.

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

After that, the hook is called for other conftest files as they are
imported.

:arg config: pytest config object
:type config: _pytest.config.Config
"""

# -------------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions changelog/2539.doc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Clarify ``pytest_configure`` hook call order.