diff --git a/changelog/14465.doc.rst b/changelog/14465.doc.rst new file mode 100644 index 00000000000..5641d0428ca --- /dev/null +++ b/changelog/14465.doc.rst @@ -0,0 +1 @@ +Updated the xdist ``newhooks.py`` link in the hooks how-to documentation to point to the current ``master`` branch with the updated ``src`` layout. diff --git a/doc/en/how-to/writing_hook_functions.rst b/doc/en/how-to/writing_hook_functions.rst index d5d6d2ae4f7..e08570a0054 100644 --- a/doc/en/how-to/writing_hook_functions.rst +++ b/doc/en/how-to/writing_hook_functions.rst @@ -205,7 +205,7 @@ class or module can then be passed to the ``pluginmanager`` using the ``pytest_a For a real world example, see `newhooks.py`_ from `xdist `_. -.. _`newhooks.py`: https://github.com/pytest-dev/pytest-xdist/blob/974bd566c599dc6a9ea291838c6f226197208b46/xdist/newhooks.py +.. _`newhooks.py`: https://github.com/pytest-dev/pytest-xdist/blob/master/src/xdist/newhooks.py Hooks may be called both from fixtures or from other hooks. In both cases, hooks are called through the ``hook`` object, available in the ``config`` object. Most hooks receive a