pytest: add custom marker in pyproject.toml instead of conftest.py
This commit is contained in:
parent
22fc814327
commit
14e5c6b68c
2 changed files with 8 additions and 12 deletions
|
|
@ -68,7 +68,14 @@ source_dirs = ["src/"]
|
|||
|
||||
# custom marks are created in conftest.py
|
||||
[tool.pytest]
|
||||
python_files = ["*_test.py", "test_*.py", "tests.py"]
|
||||
markers = ["final"]
|
||||
python_files = ["test_*.py", "tests.py"]
|
||||
required_plugins = [
|
||||
"pytest-asyncio",
|
||||
"pytest-cov",
|
||||
"pytest-randomly",
|
||||
"pytest-textual-snapshot",
|
||||
]
|
||||
strict_config = true
|
||||
strict_markers = true
|
||||
strict_parametrization_ids = false
|
||||
|
|
|
|||
|
|
@ -1,11 +0,0 @@
|
|||
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")
|
||||
Loading…
Add table
Add a link
Reference in a new issue