perf(test): use Python’s system monitoring facilities to improve performance of test runs by jenstroeger · Pull Request #933 · jenstroeger/python-package-template

@jenstroeger

jenstroeger

behnazh

- id: pytest
name: Run unit tests
entry: pytest -c pyproject.toml --cov-config pyproject.toml src/package/ tests/ docs/
entry: env COVERAGE_CORE=sysmon pytest -c pyproject.toml --cov-config pyproject.toml src/package/ tests/ docs/

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a comment based on the PR description to explain why COVERAGE_CORE=sysmon is necessary here, and also mention that this option is only recommended for Python version > 3.12.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

behnazh

behnazh previously approved these changes Sep 10, 2025

@jenstroeger

@jenstroeger

@jenstroeger

@jenstroeger

…else switch to the slow monitoring core for branch coverage

@jenstroeger

@jenstroeger

@jenstroeger