Skip to content

Commit 598c15c

Browse files
committed
test: update pytest runner to also output coverage report and set min threshold #1714
ISSUE: #1714 CHANGELOG: - [ ] Update the `pyproject.toml` configuration for pytest-cov to: - [ ] Accept no lower than 70% as coverage threshold. - [ ] Run tests with coverage reports generated in the console.
1 parent d4e9a8a commit 598c15c

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

py/bin/run_tests

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ set -euo pipefail
66

77
TOP_DIR=$(git rev-parse --show-toplevel)
88
PYTHON_VERSIONS=(
9-
"3.12"
10-
"3.13"
9+
"3.12"
10+
"3.13"
1111
)
1212

1313
for VERSION in "${PYTHON_VERSIONS[@]}"; do
14-
echo "Running tests with Python ${VERSION}..."
15-
uv run --python "python${VERSION}" --directory "${TOP_DIR}/py" pytest .
14+
echo "Running tests with Python ${VERSION}..."
15+
uv run --python "python${VERSION}" --directory "${TOP_DIR}/py" pytest .
1616
done

py/pyproject.toml

+6
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@ python_files = [
4646
]
4747
testpaths = ["packages", "plugins", "samples"]
4848

49+
[tool.pytest.ini_options]
50+
addopts = "--cov"
51+
52+
[tool.coverage.report]
53+
fail_under = 70
54+
4955
# uv based package management.
5056
[tool.uv]
5157
default-groups = ["dev", "lint"]

0 commit comments

Comments
 (0)