玩命加载中 . . .

pytest hook系列之pytest_cmdline_preparse


Overview

官网代码如下:

@hookspec(warn_on_impl=WARNING_CMDLINE_PREPARSE_HOOK)
def pytest_cmdline_preparse(config: "Config", args: List[str]) -> None:
    """(**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`` files, only for setuptools plugins.

    :param config: The pytest config object.
    :param args: Arguments passed on the command line.
    """

hook已经被其他hook pytest_load_initial_conftests所代替,这里就不介绍它了,后面将有文章专门介绍pytest_load_initial_conftests


文章作者: Gavin Wang
版权声明: 本博客所有文章除特別声明外,均采用 CC BY 4.0 许可协议。转载请注明来源 Gavin Wang !
  目录