Skip to content

Improve test coverage #176

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

Open
wants to merge 23 commits into
base: main
Choose a base branch
from
Open

Improve test coverage #176

wants to merge 23 commits into from

Conversation

user27182
Copy link
Contributor

@user27182 user27182 commented Jun 24, 2025

Use --branch to report partial misses and add tests for branches without coverage.

@codecov-commenter
Copy link

codecov-commenter commented Jun 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.59%. Comparing base (dfec447) to head (844d009).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #176      +/-   ##
==========================================
- Coverage   95.27%   94.59%   -0.68%     
==========================================
  Files           2        2              
  Lines         148      148              
  Branches        0       23      +23     
==========================================
- Hits          141      140       -1     
+ Misses          7        5       -2     
- Partials        0        3       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@user27182 user27182 marked this pull request as ready for review June 24, 2025 20:04
@user27182
Copy link
Contributor Author

Coverage is reporting misses... Will need to investigate

Comment on lines 251 to 266
if self.failed_image_dir is not None and not Path(image_filename).is_file():
# Image comparison will fail, so save image before error
self._save_failed_test_images("error", plotter, image_name)
remove_plotter_close_callback()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This branch was identified as possibly redundant and unnecessary in #171 (comment), and #175 fixed the earlier logic such that, with branch coverage enabled by this PR, this branch has been identified as missing coverage and hence is not executed and is therefore not needed.

@user27182
Copy link
Contributor Author

Coverage report is working, and now only a single (partial) miss is reported. The missing branch is for the windows_skip_image_cache flag, which I was not able to add a patch test for under Linux due to a pathlib error trying to use WindowsPath under Linux

@user27182 user27182 requested a review from MatthewFlamm June 27, 2025 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants