Skip to content

Commit 639ae0c

Browse files
committed
Merge pull request #1095 from ionelmc/fix-hook-docs
Correct hook examples in docs.
2 parents dc9ad12 + c8f5a40 commit 639ae0c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

doc/en/writing_plugins.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -332,17 +332,17 @@ after others, i.e. the position in the ``N``-sized list of functions:
332332
.. code-block:: python
333333
334334
# Plugin 1
335-
@pytest.hookimpl_spec(tryfirst=True)
335+
@pytest.hookimpl(tryfirst=True)
336336
def pytest_collection_modifyitems(items):
337337
# will execute as early as possible
338338
339339
# Plugin 2
340-
@pytest.hookimpl_spec(trylast=True)
340+
@pytest.hookimpl(trylast=True)
341341
def pytest_collection_modifyitems(items):
342342
# will execute as late as possible
343343
344344
# Plugin 3
345-
@pytest.hookimpl_spec(hookwrapper=True)
345+
@pytest.hookimpl(hookwrapper=True)
346346
def pytest_collection_modifyitems(items):
347347
# will execute even before the tryfirst one above!
348348
outcome = yield

0 commit comments

Comments
 (0)