MCPcopy
hub / github.com/pytest-dev/pytest / pytest_cmdline_main

Function pytest_cmdline_main

src/_pytest/helpconfig.py:166–177  ·  view source on GitHub ↗
(config: Config)

Source from the content-addressed store, hash-verified

164
165
166def pytest_cmdline_main(config: Config) -> int | ExitCode | None:
167 # Note: a single `--version` argument is handled directly by `Config.main()` to avoid starting up the entire
168 # pytest infrastructure just to display the version (#13574).
169 if config.option.version > 1:
170 show_version_verbose(config)
171 return ExitCode.OK
172 elif config.option.help:
173 config._do_configure()
174 showhelp(config)
175 config._ensure_unconfigure()
176 return ExitCode.OK
177 return None
178
179
180def showhelp(config: Config) -> None:

Callers

nothing calls this directly

Calls 4

show_version_verboseFunction · 0.85
showhelpFunction · 0.85
_do_configureMethod · 0.80
_ensure_unconfigureMethod · 0.80

Tested by

no test coverage detected