Browse Source

Update `test.sh` and `test-cov-html.sh` to run tests with `pytest --cov`

pull/14992/head
Yurii Motov 5 months ago
parent
commit
e13ffa2a21
  1. 1
      pyproject.toml
  2. 3
      scripts/test-cov-html.sh
  3. 2
      scripts/test.sh

1
pyproject.toml

@ -243,7 +243,6 @@ source = [
] ]
relative_files = true relative_files = true
context = '${CONTEXT}' context = '${CONTEXT}'
dynamic_context = "test_function"
omit = [ omit = [
"tests/benchmarks/*", "tests/benchmarks/*",
"docs_src/response_model/tutorial003_04_py39.py", "docs_src/response_model/tutorial003_04_py39.py",

3
scripts/test-cov-html.sh

@ -3,5 +3,4 @@
set -e set -e
set -x set -x
bash scripts/test.sh ${@} bash scripts/test.sh --cov --cov-context=test --cov-report=term-missing --cov-report=html ${@}
bash scripts/coverage.sh

2
scripts/test.sh

@ -4,4 +4,4 @@ set -e
set -x set -x
export PYTHONPATH=./docs_src export PYTHONPATH=./docs_src
coverage run -m pytest tests scripts/tests/ ${@} pytest -n auto --dist loadgroup tests scripts/tests/ ${@}

Loading…
Cancel
Save