Merge pull request #1095 from ionelmc/fix-hook-docs

Correct hook examples in docs.
This commit is contained in:
Bruno Oliveira 2015-09-30 11:28:43 -03:00
commit 639ae0cfe0
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.hookimpl(tryfirst=True)
def pytest_collection_modifyitems(items):
# will execute as early as possible
# Plugin 2
@pytest.hookimpl_spec(trylast=True)
@pytest.hookimpl(trylast=True)
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