From 736fd02b50cb1ced9a9d50e095aaa73003e1adbe Mon Sep 17 00:00:00 2001 From: bronsen Date: Fri, 20 Feb 2026 21:23:48 +0100 Subject: [PATCH] tests: create custom mark for test functions --- conftest.py | 11 +++++++++++ pyproject.toml | 1 + 2 files changed, 12 insertions(+) create mode 100644 conftest.py diff --git a/conftest.py b/conftest.py new file mode 100644 index 0000000..88fe65b --- /dev/null +++ b/conftest.py @@ -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") diff --git a/pyproject.toml b/pyproject.toml index d4c43ed..c0b2f35 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -64,6 +64,7 @@ omit = ["tests.py"] source_dirs = ["src/"] [tool.pytest] +# custom marks are created in conftest.py asyncio_mode = "auto" [tool.ruff]