coveragepy
The code coverage tool for Python (by nedbat)
tomli
A lil' TOML parser (by hukkin)
coveragepy | tomli | |
---|---|---|
7 | 5 | |
2,838 | 439 | |
- | - | |
9.6 | 3.0 | |
about 3 hours ago | 5 days ago | |
Python | Python | |
Apache License 2.0 | MIT License |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
coveragepy
Posts with mentions or reviews of coveragepy.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2024-02-14.
-
An Introduction to Testing with Django for Python
Coverage.py is the go-to tool for measuring code coverage of Python programs. Once installed, you can use it with either unittest or pytest.
-
The Uncreative Software Engineer's Compendium to Testing
Code Coverage Analysis assess the code portions tested by the current test suites without altering the code.
-
Slipcover: Near Zero-Overhead Python Code Coverage
The PLASMA lab @ UMass Amherst (home of the Scalene profiler) has released a new version of Slipcover, a super fast code coverage tool for Python. It is by far the fastest code coverage tool: in our tests, its average slowdown is just 5% (compare to the widely used coverage.py, average slowdown 218%!). The latest release performs both line and branch coverage with virtually no overhead. Use it to dramatically speed up your tests and continuous integration!
-
Unit Tests - what’s the point?
Tests ensure the tested behavior is maintained. It's up to the developers to write tests with sufficient coverage. Determining which lines of code on your project are covered by tests is easily quantifiable using tooling. E.g. https://coverage.readthedocs.io/
-
How to make Django package smaller for Serverless deployment
Taking the idea further, if you build robust tests for your API, you could use a dynamic code analyzer like coverage or figleaf to identify and delete unused functions.
-
Comparison of Python TOML parser libraries
coverage
-
New Ways to Be Told That Your Python Code Is Bad
FWIW, ternary expressions aren't properly detected by coverage: https://github.com/nedbat/coveragepy/issues/509
tomli
Posts with mentions or reviews of tomli.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-09-13.
-
What Is Wrong with TOML?
But the whitespace handling involved is an extra complication, at least the provided example fails to be parsed by `tomli`, which is following the currently release TOML spec: https://github.com/hukkin/tomli/issues/199
-
ConfigParser potential inconsistencies
ini files aren't standardized, the syntax is really "whatever the parser implements". For new projects I recommend using toml instead. It's ini-like, but standardized. Python 3.11 even comes with a builtin parser tomllib (earlier python versions can use tomli, which is what tomllib is based on).
-
Python 3.11 will now have tomllib - Support for Parsing TOML in the Standard Library
tomllib is primary the library tomli: https://github.com/hukkin/tomli
-
Upcoming Python Features Brought to You by Python Enhancement Proposals
TOML as a format is by default used by many Python tools, including build tools. This creates a bootstrapping problem for them. Additionally, many popular tools such as flake8 don't include TOML support citing its lack of support in standard library. This PEP proposes to add TOML support to standard library based on tomli which is already used by packages such as pip or pytest.
-
Comparison of Python TOML parser libraries
tomli Relatively fast read-only parsing. Companion library tomli-w for writing.
What are some alternatives?
When comparing coveragepy and tomli you can also consider the following projects:
global-chem - A Knowledge Graph of Common Chemical Names to their Molecular Definition
toml - Tom's Obvious, Minimal Language
slipcover - Near Zero-Overhead Python Code Coverage
tomlkit - Style-preserving TOML library for Python
Zappa - Serverless Python
rtoml - A fast TOML library for python implemented in rust.
pytomlpp - A python wrapper for tomlplusplus
pytoml - A TOML-0.4.0 parser/writer for Python.
flit - Simplified packaging of Python modules
toml - Python lib for TOML
tomlplusplus - Header-only TOML config file parser and serializer for C++17.