[TIP] Coverage.py 5.0 beta 1
Ned Batchelder
ned at nedbatchelder.com
Tue Nov 12 07:29:05 PST 2019
I just released coverage.py 5.0 beta 1. It has some big changes since
4.5.x, so I need people to try it and tell me if it’s ready. Please
install coverage.py 5.0 beta 1
<https://pypi.org/project/coverage/5.0b1/> and try it in your environment.
I especially want to hear from you if you tried the earlier alphas of
5.0. There have been some changes in the SQLite database that were
needed to make measurement efficient enough for large test suites, but
that hinder ad-hoc querying.
If you haven’t taken a look at coverage.py 5.0 yet, the big change is
the addition of “contexts.” These can record not just that a line was
executed, but something about why it was executed. Any number of
contexts can be recorded for a line. They could be different operating
systems, or versions of Python, or the name of the test that was
running. I think it could enable some really interesting tooling.
If you are interested in recording test names as contexts, the
pytest-cov <https://pypi.org/project/pytest-cov/> pytest plugin now has
a “--cov-context” option to do just that.
Contexts increase the data requirements, so data storage is now a SQLite
file rather than a JSON file. The summary of what’s new in 5.0 is here:
Major changes in 5.0
<https://coverage.readthedocs.io/en/latest/whatsnew5x.html>.
Please try this. Soon 5.0 will be done, and people will begin installing
it unknowingly. I would really like to minimize the turmoil when that
happens.
Thanks,
--Ned.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20191112/2892498c/attachment.htm>
More information about the testing-in-python
mailing list