test: add pet-homebrew locator coverage#394
Conversation
Test Coverage Report (Linux)
Coverage increased! Great work! |
Performance Report (Linux) ➖
Legend
|
Performance Report (macOS)
Legend
|
Performance Report (Windows) ➖
Legend
|
Test Coverage Report (Windows)
Coverage increased! Great work! |
There was a problem hiding this comment.
Pull request overview
Adds focused unit tests to the pet-homebrew locator crate to improve branch coverage for Homebrew/Linuxbrew identification and helper logic, aligning with the broader workspace coverage plan.
Changes:
- Add unit tests for Homebrew path recognition and symlink template behavior in
sym_links. - Add locator-level tests for Homebrew kind/category metadata, Linuxbrew identification, and rejection of non-Homebrew/virtualenv/Conda inputs.
- Add tests for
HOMEBREW_PREFIX-driven prefix bin discovery behavior.
Show a summary per file
| File | Description |
|---|---|
| crates/pet-homebrew/src/sym_links.rs | Adds tests for Homebrew/Linuxbrew path classification and symlink helper branches. |
| crates/pet-homebrew/src/lib.rs | Adds locator-focused tests for identification and rejection paths (non-homebrew, venv, conda). |
| crates/pet-homebrew/src/environment_locations.rs | Adds tests for HOMEBREW_PREFIX bin discovery logic. |
Copilot's findings
- Files reviewed: 3/3 changed files
- Comments generated: 2
There was a problem hiding this comment.
Pull request overview
This PR adds targeted unit tests to the pet-homebrew crate to improve branch coverage for Homebrew/Linuxbrew environment identification and related helper functions, aligning with the broader coverage plan while staying crate-scoped.
Changes:
- Add unit tests for Homebrew path recognition and known-symlink helper behavior.
- Add unit tests for the Homebrew
Locatormetadata andtry_fromrejection/acceptance paths (including Linuxbrew identification). - Add unit tests for
HOMEBREW_PREFIXbin discovery logic, plustempfileas a dev-dependency.
Show a summary per file
| File | Description |
|---|---|
| crates/pet-homebrew/src/sym_links.rs | Adds unit tests for Homebrew path classification and symlink template helper behavior. |
| crates/pet-homebrew/src/lib.rs | Adds unit tests for Homebrew locator kind/category and try_from accept/reject paths. |
| crates/pet-homebrew/src/environment_locations.rs | Adds unit tests for HOMEBREW_PREFIX-driven bin discovery behavior. |
| crates/pet-homebrew/Cargo.toml | Adds tempfile dev-dependency to support filesystem-backed tests. |
Copilot's findings
- Files reviewed: 4/4 changed files
- Comments generated: 1
Adds focused
pet-homebrewunit tests as a small follow-up slice from the broader coverage plan.HOMEBREW_PREFIXbin discoverypet-homebrewonlyFixes #393
Part of #389