From 3667086acc46f410ffe93a774107fb773833505a Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Tue, 4 Jul 2017 20:47:15 -0300 Subject: [PATCH] Clarify pytest_configure hook call order Fix #2539 --- _pytest/hookspec.py | 14 +++++++++++--- changelog/2539.doc | 1 + 2 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 changelog/2539.doc diff --git a/_pytest/hookspec.py b/_pytest/hookspec.py index 2c9a66163..f12aa87cc 100644 --- a/_pytest/hookspec.py +++ b/_pytest/hookspec.py @@ -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 """ # ------------------------------------------------------------------------- diff --git a/changelog/2539.doc b/changelog/2539.doc new file mode 100644 index 000000000..6d5a9c9db --- /dev/null +++ b/changelog/2539.doc @@ -0,0 +1 @@ +Clarify ``pytest_configure`` hook call order.