From dd1447cfe509fac989258e078a73609e0d122a73 Mon Sep 17 00:00:00 2001 From: Ran Benita Date: Mon, 10 Jan 2022 00:04:20 +0200 Subject: [PATCH] hookspec: move pytest_load_initial_conftests up Reflect the order in which the plugins are called. --- src/_pytest/hookspec.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/_pytest/hookspec.py b/src/_pytest/hookspec.py index a5c9aff70..f0c579c7b 100644 --- a/src/_pytest/hookspec.py +++ b/src/_pytest/hookspec.py @@ -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 # -------------------------------------------------------------------------