@coveragepy@hachyderm.io
@coveragepy@hachyderm.io avatar

coveragepy

@coveragepy@hachyderm.io

The coverage measurement tool for Python. Maintained by https://hachyderm.io/@nedbat.

Artwork by https://artofbatch.com

(An approved account, agreeing to the Specialized Account Expectations: https://community.hachyderm.io/docs/account-types/covenant)

This profile is from a federated server and may be incomplete. Browse more on the original instance.

coveragepy, to random
@coveragepy@hachyderm.io avatar

Coverage․py 7.5.3: performance improvements, including a sometimes drastic speed-up for combining data files.

https://coverage.readthedocs.io/en/7.5.3/changes.html#changes-7-5-3

coveragepy, to random
@coveragepy@hachyderm.io avatar

Anyone familiar with the oss-fuzz workflow, or wants to learn about it? I don't understand this bug report or how to see it actually affect coverage․py: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=69058

coveragepy, to random
@coveragepy@hachyderm.io avatar

Looking forward to Juan's #PyConUS talk on near-zero overhead coverage measurement: https://us.pycon.org/2024/schedule/presentation/110/

Juan and @nedbat will be grabbing dinner Friday. Other coverage-minded peeps are welcome to join.

coveragepy, to random
@coveragepy@hachyderm.io avatar

Coverage.py 7.5.0 just dropped, with reporting per-function and per-class!

https://pypi.org/project/coverage/

coveragepy, to random
@coveragepy@hachyderm.io avatar
coveragepy,
@coveragepy@hachyderm.io avatar

@isagalaev Where else would you like to see it?

coveragepy,
@coveragepy@hachyderm.io avatar

@isagalaev it's a lot to jam into terminal output

coveragepy, to python
@coveragepy@hachyderm.io avatar

People ask for function coverage measurement for #Python. It's not a polished feature yet, but here is a temporary way to get some data:
https://github.com/nedbat/coveragepy/issues/780#issuecomment-1991355805

Comment there if you have reactions.

hugovk, to python
@hugovk@mastodon.social avatar

@coveragepy can now use Python 3.12's new sys.monitoring module with much lower overhead.

On 3.12, it's about the same as if you were running tests without coverage enabled!

https://nedbatchelder.com/blog/202312/coveragepy_with_sysmonitoring.html

With 7.4.2, you can set COVERAGE_CORE=sysmon globally on your CI, and it'll only use it where available (Python 3.12 and 3.13 alpha), and use the default for 3.11 and older.

For example, @pillow is 9% - 27% faster!

https://github.com/python-pillow/Pillow/pull/7820

coveragepy,
@coveragepy@hachyderm.io avatar

@hugovk Note it's slower if you are using branch=True!

coveragepy, to random
@coveragepy@hachyderm.io avatar

(repeating) New page in the coverage․py docs: Other Resources. What else should be here? Send suggestions.

https://coverage.readthedocs.io/en/latest/other.html

coveragepy, to random
@coveragepy@hachyderm.io avatar

New page in the coverage․py docs: Other Resources. What else should be here? Send suggestions.

https://coverage.readthedocs.io/en/master/other.html

coveragepy, to random
@coveragepy@hachyderm.io avatar

Coverage․py 7.4.1, now with Python 3.13.0a3 support!

https://pypi.org/project/coverage/7.4.1

coveragepy, to random
@coveragepy@hachyderm.io avatar

Coverage․py 7.3.4: multi-line function signatures now properly exclude the function when one of the lines matches an exclusion.
(This was in 7.3.3, but broke other things, 7.3.4 fixes it).
Also, coverage annotate is no longer deprecated, thanks for all the emails!

https://coverage.readthedocs.io/en/7.3.4/changes.html#changes-7-3-4

coveragepy, to random
@coveragepy@hachyderm.io avatar

I discovered today that Cal Poly is using coverage.py's source as an assignment for reading, understanding, and critiquing code. Very cool!

https://brinckerhoff.org/clements/2238-csc202/Assignments/ass4.html

coveragepy, to python
@coveragepy@hachyderm.io avatar

I'm still looking for #Python test suites that run on 3.12, take 1-5 minutes, and are not too complicated to run reliably. Send me instructions!

coveragepy,
@coveragepy@hachyderm.io avatar

@paulox I've tried a few times. I'm getting random errors that are discouraging.

coveragepy, to python
@coveragepy@hachyderm.io avatar

I'd like to do more measurements of real-world test suite running times.

Do you have a project with an easily runnable test suite that takes between 1 and 10 minutes to run and uses coverage? Ideally it could also be run without coverage measurement, and can run under Python 3.12.

TIA!

coveragepy,
@coveragepy@hachyderm.io avatar

@paulox Thanks, good idea! But when I follow the directions:

clone django; cd django

$ brew install libmemcached
$ pip install -e .
$ coverage run tests/runtests.py --settings=test_sqlite
$coverage report --format=total --precision=6

I get a total of 32.848540 which seems way too low. How do you run it, and what total do you get? Maybe I'm missing a step?

coveragepy,
@coveragepy@hachyderm.io avatar

@paulox Thanks, but I must be missing something else. Before coverage combine I have only one .coverage* file. Running coverage combine says "No data to combine." I think I missed an earlier step.

coveragepy,
@coveragepy@hachyderm.io avatar

@paulox Ah, I needed to be in the tests directory...

coveragepy, to random
@coveragepy@hachyderm.io avatar

I know I've seen examples of .coveragerc files that define pragmas based on the operating system, but I can't find one now.

Anyone have an example to add to this issue?
https://github.com/nedbat/coveragepy/issues/1699

coveragepy, to random
@coveragepy@hachyderm.io avatar

Anyone want more themes for the coverage․py HTML reports? We need help adding them in a sustainable way:
https://github.com/nedbat/coveragepy/pull/1416

coveragepy, to random
@coveragepy@hachyderm.io avatar

Coverage․py 7.3.2

A few fixes. No longer will combining data files get tangled up in journal files. Python 3.12's type soft keyword is bolded! 😀

coveragepy, to django
@coveragepy@hachyderm.io avatar

Anyone have experience adapting #Django's LiveServerTestCase to run under coverage.py?
https://github.com/nedbat/coveragepy/issues/1680

coveragepy, to random
@coveragepy@hachyderm.io avatar

Coverage․py 7.3.0 and 7.3.1
Only small changes: Dropped 3.7 support, fancy tabbed boxes in the docs, clarification of wildcard file syntax.

https://coverage.readthedocs.io/en/7.3.1/changes.html#version-7-3-1-2023-09-06

  • All
  • Subscribed
  • Moderated
  • Favorites
  • megavids
  • thenastyranch
  • rosin
  • GTA5RPClips
  • osvaldo12
  • love
  • Youngstown
  • slotface
  • khanakhh
  • everett
  • kavyap
  • mdbf
  • DreamBathrooms
  • ngwrru68w68
  • provamag3
  • magazineikmin
  • InstantRegret
  • normalnudes
  • tacticalgear
  • cubers
  • ethstaker
  • modclub
  • cisconetworking
  • Durango
  • anitta
  • Leos
  • tester
  • JUstTest
  • All magazines