Correct hook examples in docs.
This commit is contained in:
parent
dc9ad12182
commit
f4f23e8e09
|
@ -332,17 +332,17 @@ after others, i.e. the position in the ``N``-sized list of functions:
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
# Plugin 1
|
# Plugin 1
|
||||||
@pytest.hookimpl_spec(tryfirst=True)
|
@pytest.mark.tryfirst
|
||||||
def pytest_collection_modifyitems(items):
|
def pytest_collection_modifyitems(items):
|
||||||
# will execute as early as possible
|
# will execute as early as possible
|
||||||
|
|
||||||
# Plugin 2
|
# Plugin 2
|
||||||
@pytest.hookimpl_spec(trylast=True)
|
@pytest.mark.trylast
|
||||||
def pytest_collection_modifyitems(items):
|
def pytest_collection_modifyitems(items):
|
||||||
# will execute as late as possible
|
# will execute as late as possible
|
||||||
|
|
||||||
# Plugin 3
|
# Plugin 3
|
||||||
@pytest.hookimpl_spec(hookwrapper=True)
|
@pytest.hookimpl(hookwrapper=True)
|
||||||
def pytest_collection_modifyitems(items):
|
def pytest_collection_modifyitems(items):
|
||||||
# will execute even before the tryfirst one above!
|
# will execute even before the tryfirst one above!
|
||||||
outcome = yield
|
outcome = yield
|
||||||
|
|
Loading…
Reference in New Issue