You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Three Test Harnesses Build a Stand-In PATH With an Empty Fallback When PATH Is Unset #1862
With PATH unset, shutil.which and similar lookups still find tools through the default search path (os.confstr("CS_PATH"), else os.defpath). A harness that builds its child's PATH from os.environ.get("PATH", "") then hands that child a PATH holding only its stub directory, or nothing, so the child can't find tools that the parent's lookup just found. #1859 and the fix for test_configure_archived.py moved two harnesses to an os.defpath fallback. These three still use the empty one:
scripts/tests/test_local_review.py:1060-1061 prepends a stub directory to os.environ.get("PATH", "").
scripts/tests/test_skills_install.py:718 and :767 pass {"PATH": os.environ.get("PATH", "")} as the child's whole environment.
Reproduce with env -u PATH /usr/bin/python3 -m unittest <module>, and compare against the same run with PATH set. Each site needs its own reading: test_local_review.py:1174-1175 deliberately empties PATH and restores the previous value, which is a different shape and may be correct as is.
Found while answering Copilot's PATH findings on the promotion PR #1850.
Activity
Fall Back to the Default Search Path in the Archived End-to-End Test (#…
Fall Back to os.defpath for PATH in Two Test Harnesses (#2716)