Edit examples again to use hookimpl.
This commit is contained in:
parent
f4f23e8e09
commit
c8f5a40fd9
|
@ -332,12 +332,12 @@ after others, i.e. the position in the ``N``-sized list of functions:
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
# Plugin 1
|
# Plugin 1
|
||||||
@pytest.mark.tryfirst
|
@pytest.hookimpl(tryfirst=True)
|
||||||
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.mark.trylast
|
@pytest.hookimpl(trylast=True)
|
||||||
def pytest_collection_modifyitems(items):
|
def pytest_collection_modifyitems(items):
|
||||||
# will execute as late as possible
|
# will execute as late as possible
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue