diff --git a/justfile b/justfile index 6b54cb2..58f25cf 100644 --- a/justfile +++ b/justfile @@ -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: diff --git a/pyproject.toml b/pyproject.toml index fde6187..3971eb9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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] diff --git a/conftest.py b/testing/conftest.py similarity index 100% rename from conftest.py rename to testing/conftest.py diff --git a/tests.py b/testing/tests.py similarity index 99% rename from tests.py rename to testing/tests.py index 55b40b8..0620a27 100644 --- a/tests.py +++ b/testing/tests.py @@ -31,7 +31,6 @@ empty_teilchen_data = { "number": 1, } - def TC(**kwargs) -> TeilchenCreate | None: """TC = TeilchenCreate