mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-04 19:08:04 +00:00
Check idempotence in packse lock scenarios (#5485)
Add tests for the instabilities fix. Part of https://github.com/astral-sh/uv/issues/5180#issuecomment-2247696198 Closes #5180
This commit is contained in:
parent
38c6033010
commit
2247b0f540
2 changed files with 244 additions and 0 deletions
|
@ -7,6 +7,7 @@
|
|||
#![allow(clippy::needless_raw_string_hashes)]
|
||||
|
||||
use anyhow::Result;
|
||||
use assert_cmd::assert::OutputAssertExt;
|
||||
use assert_fs::prelude::*;
|
||||
use insta::assert_snapshot;
|
||||
|
||||
|
@ -71,6 +72,17 @@ fn {{module_name}}() -> Result<()> {
|
|||
"###
|
||||
);
|
||||
});
|
||||
|
||||
// Assert the idempotence of `uv lock`
|
||||
context
|
||||
.lock()
|
||||
.env_remove("UV_EXCLUDE_NEWER")
|
||||
.arg("--index-url")
|
||||
.arg("https://astral-sh.github.io/packse/0.3.31/simple-html/")
|
||||
.assert()
|
||||
.success();
|
||||
let lock2 = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
assert_eq!(lock2, lock);
|
||||
{{/expected.satisfiable}}
|
||||
|
||||
Ok(())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue