[Test Improver] test: add unit tests for uninstall engine helpers#1059
Closed
danielmeppiel wants to merge 1 commit intomainfrom
Closed
[Test Improver] test: add unit tests for uninstall engine helpers#1059danielmeppiel wants to merge 1 commit intomainfrom
danielmeppiel wants to merge 1 commit intomainfrom
Conversation
Add 21 tests covering four untested helpers in src/apm_cli/commands/uninstall/engine.py: - _build_children_index: parent/child traversal logic - _parse_dependency_entry: string, dict, passthrough, and error cases - _validate_uninstall_packages: match/no-match/invalid-format paths - _remove_packages_from_disk: disk removal and missing-path behaviour All 21 tests pass. Pre-existing failures (test_audit_report.py syntax error, test_deps_update_command.py Group.cli) are unrelated. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This was referenced May 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 Test Improver — automated AI assistant
Goal
src/apm_cli/commands/uninstall/engine.pyhad no dedicated unit tests. This PR adds 21 tests for four focused helper functions that implement the core uninstall logic.What is tested
_build_children_index_parse_dependency_entry_validate_uninstall_packages_remove_packages_from_diskCoverage impact
(Pre-existing failures in
test_audit_report.pyandtest_deps_update_command.pyare unrelated and unchanged.)How to test
uv run pytest tests/unit/commands/test_uninstall_engine.py -v # 21 passedTest status
All 21 new tests pass. Full suite:
6708 passed + 21 new = 6729 passed.