Skip to content

Commit

Permalink
test: update pytest runner to also output coverage report #1714
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
yesudeep committed Feb 3, 2025
1 parent d4e9a8a commit cece360
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
8 changes: 4 additions & 4 deletions py/bin/run_tests
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ set -euo pipefail

TOP_DIR=$(git rev-parse --show-toplevel)
PYTHON_VERSIONS=(
"3.12"
"3.13"
"3.12"
"3.13"
)

for VERSION in "${PYTHON_VERSIONS[@]}"; do
echo "Running tests with Python ${VERSION}..."
uv run --python "python${VERSION}" --directory "${TOP_DIR}/py" pytest .
echo "Running tests with Python ${VERSION}..."
uv run --python "python${VERSION}" --directory "${TOP_DIR}/py" pytest .
done
3 changes: 3 additions & 0 deletions py/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ python_files = [
]
testpaths = ["packages", "plugins", "samples"]

[tool.pytest.ini_options]
addopts = "--cov --cov-fail-under=70"

# uv based package management.
[tool.uv]
default-groups = ["dev", "lint"]
Expand Down

0 comments on commit cece360

Please sign in to comment.