Skip to content

Conversation

danielhollas
Copy link
Collaborator

@danielhollas danielhollas commented Oct 6, 2025

In general, collecting code coverage (pytest --cov) makes the test suite run quite a bit slower.
However, the new version of coveragepy allows to use a different approach based on the new sys.monitoring interface (3.12+) which is much faster (almost free), see https://nedbatchelder.com/blog/202312/coveragepy_with_sysmonitoring.html

https://coverage.readthedocs.io/en/7.10.7/config.html#run-core

Besides that, if TYPE_CHECKING: blocks are now automatically ignored, resulting in a "increase" of overall coverage (less uncovered lines of code).

This PR drops the runtime of the Py3.9(psql) job from 26 to 20 minutes! 🎉

Copy link

codecov bot commented Oct 6, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.56%. Comparing base (cf690e4) to head (16d40d3).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #7042       +/-   ##
===========================================
+ Coverage   27.16%   79.56%   +52.40%     
===========================================
  Files         566      566               
  Lines       43807    43438      -369     
===========================================
+ Hits        11896    34556    +22660     
+ Misses      31911     8882    -23029     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@danielhollas danielhollas marked this pull request as ready for review October 6, 2025 03:45
@danielhollas danielhollas requested a review from GeigerJ2 October 7, 2025 14:27
@danielhollas danielhollas requested a review from mbercx October 7, 2025 14:34
In general, collecting code coverage with `pytest --cov`
makes the test suite run quite a bit slower.
However, the new version of coveragepy allows to use a different
approach based on the new sys.monitoring interface (3.12+)
which is much faster (almost free), see:

https://nedbatchelder.com/blog/202312/coveragepy_with_sysmonitoring.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants