Document registering markers in pyproject.toml (#7622)

Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
This commit is contained in:
Rüdiger Busche 2020-08-05 17:03:27 +02:00 committed by GitHub
parent 44cd8a3a86
commit a64298ff5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 1 deletions

View File

@ -43,7 +43,17 @@ You can register custom marks in your ``pytest.ini`` file like this:
slow: marks tests as slow (deselect with '-m "not slow"')
serial
Note that everything after the ``:`` is an optional description.
or in your ``pyproject.toml`` file like this:
.. code-block:: toml
[tool.pytest.ini_options]
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"serial",
]
Note that everything past the ``:`` after the mark name is an optional description.
Alternatively, you can register new markers programmatically in a
:ref:`pytest_configure <initialization-hooks>` hook: