Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add conditional coverage exceptions #2640

Closed
freakboy3742 opened this issue Jun 11, 2024 · 0 comments · Fixed by #2642
Closed

Add conditional coverage exceptions #2640

freakboy3742 opened this issue Jun 11, 2024 · 0 comments · Fixed by #2642
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!

Comments

@freakboy3742
Copy link
Member

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.

@freakboy3742 freakboy3742 added 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! labels Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant