From 403f556928e0000e8cd95df85040e750a0e75aa2 Mon Sep 17 00:00:00 2001 From: Gary Tyler Date: Thu, 28 Mar 2019 19:25:55 -0400 Subject: [PATCH] Update docs for 'pytest_cmdline_parse' hook to note availability liminations --- changelog/4974.doc.rst | 1 + src/_pytest/hookspec.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 changelog/4974.doc.rst diff --git a/changelog/4974.doc.rst b/changelog/4974.doc.rst new file mode 100644 index 000000000..74799c9b3 --- /dev/null +++ b/changelog/4974.doc.rst @@ -0,0 +1 @@ +Update docs for ``pytest_cmdline_parse`` hook to note availability liminations diff --git a/src/_pytest/hookspec.py b/src/_pytest/hookspec.py index 28eb06b03..4daef9178 100644 --- a/src/_pytest/hookspec.py +++ b/src/_pytest/hookspec.py @@ -99,8 +99,8 @@ def pytest_cmdline_parse(pluginmanager, args): Stops at first non-None result, see :ref:`firstresult` .. note:: - This hook will not be called for ``conftest.py`` files, only for setuptools plugins or - modules which implement this hook and are early-loaded with the ``-p`` flag. + This hook will only be called for plugin classes passed to the ``plugins`` arg when using `pytest.main`_ to + perform an in-process test run. :param _pytest.config.PytestPluginManager pluginmanager: pytest plugin manager :param list[str] args: list of arguments passed on the command line