Correct hook examples in docs.

This commit is contained in:
Ionel Cristian Mărieș 2015-09-30 16:12:33 +03:00
parent dc9ad12182
commit f4f23e8e09
1 changed files with 3 additions and 3 deletions

View File

@ -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