tests: create custom mark for test functions

This commit is contained in:
bronsen 2026-02-20 21:23:48 +01:00
parent 3a4137e706
commit 736fd02b50
2 changed files with 12 additions and 0 deletions

11
conftest.py Normal file
View file

@ -0,0 +1,11 @@
from pytest import Config
def pytest_configure(config: Config):
"""
Registers a new mark 'final' that can be applied to tests.
I did not want to add these in pyproject.toml.
"""
config.addinivalue_line("markers", "final: the final test")

View file

@ -64,6 +64,7 @@ omit = ["tests.py"]
source_dirs = ["src/"] source_dirs = ["src/"]
[tool.pytest] [tool.pytest]
# custom marks are created in conftest.py
asyncio_mode = "auto" asyncio_mode = "auto"
[tool.ruff] [tool.ruff]