Skip to content

test(py): add more util tests + cover more edge cases#149

Merged
Neclow merged 2 commits intosbhattlab:mainfrom
Neclow:more_tests_py
Oct 20, 2025
Merged

test(py): add more util tests + cover more edge cases#149
Neclow merged 2 commits intosbhattlab:mainfrom
Neclow:more_tests_py

Conversation

@Neclow
Copy link
Collaborator

@Neclow Neclow commented Oct 20, 2025

This PR introduces increased test coverage on the Python side, with a few enhancements.

Tests

  • Cover edge cases for to_newick, save, and get_common_ancestor
  • Add tests for reroot, remove_branch_lengths
  • Re-factor CLI tests (move help tests to each sub-command)
  • Cleanup: Removed unnecessary pytest.main() calls from test files for cleaner test execution.

Side commits

CLI

The CLI now displays the help message and exits gracefully when no command is provided, and the main function has been simplified to rely on argument parsing for command validation.

Utils/vector.py

  • The get_common_ancestor function includes stricter input validation
  • The reroot function now supports both vector and matrix inputs, with parser selection based on input dimensionality.

@Neclow Neclow merged commit 4bfee31 into sbhattlab:main Oct 20, 2025
8 checks passed
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