MCPcopy Create free account
hub / github.com/pytest-dev/pytest / pytest_cmdline_parse

Function pytest_cmdline_parse

src/_pytest/hookspec.py:144–158  ·  view source on GitHub ↗

Return an initialized config object, parsing the specified args. Stops at first non-None result, see :ref:`firstresult`. .. note:: This hook will only be called for plugin classes passed to the ``plugins`` arg when using `pytest.main`_ to perform an in-process test

(
    pluginmanager: "PytestPluginManager", args: List[str]
)

Source from the content-addressed store, hash-verified

142
143@hookspec(firstresult=True)
144def pytest_cmdline_parse(
145 pluginmanager: "PytestPluginManager", args: List[str]
146) -> Optional["Config"]:
147 """Return an initialized config object, parsing the specified args.
148
149 Stops at first non-None result, see :ref:`firstresult`.
150
151 .. note::
152 This hook will only be called for plugin classes passed to the
153 ``plugins`` arg when using `pytest.main`_ to perform an in-process
154 test run.
155
156 :param pytest.PytestPluginManager pluginmanager: The pytest plugin manager.
157 :param List[str] args: List of arguments passed on the command line.
158 """
159
160
161@hookspec(warn_on_impl=WARNING_CMDLINE_PREPARSE_HOOK)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected