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

Function main

src/_pytest/config/__init__.py:188–201  ·  view source on GitHub ↗

Perform an in-process test run. :param args: List of command line arguments. If `None` or not given, defaults to reading arguments directly from the process command line (:data:`sys.argv`). :param plugins: List of plugin objects to be auto-registered during initialization.

(
    args: list[str] | os.PathLike[str] | None = None,
    plugins: Sequence[str | _PluggyPlugin] | None = None,
)

Source from the content-addressed store, hash-verified

186
187
188def main(
189 args: list[str] | os.PathLike[str] | None = None,
190 plugins: Sequence[str | _PluggyPlugin] | None = None,
191) -> int | ExitCode:
192 """Perform an in-process test run.
193
194 :param args:
195 List of command line arguments. If `None` or not given, defaults to reading
196 arguments directly from the process command line (:data:`sys.argv`).
197 :param plugins: List of plugin objects to be auto-registered during initialization.
198
199 :returns: An exit code.
200 """
201 return _main(args=args, plugins=plugins, prog="pytest.main()")
202
203
204def _main(

Callers 1

inline_runMethod · 0.90

Calls 1

_mainFunction · 0.70

Tested by 1

inline_runMethod · 0.72