Skip to content

Commit cece360

Browse files
committed
test: update pytest runner to also output coverage report #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 cece360

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

py/bin/run_tests

Lines changed: 4 additions & 4 deletions
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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ python_files = [
4646
]
4747
testpaths = ["packages", "plugins", "samples"]
4848

49+
[tool.pytest.ini_options]
50+
addopts = "--cov --cov-fail-under=70"
51+
4952
# uv based package management.
5053
[tool.uv]
5154
default-groups = ["dev", "lint"]

0 commit comments

Comments
 (0)