Skip to content

test(r): increase R test coverage#155

Merged
Neclow merged 2 commits intosbhattlab:mainfrom
Neclow:more_tests_r
Oct 21, 2025
Merged

test(r): increase R test coverage#155
Neclow merged 2 commits intosbhattlab:mainfrom
Neclow:more_tests_r

Conversation

@Neclow
Copy link
Collaborator

@Neclow Neclow commented Oct 21, 2025

This PR introduces several improvements and refactorings to increase coverage in R, as well as minor side effects.

Test coverage

  • Refactor and expand test coverage in test_base.R, test_io.R, and test_stats.R, including new tests for edge cases (e.g., empty vectors/matrices, unsupported dimensions, and error conditions), and reorganize test helpers for better reuse and clarity.
  • Ensure same test config constants in R and Python

Side effects

  • Enforce stricter type checking in functions such as to_newick, cophenetic_distances, vcovp, and precision, requiring integer vectors instead of generic vectors, and update error messages accordingly.
  • Use fully qualified names for functions from the tools, Matrix, and ape packages to avoid ambiguity and unnecessary imports (to make covr work)
  • Fix a few comments here and there
  • Add documentation about code coverage in the docs

@Neclow Neclow merged commit 15e8b28 into sbhattlab:main Oct 21, 2025
7 of 8 checks passed
Neclow added a commit that referenced this pull request Oct 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant