Skip to content

Patch obvious missing tests - #291

Draft
RasmusSkytte wants to merge 21 commits into
mainfrom
test/improve-test-coverage
Draft

Patch obvious missing tests#291
RasmusSkytte wants to merge 21 commits into
mainfrom
test/improve-test-coverage

Conversation

@RasmusSkytte

@RasmusSkytte RasmusSkytte commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Intent

This PR adds simple tests for the parts of our code base that is not covered by tests.
This is not intended to imply that this code is well-tested, but it will introduce a minimum level of testing for this code

Approach

Tests added / modified:

  • DiseasyRegions$plot() is tested to not produce errors
  • DiseasyActivity$plot() is tested to not produce errors
  • DiseasyImmunity$describe() is tested to not produce errors
  • The test for hash_environment() wraps the error-inputs in lists to correctly mimic the how errors would be passed to the function. The current implementation of the tests was wrong and some code would not be reached in the tests.
  • Test with malformed input added for combineasy()
  • All providers of optimisers tested in DiseasyImmunity$approximate_compartmental()
  • All tests where the comments say we use exponential_waning now actually use exponential_waning.

In addition:

  • .covrignore added to not flag missing coverage in our linters (since these are only for developers)

Known issues

N/A

Checklist

  • The PR passes all local unit tests
  • I have documented any new features introduced
  • If the PR adds a new feature, please add an entry in NEWS.md
  • A reviewer is assigned to this PR

@RasmusSkytte RasmusSkytte added the tests Improvements or additions to the tests label Aug 27, 2026
@codecov

codecov Bot commented Aug 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.83%. Comparing base (6c1fcdd) to head (f1a411e).
⚠️ Report is 12 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #291       +/-   ##
===========================================
+ Coverage   64.17%   78.83%   +14.65%     
===========================================
  Files          28       27        -1     
  Lines        9597     4483     -5114     
===========================================
- Hits         6159     3534     -2625     
+ Misses       3438      949     -2489     

☔ View full report in Codecov by Harness.
📢 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.

@RasmusSkytte
RasmusSkytte force-pushed the test/improve-test-coverage branch from eb3e092 to 8498c25 Compare August 27, 2026 13:01
@RasmusSkytte RasmusSkytte self-assigned this Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests Improvements or additions to the tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant