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

Function pytest_cmdline_preparse

src/_pytest/hookspec.py:162–173  ·  view source on GitHub ↗

(**Deprecated**) modify command line arguments before option parsing. This hook is considered deprecated and will be removed in a future pytest version. Consider using :hook:`pytest_load_initial_conftests` instead. .. note:: This hook will not be called for ``conftest.py`` file

(config: "Config", args: List[str])

Source from the content-addressed store, hash-verified

160
161@hookspec(warn_on_impl=WARNING_CMDLINE_PREPARSE_HOOK)
162def pytest_cmdline_preparse(config: "Config", args: List[str]) -> None:
163 """(**Deprecated**) modify command line arguments before option parsing.
164
165 This hook is considered deprecated and will be removed in a future pytest version. Consider
166 using :hook:`pytest_load_initial_conftests` instead.
167
168 .. note::
169 This hook will not be called for ``conftest.py`` files, only for setuptools plugins.
170
171 :param pytest.Config config: The pytest config object.
172 :param List[str] args: Arguments passed on the command line.
173 """
174
175
176@hookspec(firstresult=True)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected