-
Notifications
You must be signed in to change notification settings - Fork 185
[FEATURE] Extract skip_download logic into testable helpers #552
Copy link
Copy link
Open
Labels
area/testingTest infrastructure, fixtures, e2e harness, coverage.Test infrastructure, fixtures, e2e harness, coverage.enhancementDeprecated: use type/feature. Kept for issue history; will be removed in milestone 0.10.0.Deprecated: use type/feature. Kept for issue history; will be removed in milestone 0.10.0.needs-triageDeprecated: use status/needs-triage. Kept for issue history; will be removed in milestone 0.10.0.Deprecated: use status/needs-triage. Kept for issue history; will be removed in milestone 0.10.0.priority/lowAccepted but not time-sensitiveAccepted but not time-sensitivestatus/acceptedDirection approved, safe to start work.Direction approved, safe to start work.status/triagedInitial agentic triage complete; pending maintainer ratification (silence = approval).Initial agentic triage complete; pending maintainer ratification (silence = approval).type/refactorInternal restructure, no behavior change.Internal restructure, no behavior change.
Milestone
Metadata
Metadata
Assignees
Labels
area/testingTest infrastructure, fixtures, e2e harness, coverage.Test infrastructure, fixtures, e2e harness, coverage.enhancementDeprecated: use type/feature. Kept for issue history; will be removed in milestone 0.10.0.Deprecated: use type/feature. Kept for issue history; will be removed in milestone 0.10.0.needs-triageDeprecated: use status/needs-triage. Kept for issue history; will be removed in milestone 0.10.0.Deprecated: use status/needs-triage. Kept for issue history; will be removed in milestone 0.10.0.priority/lowAccepted but not time-sensitiveAccepted but not time-sensitivestatus/acceptedDirection approved, safe to start work.Direction approved, safe to start work.status/triagedInitial agentic triage complete; pending maintainer ratification (silence = approval).Initial agentic triage complete; pending maintainer ratification (silence = approval).type/refactorInternal restructure, no behavior change.Internal restructure, no behavior change.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Projects
Status
Todo
Is your feature request related to a problem? Please describe.
Unit tests for install skip-download logic (
test_install_update_refs.py, added in #550) validate reimplemented helper functions that mirrorinstall.pyconditions, rather than exercising the production code paths directly. This means the test suite can pass even if the real condition ininstall.pychanges but the mirrored helper is not updated.Identified during Copilot review of #550.
Describe the solution you'd like
Either:
skip_downloadandlocked_refdecision logic into shared helper functions used by bothinstall.pyand the tests, or_install_apm_dependencies()withGitHubPackageDownloadermocked (similar totests/unit/test_install_command.py) to assert update behavior end-to-end without network access.Option (a) is simpler but requires extracting logic from a closure. Option (b) provides stronger guarantees but requires more mock setup.
Describe alternatives you've considered
install.pyreferencing the test file so maintainers know to update both.Additional context
The current tests are functional and catch regressions in the condition semantics. This is a testing quality improvement, not a bug.
Related: #550