Skip to content

Commit 06b1b69

Browse files
committed
Merge pull request pytest-dev#963 from nicoddemus/cookiecutter-docs
Mention cookie-cutter in the docs and fix broken links to <extplugin>
2 parents 333cb27 + d988d20 commit 06b1b69

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

doc/en/writing_plugins.rst

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ reporting by calling `well specified hooks`_ of the following plugins:
1616

1717
* :ref:`builtin plugins`: loaded from pytest's internal ``_pytest`` directory.
1818

19-
* :ref:`external plugins <extplugin>`: modules discovered through
19+
* :ref:`external plugins <plugins_index>`: modules discovered through
2020
`setuptools entry points`_
2121

2222
* `conftest.py plugins`_: modules auto-discovered in test directories
@@ -100,8 +100,8 @@ Here is how you might run it::
100100
conftest.py file.
101101

102102

103-
Writing a plugin by looking at examples
104-
---------------------------------------
103+
Writing your own plugin
104+
-----------------------
105105

106106
.. _`setuptools`: http://pypi.python.org/pypi/setuptools
107107

@@ -110,12 +110,22 @@ you can copy from:
110110

111111
* a custom collection example plugin: :ref:`yaml plugin`
112112
* around 20 doc:`builtin plugins` which provide pytest's own functionality
113-
* many :doc:`external plugins` providing additional features
113+
* many :ref:`external plugins <plugins_index>` providing additional features
114114

115115
All of these plugins implement the documented `well specified hooks`_
116116
to extend and add functionality.
117117

118-
You can also :ref:`contribute your plugin to pytest-dev<submitplugin>`
118+
.. note::
119+
Make sure to check out the excellent
120+
`cookiecutter-pytest-plugin <https://github.com/pytest-dev/cookiecutter-pytest-plugin>`_
121+
project, which is a `cookiecutter template <https://github.com/audreyr/cookiecutter>`_
122+
for authoring plugins.
123+
124+
The template provides an excellent starting point with a working plugin,
125+
tests running with tox, comprehensive README and
126+
entry-pointy already pre-configured.
127+
128+
Also consider :ref:`contributing your plugin to pytest-dev<submitplugin>`
119129
once it has some happy users other than yourself.
120130

121131

@@ -244,7 +254,7 @@ Let's look at a possible implementation:
244254
.. code-block:: python
245255
246256
def pytest_collection_modifyitems(config, items):
247-
# called after collectin is completed
257+
# called after collection is completed
248258
# you can modify the ``items`` list
249259
250260
Here, ``pytest`` will pass in ``config`` (the pytest config object)

0 commit comments

Comments
 (0)