From f4f23e8e097d383758d128a2d70816660779353a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= Date: Wed, 30 Sep 2015 16:12:33 +0300 Subject: [PATCH] Correct hook examples in docs. --- doc/en/writing_plugins.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/en/writing_plugins.rst b/doc/en/writing_plugins.rst index 1e9807cf5..865b079be 100644 --- a/doc/en/writing_plugins.rst +++ b/doc/en/writing_plugins.rst @@ -332,17 +332,17 @@ after others, i.e. the position in the ``N``-sized list of functions: .. code-block:: python # Plugin 1 - @pytest.hookimpl_spec(tryfirst=True) + @pytest.mark.tryfirst def pytest_collection_modifyitems(items): # will execute as early as possible # Plugin 2 - @pytest.hookimpl_spec(trylast=True) + @pytest.mark.trylast def pytest_collection_modifyitems(items): # will execute as late as possible # Plugin 3 - @pytest.hookimpl_spec(hookwrapper=True) + @pytest.hookimpl(hookwrapper=True) def pytest_collection_modifyitems(items): # will execute even before the tryfirst one above! outcome = yield