Skip to content

Commit c17e5d8

Browse files
committed
Test that co-wired Pipenv files are not contested
`vendor --check` and `vex` read lockfile discovery. With Pipfile.lock and requirements.txt both pointing at the same vendored wheel, the regression test now checks that discovery finds the patch in both files and reports no contest between them. Refs #612 Assisted-by: Claude Code:claude-opus-5-5
1 parent 872c692 commit c17e5d8

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

  • crates/socket-patch-core/src/vendor

‎crates/socket-patch-core/src/vendor/pypi.rs‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5695,6 +5695,21 @@ wheels = [
56955695
warnings.iter().all(|w| w.code != "pypi_multiple_lockfiles"),
56965696
"{warnings:?}"
56975697
);
5698+
// What `vendor --check` and `vex` read: both files wire the same
5699+
// vendored wheel, so neither contests the other.
5700+
let discovery = crate::vex::discover::discover_patched_refs(&fx.root).await;
5701+
assert!(discovery.contested.is_empty(), "{:?}", discovery.contested);
5702+
let wired_in: std::collections::BTreeSet<String> = discovery
5703+
.refs
5704+
.iter()
5705+
.filter(|r| r.uuid == UUID)
5706+
.map(|r| r.source_file.to_string_lossy().replace('\\', "/"))
5707+
.collect();
5708+
assert!(
5709+
wired_in.contains("Pipfile.lock") && wired_in.contains("requirements.txt"),
5710+
"{:?}",
5711+
discovery.refs
5712+
);
56985713

56995714
let outcome = revert_pypi(
57005715
entry.as_ref().expect("a wet vendor records its entry"),

0 commit comments

Comments
 (0)