Add conditional coverage exceptions #2640
Labels
enhancement
New features, or improvements to existing features.
good first issue
Is this your first time contributing? This could be a good place to start!
What is the problem or limitation you are having?
If you run the full test suite across all Python versions and platforms, you get 100% coverage.
However, if you run the tests on a single platform and Python version, there are coverage gaps.
Describe the solution you'd like
It should be possible to run coverage on a single Python version and platform, and get a coverage report that reflects all reachable code, rather than all possible code.
Briefcase has conditional coverage that does this; we should port this configuration to Toga.
Describe alternatives you've considered
Live with the status quo. It's not the end of the world; but it would be nice to know that coverage gaps are expected with a clean coverage report.
Additional context
src/core/toga/platform.py
already contains a workaroud for this - both branches of a try/except are marked no-cover. Ideally, this would be a conditional coverage, rather than unconditional on both branches.The text was updated successfully, but these errors were encountered: