From e13ffa2a21c710da0d43534c3c6630eb4c97a3a8 Mon Sep 17 00:00:00 2001 From: Yurii Motov Date: Tue, 24 Feb 2026 18:09:13 +0100 Subject: [PATCH] Update `test.sh` and `test-cov-html.sh` to run tests with `pytest --cov` --- pyproject.toml | 1 - scripts/test-cov-html.sh | 3 +-- scripts/test.sh | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index c36558589b..07faa8543e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -243,7 +243,6 @@ source = [ ] relative_files = true context = '${CONTEXT}' -dynamic_context = "test_function" omit = [ "tests/benchmarks/*", "docs_src/response_model/tutorial003_04_py39.py", diff --git a/scripts/test-cov-html.sh b/scripts/test-cov-html.sh index f87f906dc2..c66beb8a2f 100755 --- a/scripts/test-cov-html.sh +++ b/scripts/test-cov-html.sh @@ -3,5 +3,4 @@ set -e set -x -bash scripts/test.sh ${@} -bash scripts/coverage.sh +bash scripts/test.sh --cov --cov-context=test --cov-report=term-missing --cov-report=html ${@} diff --git a/scripts/test.sh b/scripts/test.sh index 0bffcd1cdd..f7ec7e0a67 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -4,4 +4,4 @@ set -e set -x export PYTHONPATH=./docs_src -coverage run -m pytest tests scripts/tests/ ${@} +pytest -n auto --dist loadgroup tests scripts/tests/ ${@}