Skip to content

Commit a64298f

Browse files
JarnoRFBnicoddemus
andauthored
Document registering markers in pyproject.toml (#7622)
Co-authored-by: Bruno Oliveira <[email protected]>
1 parent 44cd8a3 commit a64298f

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

doc/en/mark.rst

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,17 @@ You can register custom marks in your ``pytest.ini`` file like this:
4343
slow: marks tests as slow (deselect with '-m "not slow"')
4444
serial
4545
46-
Note that everything after the ``:`` is an optional description.
46+
or in your ``pyproject.toml`` file like this:
47+
48+
.. code-block:: toml
49+
50+
[tool.pytest.ini_options]
51+
markers = [
52+
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
53+
"serial",
54+
]
55+
56+
Note that everything past the ``:`` after the mark name is an optional description.
4757

4858
Alternatively, you can register new markers programmatically in a
4959
:ref:`pytest_configure <initialization-hooks>` hook:

0 commit comments

Comments
 (0)