Repository navigation
Fix Windows PyPI no-lockfile hosted scan test - #1994
Mikola Lysenko (mikolalysenko) wants to merge 1 commit into
Conversation
hosted_scan_without_a_python_lock_warns_no_lockfile (#1885) fails on the Windows test leg: venv_installed_from_patch_a writes six into lib/python3.11/site-packages, but the Python crawler looks in Lib\site-packages on Windows, so the scan finds nothing and the expected redirect_unconfirmed row never appears. Write the fixture into Lib/site-packages on Windows, the same way run_raw and the workspace fixture in this file already do. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011f9aeQitp67Dj9pTSDoSHq
|
bugbot run Generated by Claude Code |
|
Ready for review (burn-down agent).
Generated by Claude Code |
Final review briefWhat it does: Fixes the test fixture Risk: low. It is a 6-line test-only change, and it uses the same Look here:
Verified:
Changes I made: none. Open questions: none. Auto-merge is armed, so approving this PR sends it straight to the merge queue. Generated by Claude Code |
Problem
test (windows-latest, 1)is red on main. A Windows-only dispatch on main at 7a62fbd (run 41502835096) fails one test; the macOS dispatch (run 41502839104) is green:The test arrived with #1885 at 16:08 UTC today. Windows legs run only nightly, so without this fix tonight's nightly will be red on Windows again, after 8 red nightlies in a row whose other failures were fixed today (#1852, #1894, #1905).
Root cause
venv_installed_from_patch_awrites six intolib/python3.11/site-packages. On Windows the Python crawler looks forLib\site-packages(find_site_packages_underinpython_crawler.rs), so the scan finds no installed package and theredirect_unconfirmedrow the test expects never appears. Deterministic, not a flake.Fix
Write the fixture into
Lib/site-packageson Windows, asrun_rawand the workspace fixture in the same file already do. Test-only change; no assertion changes. The other three tests using this helper now see the installed package on Windows too, which is what they already see on Linux and macOS.Proof
cargo test -p socket-patch-cli --test mode_migration_pypi: 79/79 passed.rustfmt --checkon the touched file is clean. (Localcargo clippy --test mode_migration_pypi -D warningsreports 8 pre-existing lints in untouched lines ofprebuilt_common/mod.rsand line 2420; none are in this diff.)test (windows-latest, 1), which fails on main.ci-ok,clippy); Cursor Bugbot reported no findings.Where tests run
No test is removed or moved.
https://claude.ai/code/session_011f9aeQitp67Dj9pTSDoSHq
Generated by Claude Code