parent
141c5e5a89
commit
0a7b8722e5
1
AUTHORS
1
AUTHORS
|
@ -187,6 +187,7 @@ Katarzyna Jachim
|
||||||
Katarzyna Król
|
Katarzyna Król
|
||||||
Katerina Koukiou
|
Katerina Koukiou
|
||||||
Keri Volans
|
Keri Volans
|
||||||
|
Kevin C
|
||||||
Kevin Cox
|
Kevin Cox
|
||||||
Kevin J. Foley
|
Kevin J. Foley
|
||||||
Kian Eliasi
|
Kian Eliasi
|
||||||
|
|
|
@ -158,18 +158,20 @@ it in your setuptools-invocation:
|
||||||
# sample ./setup.py file
|
# sample ./setup.py file
|
||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
|
|
||||||
|
|
||||||
|
name_of_plugin = "myproject" # register plugin with this name
|
||||||
setup(
|
setup(
|
||||||
name="myproject",
|
name="myproject",
|
||||||
packages=["myproject"],
|
packages=["myproject"],
|
||||||
# the following makes a plugin available to pytest
|
# the following makes a plugin available to pytest
|
||||||
entry_points={"pytest11": ["name_of_plugin = myproject.pluginmodule"]},
|
entry_points={"pytest11": [f"{name_of_plugin} = myproject.pluginmodule"]},
|
||||||
# custom PyPI classifier for pytest plugins
|
# custom PyPI classifier for pytest plugins
|
||||||
classifiers=["Framework :: Pytest"],
|
classifiers=["Framework :: Pytest"],
|
||||||
)
|
)
|
||||||
|
|
||||||
If a package is installed this way, ``pytest`` will load
|
If a package is installed this way, ``pytest`` will load
|
||||||
``myproject.pluginmodule`` as a plugin which can define
|
``myproject.pluginmodule`` as a plugin which can define
|
||||||
:ref:`hooks <hook-reference>`.
|
:ref:`hooks <hook-reference>`. Confirm registration with ``pytest --trace-config``
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue