tests: move testing stuff into its own directory

This commit is contained in:
bronsen 2026-05-14 00:57:28 +02:00
parent 6029184f22
commit 9098ed05f1
4 changed files with 12 additions and 6 deletions

View file

@ -44,14 +44,14 @@ exports-deps:
# Run tests, ARGS are passed-through to pytest
test *ARGS:
{{ uv }} run pytest tests.py -m "not final" {{ ARGS }}
{{ uv }} run pytest -m "not final" {{ ARGS }}
alltests *ARGS:
{{ uv }} run pytest tests.py {{ ARGS }}
{{ uv }} run pytest {{ ARGS }}
# run tests and create coverage reports
coverage:
{{ uv }} run pytest tests.py -m "not final" --cov=src/ --cov-report term --cov-report xml --cov-report html --cov-config {{ pyproject }}
{{ uv }} run pytest -m "not final" --cov=src/ --cov-report term --cov-report xml --cov-report html --cov-config {{ pyproject }}
# lint python, markdown, wheel file names, prek config
lint:

View file

@ -48,6 +48,7 @@ dev = [
"pytest>=9.0.1",
"pytest-asyncio>=1.3.0",
"pytest-cov>=7.0.0",
"pytest-sugar>=1.1.1",
"pytest-textual-snapshot>=1.0.0",
"textual-dev>=1.8.0",
"twine>=6.2.0",
@ -59,11 +60,17 @@ build-backend = "uv_build"
[tool.coverage.run]
branch = true
omit = ["tests.py"]
omit = ["tests/"]
source_dirs = ["src/"]
[tool.pytest]
# custom marks are created in conftest.py
[tool.pytest]
python_files = ["*_test.py", "test_*.py", "tests.py"]
strict_config = true
strict_markers = true
strict_parametrization_ids = false
strict_xfail = true
testpaths = ["testing/"]
asyncio_mode = "auto"
[tool.ruff]

View file

@ -31,7 +31,6 @@ empty_teilchen_data = {
"number": 1,
}
def TC(**kwargs) -> TeilchenCreate | None:
"""TC = TeilchenCreate