Skip to content

Commit 7cd03d7

Browse files
Merge pull request #2554 from nicoddemus/pytest-configure-order
Clarify pytest_configure hook call order
2 parents db24a3b + 3667086 commit 7cd03d7

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

_pytest/hookspec.py

+11-3
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,17 @@ def pytest_addoption(parser):
6060

6161
@hookspec(historic=True)
6262
def pytest_configure(config):
63-
""" called after command line options have been parsed
64-
and all plugins and initial conftest files been loaded.
65-
This hook is called for every plugin.
63+
"""
64+
Allows plugins and conftest files to perform initial configuration.
65+
66+
This hook is called for every plugin and initial conftest file
67+
after command line options have been parsed.
68+
69+
After that, the hook is called for other conftest files as they are
70+
imported.
71+
72+
:arg config: pytest config object
73+
:type config: _pytest.config.Config
6674
"""
6775

6876
# -------------------------------------------------------------------------

changelog/2539.doc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Clarify ``pytest_configure`` hook call order.

0 commit comments

Comments
 (0)