hookspec: move pytest_load_initial_conftests up

Reflect the order in which the plugins are called.
This commit is contained in:
Ran Benita 2022-01-10 00:04:20 +02:00
parent 9ad8b9fc36
commit dd1447cfe5
1 changed files with 12 additions and 12 deletions

View File

@ -156,18 +156,6 @@ def pytest_cmdline_parse(
"""
@hookspec(firstresult=True)
def pytest_cmdline_main(config: "Config") -> Optional[Union["ExitCode", int]]:
"""Called for performing the main command line action. The default
implementation will invoke the configure hooks and runtest_mainloop.
Stops at first non-None result, see :ref:`firstresult`.
:param config: The pytest config object.
:returns: The exit code.
"""
def pytest_load_initial_conftests(
early_config: "Config", parser: "Parser", args: List[str]
) -> None:
@ -183,6 +171,18 @@ def pytest_load_initial_conftests(
"""
@hookspec(firstresult=True)
def pytest_cmdline_main(config: "Config") -> Optional[Union["ExitCode", int]]:
"""Called for performing the main command line action. The default
implementation will invoke the configure hooks and runtest_mainloop.
Stops at first non-None result, see :ref:`firstresult`.
:param config: The pytest config object.
:returns: The exit code.
"""
# -------------------------------------------------------------------------
# collection hooks
# -------------------------------------------------------------------------