mirror of https://github.com/astral-sh/uv
Reduce file reading boilerplace in tests (#7832)
This commit is contained in:
parent
8177974439
commit
d7feaadcbf
|
|
@ -205,7 +205,7 @@ fn root_package_splits_transitive_too() -> Result<()> {
|
|||
"###
|
||||
);
|
||||
|
||||
assert_snapshot!(fs_err::read_to_string(context.temp_dir.join("uv.lock"))?, @r###"
|
||||
assert_snapshot!(context.read("uv.lock"), @r###"
|
||||
version = 1
|
||||
requires-python = ">=3.11, <3.13"
|
||||
resolution-markers = [
|
||||
|
|
@ -400,7 +400,7 @@ fn root_package_splits_other_dependencies_too() -> Result<()> {
|
|||
"###
|
||||
);
|
||||
|
||||
assert_snapshot!(fs_err::read_to_string(context.temp_dir.join("uv.lock"))?, @r###"
|
||||
assert_snapshot!(context.read("uv.lock"), @r###"
|
||||
version = 1
|
||||
requires-python = ">=3.11, <3.13"
|
||||
resolution-markers = [
|
||||
|
|
@ -561,7 +561,7 @@ fn branching_between_registry_and_direct_url() -> Result<()> {
|
|||
);
|
||||
|
||||
// We have source dist and wheel for the registry, but only the wheel for the direct URL.
|
||||
assert_snapshot!(fs_err::read_to_string(context.temp_dir.join("uv.lock"))?, @r###"
|
||||
assert_snapshot!(context.read("uv.lock"), @r###"
|
||||
version = 1
|
||||
requires-python = ">=3.11, <3.13"
|
||||
resolution-markers = [
|
||||
|
|
@ -646,7 +646,7 @@ fn branching_urls_of_different_sources_disjoint() -> Result<()> {
|
|||
);
|
||||
|
||||
// We have source dist and wheel for the registry, but only the wheel for the direct URL.
|
||||
assert_snapshot!(fs_err::read_to_string(context.temp_dir.join("uv.lock"))?, @r###"
|
||||
assert_snapshot!(context.read("uv.lock"), @r###"
|
||||
version = 1
|
||||
requires-python = ">=3.11, <3.13"
|
||||
resolution-markers = [
|
||||
|
|
@ -773,7 +773,7 @@ fn dont_pre_visit_url_packages() -> Result<()> {
|
|||
"###
|
||||
);
|
||||
|
||||
assert_snapshot!(fs_err::read_to_string(context.temp_dir.join("uv.lock"))?, @r###"
|
||||
assert_snapshot!(context.read("uv.lock"), @r###"
|
||||
version = 1
|
||||
requires-python = ">=3.11, <3.13"
|
||||
|
||||
|
|
|
|||
|
|
@ -900,6 +900,12 @@ impl TestContext {
|
|||
let new_lock = fs_err::read_to_string(&lock_path).unwrap();
|
||||
diff_snapshot(&old_lock, &new_lock)
|
||||
}
|
||||
|
||||
/// Read a file in the temporary directory
|
||||
pub fn read(&self, file: impl AsRef<Path>) -> String {
|
||||
fs_err::read_to_string(self.temp_dir.join(&file))
|
||||
.unwrap_or_else(|_| panic!("Missing file: `{}`", file.user_display()))
|
||||
}
|
||||
}
|
||||
|
||||
/// Creates a "unified" diff between the two line-oriented strings suitable
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ fn lock_ecosystem_package(python_version: &str, name: &str) -> Result<()> {
|
|||
);
|
||||
assert_snapshot!(format!("{name}-uv-lock-output"), snapshot);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let lock = context.read("uv.lock");
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
}, {
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ fn add_registry() -> Result<()> {
|
|||
+ sniffio==1.3.1
|
||||
"###);
|
||||
|
||||
let pyproject_toml = fs_err::read_to_string(context.temp_dir.join("pyproject.toml"))?;
|
||||
let pyproject_toml = context.read("pyproject.toml");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -67,7 +67,7 @@ fn add_registry() -> Result<()> {
|
|||
);
|
||||
});
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -208,7 +208,7 @@ fn add_git() -> Result<()> {
|
|||
~ project==0.1.0 (from file://[TEMP_DIR]/)
|
||||
"###);
|
||||
|
||||
let pyproject_toml = fs_err::read_to_string(context.temp_dir.join("pyproject.toml"))?;
|
||||
let pyproject_toml = context.read("pyproject.toml");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -234,7 +234,7 @@ fn add_git() -> Result<()> {
|
|||
);
|
||||
});
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -348,7 +348,7 @@ fn add_git_private_source() -> Result<()> {
|
|||
+ uv-private-pypackage==0.1.0 (from git+https://github.com/astral-test/uv-private-pypackage@d780faf0ac91257d4d5a4f0c5a0e4509608c0071)
|
||||
"###);
|
||||
|
||||
let pyproject_toml = fs_err::read_to_string(context.temp_dir.join("pyproject.toml"))?;
|
||||
let pyproject_toml = context.read("pyproject.toml");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -373,7 +373,7 @@ fn add_git_private_source() -> Result<()> {
|
|||
);
|
||||
});
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -452,7 +452,7 @@ fn add_git_private_raw() -> Result<()> {
|
|||
+ uv-private-pypackage==0.1.0 (from git+https://github.com/astral-test/uv-private-pypackage@d780faf0ac91257d4d5a4f0c5a0e4509608c0071)
|
||||
"###);
|
||||
|
||||
let pyproject_toml = fs_err::read_to_string(context.temp_dir.join("pyproject.toml"))?;
|
||||
let pyproject_toml = context.read("pyproject.toml");
|
||||
|
||||
let filters: Vec<_> = [(token.as_str(), "***")]
|
||||
.into_iter()
|
||||
|
|
@ -479,7 +479,7 @@ fn add_git_private_raw() -> Result<()> {
|
|||
);
|
||||
});
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -676,7 +676,7 @@ fn add_git_raw() -> Result<()> {
|
|||
+ uv-public-pypackage==0.1.0 (from git+https://github.com/astral-test/uv-public-pypackage@0dacfd662c64cb4ceb16e6cf65a157a8b715b979)
|
||||
"###);
|
||||
|
||||
let pyproject_toml = fs_err::read_to_string(context.temp_dir.join("pyproject.toml"))?;
|
||||
let pyproject_toml = context.read("pyproject.toml");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -699,7 +699,7 @@ fn add_git_raw() -> Result<()> {
|
|||
);
|
||||
});
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -907,7 +907,7 @@ fn add_unnamed() -> Result<()> {
|
|||
+ uv-public-pypackage==0.1.0 (from git+https://github.com/astral-test/uv-public-pypackage@0dacfd662c64cb4ceb16e6cf65a157a8b715b979)
|
||||
"###);
|
||||
|
||||
let pyproject_toml = fs_err::read_to_string(context.temp_dir.join("pyproject.toml"))?;
|
||||
let pyproject_toml = context.read("pyproject.toml");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -932,7 +932,7 @@ fn add_unnamed() -> Result<()> {
|
|||
);
|
||||
});
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -1010,7 +1010,7 @@ fn add_remove_dev() -> Result<()> {
|
|||
+ sniffio==1.3.1
|
||||
"###);
|
||||
|
||||
let pyproject_toml = fs_err::read_to_string(context.temp_dir.join("pyproject.toml"))?;
|
||||
let pyproject_toml = context.read("pyproject.toml");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -1036,7 +1036,7 @@ fn add_remove_dev() -> Result<()> {
|
|||
});
|
||||
|
||||
// `uv add` implies a full lock and sync, including development dependencies.
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -1136,7 +1136,7 @@ fn add_remove_dev() -> Result<()> {
|
|||
- sniffio==1.3.1
|
||||
"###);
|
||||
|
||||
let pyproject_toml = fs_err::read_to_string(context.temp_dir.join("pyproject.toml"))?;
|
||||
let pyproject_toml = context.read("pyproject.toml");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -1159,7 +1159,7 @@ fn add_remove_dev() -> Result<()> {
|
|||
);
|
||||
});
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -1226,7 +1226,7 @@ fn add_remove_optional() -> Result<()> {
|
|||
+ sniffio==1.3.1
|
||||
"###);
|
||||
|
||||
let pyproject_toml = fs_err::read_to_string(context.temp_dir.join("pyproject.toml"))?;
|
||||
let pyproject_toml = context.read("pyproject.toml");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -1252,7 +1252,7 @@ fn add_remove_optional() -> Result<()> {
|
|||
});
|
||||
|
||||
// `uv add` implies a full lock and sync, including development dependencies.
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -1351,7 +1351,7 @@ fn add_remove_optional() -> Result<()> {
|
|||
~ project==0.1.0 (from file://[TEMP_DIR]/)
|
||||
"###);
|
||||
|
||||
let pyproject_toml = fs_err::read_to_string(context.temp_dir.join("pyproject.toml"))?;
|
||||
let pyproject_toml = context.read("pyproject.toml");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -1374,7 +1374,7 @@ fn add_remove_optional() -> Result<()> {
|
|||
);
|
||||
});
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -1441,7 +1441,7 @@ fn add_remove_inline_optional() -> Result<()> {
|
|||
+ typing-extensions==4.10.0
|
||||
"###);
|
||||
|
||||
let pyproject_toml = fs_err::read_to_string(context.temp_dir.join("pyproject.toml"))?;
|
||||
let pyproject_toml = context.read("pyproject.toml");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -1483,7 +1483,7 @@ fn add_remove_inline_optional() -> Result<()> {
|
|||
- typing-extensions==4.10.0
|
||||
"###);
|
||||
|
||||
let pyproject_toml = fs_err::read_to_string(context.temp_dir.join("pyproject.toml"))?;
|
||||
let pyproject_toml = context.read("pyproject.toml");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -1611,7 +1611,7 @@ fn add_remove_workspace() -> Result<()> {
|
|||
});
|
||||
|
||||
// `uv add` implies a full lock and sync, including development dependencies.
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -1696,7 +1696,7 @@ fn add_remove_workspace() -> Result<()> {
|
|||
);
|
||||
});
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -1827,7 +1827,7 @@ fn add_workspace_editable() -> Result<()> {
|
|||
});
|
||||
|
||||
// `uv add` implies a full lock and sync, including development dependencies.
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -1926,7 +1926,7 @@ fn add_workspace_path() -> Result<()> {
|
|||
+ child==0.1.0 (from file://[TEMP_DIR]/child)
|
||||
"###);
|
||||
|
||||
let pyproject_toml = fs_err::read_to_string(context.temp_dir.child("pyproject.toml"))?;
|
||||
let pyproject_toml = context.read("pyproject.toml");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -1951,7 +1951,7 @@ fn add_workspace_path() -> Result<()> {
|
|||
});
|
||||
|
||||
// `uv add` implies a full lock and sync, including development dependencies.
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -2177,7 +2177,7 @@ fn update() -> Result<()> {
|
|||
~ project==0.1.0 (from file://[TEMP_DIR]/)
|
||||
"###);
|
||||
|
||||
let pyproject_toml = fs_err::read_to_string(context.temp_dir.join("pyproject.toml"))?;
|
||||
let pyproject_toml = context.read("pyproject.toml");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -2215,7 +2215,7 @@ fn update() -> Result<()> {
|
|||
+ pysocks==1.7.1
|
||||
"###);
|
||||
|
||||
let pyproject_toml = fs_err::read_to_string(context.temp_dir.join("pyproject.toml"))?;
|
||||
let pyproject_toml = context.read("pyproject.toml");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -2255,7 +2255,7 @@ fn update() -> Result<()> {
|
|||
+ requests==2.32.3 (from git+https://github.com/psf/requests@0e322af87745eff34caffe4df68456ebc20d9068)
|
||||
"###);
|
||||
|
||||
let pyproject_toml = fs_err::read_to_string(context.temp_dir.join("pyproject.toml"))?;
|
||||
let pyproject_toml = context.read("pyproject.toml");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -2281,7 +2281,7 @@ fn update() -> Result<()> {
|
|||
);
|
||||
});
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -2468,7 +2468,7 @@ fn add_update_marker() -> Result<()> {
|
|||
~ project==0.1.0 (from file://[TEMP_DIR]/)
|
||||
"###);
|
||||
|
||||
let pyproject_toml = fs_err::read_to_string(context.temp_dir.join("pyproject.toml"))?;
|
||||
let pyproject_toml = context.read("pyproject.toml");
|
||||
|
||||
// Should add a new line for the dependency since the marker does not match an existing one
|
||||
insta::with_settings!({
|
||||
|
|
@ -2506,7 +2506,7 @@ fn add_update_marker() -> Result<()> {
|
|||
~ project==0.1.0 (from file://[TEMP_DIR]/)
|
||||
"###);
|
||||
|
||||
let pyproject_toml = fs_err::read_to_string(context.temp_dir.join("pyproject.toml"))?;
|
||||
let pyproject_toml = context.read("pyproject.toml");
|
||||
|
||||
// Should mutate the existing dependency since the marker matches
|
||||
insta::with_settings!({
|
||||
|
|
@ -2548,7 +2548,7 @@ fn add_update_marker() -> Result<()> {
|
|||
+ urllib3==1.23
|
||||
"###);
|
||||
|
||||
let pyproject_toml = fs_err::read_to_string(context.temp_dir.join("pyproject.toml"))?;
|
||||
let pyproject_toml = context.read("pyproject.toml");
|
||||
|
||||
// Should add a new line for the dependency since the marker does not match an existing one
|
||||
insta::with_settings!({
|
||||
|
|
@ -2587,7 +2587,7 @@ fn add_update_marker() -> Result<()> {
|
|||
~ project==0.1.0 (from file://[TEMP_DIR]/)
|
||||
"###);
|
||||
|
||||
let pyproject_toml = fs_err::read_to_string(context.temp_dir.join("pyproject.toml"))?;
|
||||
let pyproject_toml = context.read("pyproject.toml");
|
||||
|
||||
// Should add a new line for the dependency since the marker does not exactly match an existing
|
||||
// one — although it is a subset of the existing marker.
|
||||
|
|
@ -2633,7 +2633,7 @@ fn add_update_marker() -> Result<()> {
|
|||
- urllib3==1.23
|
||||
"###);
|
||||
|
||||
let pyproject_toml = fs_err::read_to_string(context.temp_dir.join("pyproject.toml"))?;
|
||||
let pyproject_toml = context.read("pyproject.toml");
|
||||
|
||||
// Should remove all variants of `requests`
|
||||
insta::with_settings!({
|
||||
|
|
@ -2695,7 +2695,7 @@ fn update_source_replace_url() -> Result<()> {
|
|||
+ urllib3==2.2.1
|
||||
"###);
|
||||
|
||||
let pyproject_toml = fs_err::read_to_string(context.temp_dir.join("pyproject.toml"))?;
|
||||
let pyproject_toml = context.read("pyproject.toml");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -2791,7 +2791,7 @@ fn add_inexact() -> Result<()> {
|
|||
~ project==0.1.0 (from file://[TEMP_DIR]/)
|
||||
"###);
|
||||
|
||||
let pyproject_toml = fs_err::read_to_string(context.temp_dir.join("pyproject.toml"))?;
|
||||
let pyproject_toml = context.read("pyproject.toml");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -2813,7 +2813,7 @@ fn add_inexact() -> Result<()> {
|
|||
);
|
||||
});
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -2932,7 +2932,7 @@ fn remove_registry() -> Result<()> {
|
|||
- sniffio==1.3.1
|
||||
"###);
|
||||
|
||||
let pyproject_toml = fs_err::read_to_string(context.temp_dir.join("pyproject.toml"))?;
|
||||
let pyproject_toml = context.read("pyproject.toml");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -2952,7 +2952,7 @@ fn remove_registry() -> Result<()> {
|
|||
);
|
||||
});
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -3022,7 +3022,7 @@ fn add_preserves_indentation_in_pyproject_toml() -> Result<()> {
|
|||
+ urllib3==2.2.1
|
||||
"###);
|
||||
|
||||
let pyproject_toml = fs_err::read_to_string(context.temp_dir.join("pyproject.toml"))?;
|
||||
let pyproject_toml = context.read("pyproject.toml");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -3083,7 +3083,7 @@ fn add_puts_default_indentation_in_pyproject_toml_if_not_observed() -> Result<()
|
|||
+ urllib3==2.2.1
|
||||
"###);
|
||||
|
||||
let pyproject_toml = fs_err::read_to_string(context.temp_dir.join("pyproject.toml"))?;
|
||||
let pyproject_toml = context.read("pyproject.toml");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -3134,7 +3134,7 @@ fn add_frozen() -> Result<()> {
|
|||
----- stderr -----
|
||||
"###);
|
||||
|
||||
let pyproject_toml = fs_err::read_to_string(context.temp_dir.join("pyproject.toml"))?;
|
||||
let pyproject_toml = context.read("pyproject.toml");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -3188,7 +3188,7 @@ fn add_no_sync() -> Result<()> {
|
|||
Resolved 4 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let pyproject_toml = fs_err::read_to_string(context.temp_dir.join("pyproject.toml"))?;
|
||||
let pyproject_toml = context.read("pyproject.toml");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -3360,7 +3360,7 @@ fn add_lower_bound() -> Result<()> {
|
|||
+ sniffio==1.3.1
|
||||
"###);
|
||||
|
||||
let pyproject_toml = fs_err::read_to_string(context.temp_dir.join("pyproject.toml"))?;
|
||||
let pyproject_toml = context.read("pyproject.toml");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -3420,7 +3420,7 @@ fn add_lower_bound_existing() -> Result<()> {
|
|||
+ sniffio==1.3.1
|
||||
"###);
|
||||
|
||||
let pyproject_toml = fs_err::read_to_string(context.temp_dir.join("pyproject.toml"))?;
|
||||
let pyproject_toml = context.read("pyproject.toml");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -3479,7 +3479,7 @@ fn add_lower_bound_raw() -> Result<()> {
|
|||
+ sniffio==1.3.1
|
||||
"###);
|
||||
|
||||
let pyproject_toml = fs_err::read_to_string(context.temp_dir.join("pyproject.toml"))?;
|
||||
let pyproject_toml = context.read("pyproject.toml");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -3538,7 +3538,7 @@ fn add_lower_bound_dev() -> Result<()> {
|
|||
+ sniffio==1.3.1
|
||||
"###);
|
||||
|
||||
let pyproject_toml = fs_err::read_to_string(context.temp_dir.join("pyproject.toml"))?;
|
||||
let pyproject_toml = context.read("pyproject.toml");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -3600,7 +3600,7 @@ fn add_lower_bound_optional() -> Result<()> {
|
|||
+ sniffio==1.3.1
|
||||
"###);
|
||||
|
||||
let pyproject_toml = fs_err::read_to_string(context.temp_dir.join("pyproject.toml"))?;
|
||||
let pyproject_toml = context.read("pyproject.toml");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -3625,7 +3625,7 @@ fn add_lower_bound_optional() -> Result<()> {
|
|||
);
|
||||
});
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -3720,7 +3720,7 @@ fn add_lower_bound_local() -> Result<()> {
|
|||
+ project==0.1.0 (from file://[TEMP_DIR]/)
|
||||
"###);
|
||||
|
||||
let pyproject_toml = fs_err::read_to_string(context.temp_dir.join("pyproject.toml"))?;
|
||||
let pyproject_toml = context.read("pyproject.toml");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -3742,7 +3742,7 @@ fn add_lower_bound_local() -> Result<()> {
|
|||
);
|
||||
});
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -3825,7 +3825,7 @@ fn add_non_project() -> Result<()> {
|
|||
+ iniconfig==2.0.0
|
||||
"###);
|
||||
|
||||
let pyproject_toml = fs_err::read_to_string(context.temp_dir.join("pyproject.toml"))?;
|
||||
let pyproject_toml = context.read("pyproject.toml");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -3842,7 +3842,7 @@ fn add_non_project() -> Result<()> {
|
|||
);
|
||||
});
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -3906,7 +3906,7 @@ fn add_repeat() -> Result<()> {
|
|||
+ sniffio==1.3.1
|
||||
"###);
|
||||
|
||||
let pyproject_toml = fs_err::read_to_string(context.temp_dir.join("pyproject.toml"))?;
|
||||
let pyproject_toml = context.read("pyproject.toml");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -3938,7 +3938,7 @@ fn add_repeat() -> Result<()> {
|
|||
Audited 4 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let pyproject_toml = fs_err::read_to_string(context.temp_dir.join("pyproject.toml"))?;
|
||||
let pyproject_toml = context.read("pyproject.toml");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -4007,7 +4007,7 @@ fn add_requirements_file() -> Result<()> {
|
|||
+ werkzeug==3.0.1
|
||||
"###);
|
||||
|
||||
let pyproject_toml = fs_err::read_to_string(context.temp_dir.join("pyproject.toml"))?;
|
||||
let pyproject_toml = context.read("pyproject.toml");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -4093,7 +4093,7 @@ fn add_script() -> Result<()> {
|
|||
Updated `script.py`
|
||||
"###);
|
||||
|
||||
let script_content = fs_err::read_to_string(context.temp_dir.join("script.py"))?;
|
||||
let script_content = context.read("script.py");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -4152,7 +4152,7 @@ fn add_script_relative_path() -> Result<()> {
|
|||
Updated `script.py`
|
||||
"###);
|
||||
|
||||
let script_content = fs_err::read_to_string(context.temp_dir.join("script.py"))?;
|
||||
let script_content = context.read("script.py");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -4199,7 +4199,7 @@ fn add_script_without_metadata_table() -> Result<()> {
|
|||
Updated `script.py`
|
||||
"###);
|
||||
|
||||
let script_content = fs_err::read_to_string(context.temp_dir.join("script.py"))?;
|
||||
let script_content = context.read("script.py");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -4250,7 +4250,7 @@ fn add_script_without_metadata_table_with_shebang() -> Result<()> {
|
|||
Updated `script.py`
|
||||
"###);
|
||||
|
||||
let script_content = fs_err::read_to_string(context.temp_dir.join("script.py"))?;
|
||||
let script_content = context.read("script.py");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -4306,7 +4306,7 @@ fn add_script_with_metadata_table_and_shebang() -> Result<()> {
|
|||
Updated `script.py`
|
||||
"###);
|
||||
|
||||
let script_content = fs_err::read_to_string(context.temp_dir.join("script.py"))?;
|
||||
let script_content = context.read("script.py");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -4358,7 +4358,7 @@ fn add_script_without_metadata_table_with_docstring() -> Result<()> {
|
|||
Updated `script.py`
|
||||
"###);
|
||||
|
||||
let script_content = fs_err::read_to_string(context.temp_dir.join("script.py"))?;
|
||||
let script_content = context.read("script.py");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -4418,7 +4418,7 @@ fn remove_script() -> Result<()> {
|
|||
Updated `script.py`
|
||||
"###);
|
||||
|
||||
let script_content = fs_err::read_to_string(context.temp_dir.join("script.py"))?;
|
||||
let script_content = context.read("script.py");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -4476,7 +4476,7 @@ fn remove_last_dep_script() -> Result<()> {
|
|||
Updated `script.py`
|
||||
"###);
|
||||
|
||||
let script_content = fs_err::read_to_string(context.temp_dir.join("script.py"))?;
|
||||
let script_content = context.read("script.py");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -4533,7 +4533,7 @@ fn add_git_to_script() -> Result<()> {
|
|||
Updated `script.py`
|
||||
"###);
|
||||
|
||||
let script_content = fs_err::read_to_string(context.temp_dir.join("script.py"))?;
|
||||
let script_content = context.read("script.py");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -4614,7 +4614,7 @@ fn fail_to_add_revert_project() -> Result<()> {
|
|||
---
|
||||
"###);
|
||||
|
||||
let pyproject_toml = fs_err::read_to_string(context.temp_dir.join("pyproject.toml"))?;
|
||||
let pyproject_toml = context.read("pyproject.toml");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -4679,7 +4679,7 @@ fn sorted_dependencies() -> Result<()> {
|
|||
+ urllib3==2.2.1
|
||||
"###);
|
||||
|
||||
let pyproject_toml = fs_err::read_to_string(context.temp_dir.join("pyproject.toml"))?;
|
||||
let pyproject_toml = context.read("pyproject.toml");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -4733,7 +4733,7 @@ fn custom_dependencies() -> Result<()> {
|
|||
----- stderr -----
|
||||
"###);
|
||||
|
||||
let pyproject_toml = fs_err::read_to_string(context.temp_dir.join("pyproject.toml"))?;
|
||||
let pyproject_toml = context.read("pyproject.toml");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -4788,7 +4788,7 @@ fn update_offset() -> Result<()> {
|
|||
+ typing-extensions==4.10.0
|
||||
"###);
|
||||
|
||||
let pyproject_toml = fs_err::read_to_string(context.temp_dir.join("pyproject.toml"))?;
|
||||
let pyproject_toml = context.read("pyproject.toml");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -4924,7 +4924,7 @@ fn add_self() -> Result<()> {
|
|||
+ typing-extensions==4.10.0
|
||||
"###);
|
||||
|
||||
let pyproject_toml = fs_err::read_to_string(context.temp_dir.join("pyproject.toml"))?;
|
||||
let pyproject_toml = context.read("pyproject.toml");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
|
|||
|
|
@ -715,10 +715,7 @@ fn output_file() -> Result<()> {
|
|||
Resolved 4 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let contents = apply_filters(
|
||||
fs_err::read_to_string(context.temp_dir.child("requirements.txt")).unwrap(),
|
||||
context.filters(),
|
||||
);
|
||||
let contents = apply_filters(context.read("requirements.txt"), context.filters());
|
||||
insta::assert_snapshot!(contents, @r###"
|
||||
# This file was autogenerated by uv via the following command:
|
||||
# uv export --cache-dir [CACHE_DIR] --output-file requirements.txt
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ mod common;
|
|||
|
||||
/// See [`init_application`] and [`init_library`] for more coverage.
|
||||
#[test]
|
||||
fn init() -> Result<()> {
|
||||
fn init() {
|
||||
let context = TestContext::new("3.12");
|
||||
|
||||
uv_snapshot!(context.filters(), context.init().arg("foo"), @r###"
|
||||
|
|
@ -26,8 +26,8 @@ fn init() -> Result<()> {
|
|||
Initialized project `foo` at `[TEMP_DIR]/foo`
|
||||
"###);
|
||||
|
||||
let pyproject = fs_err::read_to_string(context.temp_dir.join("foo/pyproject.toml"))?;
|
||||
let _ = fs_err::read_to_string(context.temp_dir.join("foo/README.md")).unwrap();
|
||||
let pyproject = context.read("foo/pyproject.toml");
|
||||
let _ = context.read("foo/README.md");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -56,8 +56,7 @@ fn init() -> Result<()> {
|
|||
Resolved 1 package in [TIME]
|
||||
"###);
|
||||
|
||||
let python_version =
|
||||
fs_err::read_to_string(context.temp_dir.join("foo").join(".python-version"))?;
|
||||
let python_version = context.read("foo/.python-version");
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
}, {
|
||||
|
|
@ -65,8 +64,6 @@ fn init() -> Result<()> {
|
|||
python_version, @"3.12"
|
||||
);
|
||||
});
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Run `uv init --app` to create an application project
|
||||
|
|
@ -677,7 +674,7 @@ fn init_cache() -> Result<()> {
|
|||
}
|
||||
|
||||
#[test]
|
||||
fn init_no_readme() -> Result<()> {
|
||||
fn init_no_readme() {
|
||||
let context = TestContext::new("3.12");
|
||||
|
||||
uv_snapshot!(context.filters(), context.init().arg("foo").arg("--no-readme"), @r###"
|
||||
|
|
@ -689,7 +686,7 @@ fn init_no_readme() -> Result<()> {
|
|||
Initialized project `foo` at `[TEMP_DIR]/foo`
|
||||
"###);
|
||||
|
||||
let pyproject = fs_err::read_to_string(context.temp_dir.join("foo/pyproject.toml"))?;
|
||||
let pyproject = context.read("foo/pyproject.toml");
|
||||
let _ = fs_err::read_to_string(context.temp_dir.join("foo/README.md")).unwrap_err();
|
||||
|
||||
insta::with_settings!({
|
||||
|
|
@ -706,12 +703,10 @@ fn init_no_readme() -> Result<()> {
|
|||
"###
|
||||
);
|
||||
});
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn init_no_pin_python() -> Result<()> {
|
||||
fn init_no_pin_python() {
|
||||
let context = TestContext::new("3.12");
|
||||
|
||||
uv_snapshot!(context.filters(), context.init().arg("foo").arg("--no-pin-python"), @r###"
|
||||
|
|
@ -723,7 +718,7 @@ fn init_no_pin_python() -> Result<()> {
|
|||
Initialized project `foo` at `[TEMP_DIR]/foo`
|
||||
"###);
|
||||
|
||||
let pyproject = fs_err::read_to_string(context.temp_dir.join("foo/pyproject.toml"))?;
|
||||
let pyproject = context.read("foo/pyproject.toml");
|
||||
let _ = fs_err::read_to_string(context.temp_dir.join("foo/.python-version")).unwrap_err();
|
||||
|
||||
insta::with_settings!({
|
||||
|
|
@ -741,7 +736,6 @@ fn init_no_pin_python() -> Result<()> {
|
|||
"###
|
||||
);
|
||||
});
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
@ -1002,7 +996,7 @@ fn init_workspace() -> Result<()> {
|
|||
);
|
||||
});
|
||||
|
||||
let workspace = fs_err::read_to_string(context.temp_dir.join("pyproject.toml"))?;
|
||||
let workspace = context.read("pyproject.toml");
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
}, {
|
||||
|
|
@ -1096,7 +1090,7 @@ fn init_workspace_relative_sub_package() -> Result<()> {
|
|||
);
|
||||
});
|
||||
|
||||
let workspace = fs_err::read_to_string(context.temp_dir.join("pyproject.toml"))?;
|
||||
let workspace = context.read("pyproject.toml");
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
}, {
|
||||
|
|
@ -1191,7 +1185,7 @@ fn init_workspace_outside() -> Result<()> {
|
|||
);
|
||||
});
|
||||
|
||||
let workspace = fs_err::read_to_string(context.temp_dir.join("pyproject.toml"))?;
|
||||
let workspace = context.read("pyproject.toml");
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
}, {
|
||||
|
|
@ -1334,7 +1328,7 @@ fn init_isolated() -> Result<()> {
|
|||
Initialized project `foo`
|
||||
"###);
|
||||
|
||||
let workspace = fs_err::read_to_string(context.temp_dir.join("pyproject.toml"))?;
|
||||
let workspace = context.read("pyproject.toml");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -1383,7 +1377,7 @@ fn init_no_workspace() -> Result<()> {
|
|||
"###);
|
||||
|
||||
// Ensure that the workspace was not modified.
|
||||
let workspace = fs_err::read_to_string(context.temp_dir.join("pyproject.toml"))?;
|
||||
let workspace = context.read("pyproject.toml");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -1416,7 +1410,7 @@ fn init_no_workspace() -> Result<()> {
|
|||
Initialized project `bar`
|
||||
"###);
|
||||
|
||||
let workspace = fs_err::read_to_string(context.temp_dir.join("pyproject.toml"))?;
|
||||
let workspace = context.read("pyproject.toml");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -1431,7 +1425,7 @@ fn init_no_workspace() -> Result<()> {
|
|||
|
||||
/// Warn if the user provides `--no-workspace` outside of a workspace.
|
||||
#[test]
|
||||
fn init_no_workspace_warning() -> Result<()> {
|
||||
fn init_no_workspace_warning() {
|
||||
let context = TestContext::new("3.12");
|
||||
|
||||
uv_snapshot!(context.filters(), context.init().current_dir(&context.temp_dir).arg("--no-workspace").arg("--name").arg("project"), @r###"
|
||||
|
|
@ -1443,7 +1437,7 @@ fn init_no_workspace_warning() -> Result<()> {
|
|||
Initialized project `project`
|
||||
"###);
|
||||
|
||||
let workspace = fs_err::read_to_string(context.temp_dir.join("pyproject.toml"))?;
|
||||
let workspace = context.read("pyproject.toml");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -1460,8 +1454,6 @@ fn init_no_workspace_warning() -> Result<()> {
|
|||
"###
|
||||
);
|
||||
});
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
@ -1567,7 +1559,7 @@ fn init_explicit_workspace() -> Result<()> {
|
|||
Initialized project `foo` at `[TEMP_DIR]/foo`
|
||||
"###);
|
||||
|
||||
let workspace = fs_err::read_to_string(context.temp_dir.join("pyproject.toml"))?;
|
||||
let workspace = context.read("pyproject.toml");
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
}, {
|
||||
|
|
@ -1735,7 +1727,7 @@ fn init_nested_virtual_workspace() -> Result<()> {
|
|||
Initialized project `foo` at `[TEMP_DIR]/foo`
|
||||
"###);
|
||||
|
||||
let pyproject = fs_err::read_to_string(context.temp_dir.join("foo").join("pyproject.toml"))?;
|
||||
let pyproject = context.read("foo/pyproject.toml");
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
}, {
|
||||
|
|
@ -1759,7 +1751,7 @@ fn init_nested_virtual_workspace() -> Result<()> {
|
|||
);
|
||||
});
|
||||
|
||||
let workspace = fs_err::read_to_string(context.temp_dir.join("pyproject.toml"))?;
|
||||
let workspace = context.read("pyproject.toml");
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
}, {
|
||||
|
|
@ -1803,7 +1795,7 @@ fn init_matches_members() -> Result<()> {
|
|||
Initialized project `foo` at `[TEMP_DIR]/packages/foo`
|
||||
"###);
|
||||
|
||||
let workspace = fs_err::read_to_string(context.temp_dir.join("pyproject.toml"))?;
|
||||
let workspace = context.read("pyproject.toml");
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
}, {
|
||||
|
|
@ -1845,7 +1837,7 @@ fn init_matches_exclude() -> Result<()> {
|
|||
Initialized project `foo` at `[TEMP_DIR]/packages/foo`
|
||||
"###);
|
||||
|
||||
let workspace = fs_err::read_to_string(context.temp_dir.join("pyproject.toml"))?;
|
||||
let workspace = context.read("pyproject.toml");
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
}, {
|
||||
|
|
@ -2058,7 +2050,7 @@ fn init_unmanaged() -> Result<()> {
|
|||
Initialized project `foo` at `[TEMP_DIR]/foo`
|
||||
"###);
|
||||
|
||||
let workspace = fs_err::read_to_string(context.temp_dir.join("pyproject.toml"))?;
|
||||
let workspace = context.read("pyproject.toml");
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
}, {
|
||||
|
|
@ -2115,7 +2107,7 @@ fn init_failure() -> Result<()> {
|
|||
Initialized project `foo` at `[TEMP_DIR]/foo`
|
||||
"###);
|
||||
|
||||
let workspace = fs_err::read_to_string(context.temp_dir.join("foo").join("pyproject.toml"))?;
|
||||
let workspace = context.read("foo/pyproject.toml");
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
}, {
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ fn lock_wheel_registry() -> Result<()> {
|
|||
Resolved 4 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -170,7 +170,7 @@ fn lock_sdist_registry() -> Result<()> {
|
|||
Resolved 2 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -259,7 +259,7 @@ fn lock_sdist_git() -> Result<()> {
|
|||
Resolved 2 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -353,7 +353,7 @@ fn lock_sdist_git() -> Result<()> {
|
|||
Resolved 2 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -413,7 +413,7 @@ fn lock_sdist_git() -> Result<()> {
|
|||
Resolved 2 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -473,7 +473,7 @@ fn lock_sdist_git() -> Result<()> {
|
|||
Resolved 2 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -538,7 +538,7 @@ fn lock_sdist_git_subdirectory() -> Result<()> {
|
|||
Resolved 2 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -626,7 +626,7 @@ fn lock_sdist_git_pep508() -> Result<()> {
|
|||
Resolved 2 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -693,7 +693,7 @@ fn lock_sdist_git_pep508() -> Result<()> {
|
|||
Resolved 2 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -750,7 +750,7 @@ fn lock_sdist_git_pep508() -> Result<()> {
|
|||
Resolved 2 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -807,7 +807,7 @@ fn lock_sdist_git_pep508() -> Result<()> {
|
|||
Resolved 2 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -875,7 +875,7 @@ fn lock_sdist_git_short_rev() -> Result<()> {
|
|||
Resolved 2 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -973,7 +973,7 @@ fn lock_wheel_url() -> Result<()> {
|
|||
Resolved 4 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -1120,7 +1120,7 @@ fn lock_sdist_url() -> Result<()> {
|
|||
Resolved 4 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -1257,7 +1257,7 @@ fn lock_project_extra() -> Result<()> {
|
|||
Resolved 5 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -1524,7 +1524,7 @@ fn lock_dependency_extra() -> Result<()> {
|
|||
Resolved 10 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -2011,7 +2011,7 @@ fn lock_dependency_non_existent_extra() -> Result<()> {
|
|||
warning: The package `flask==3.0.2` does not have an extra named `foo`
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -2196,7 +2196,7 @@ fn lock_upgrade_log() -> Result<()> {
|
|||
Resolved 3 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -2281,7 +2281,7 @@ fn lock_upgrade_log() -> Result<()> {
|
|||
Added typing-extensions v4.10.0
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -2372,7 +2372,7 @@ fn lock_upgrade_log_multi_version() -> Result<()> {
|
|||
Resolved 3 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -2461,7 +2461,7 @@ fn lock_upgrade_log_multi_version() -> Result<()> {
|
|||
Updated markupsafe v1.1.1, v2.0.0 -> v2.1.5
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -2538,7 +2538,7 @@ fn lock_preference() -> Result<()> {
|
|||
Resolved 2 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -2601,7 +2601,7 @@ fn lock_preference() -> Result<()> {
|
|||
Resolved 2 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -2647,7 +2647,7 @@ fn lock_preference() -> Result<()> {
|
|||
Updated iniconfig v1.1.1 -> v2.0.0
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -2771,7 +2771,7 @@ fn lock_git_sha() -> Result<()> {
|
|||
Resolved 2 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
// The lockfile should resolve to `b270df1a2fb5d012294e9aaf05e7e0bab1e6a389`, the latest commit
|
||||
// on `main`.
|
||||
|
|
@ -4135,7 +4135,7 @@ fn lock_dev() -> Result<()> {
|
|||
Resolved 3 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -4253,7 +4253,7 @@ fn lock_conditional_unconditional() -> Result<()> {
|
|||
Resolved 2 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -4334,7 +4334,7 @@ fn lock_multiple_markers() -> Result<()> {
|
|||
Resolved 2 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -4454,7 +4454,7 @@ fn lock_relative_and_absolute_paths() -> Result<()> {
|
|||
Resolved 3 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -4537,7 +4537,7 @@ fn lock_cycles() -> Result<()> {
|
|||
Resolved 11 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -4745,7 +4745,7 @@ fn lock_new_extras() -> Result<()> {
|
|||
Resolved 6 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -4874,7 +4874,7 @@ fn lock_new_extras() -> Result<()> {
|
|||
Added pysocks v1.7.1
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -5125,7 +5125,7 @@ fn lock_resolution_mode() -> Result<()> {
|
|||
Resolved 4 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -5205,7 +5205,7 @@ fn lock_resolution_mode() -> Result<()> {
|
|||
Updated anyio v4.3.0 -> v3.0.0
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -5380,7 +5380,7 @@ fn lock_same_version_multiple_urls() -> Result<()> {
|
|||
Resolved 7 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -5871,7 +5871,7 @@ fn lock_redact_https() -> Result<()> {
|
|||
Resolved 2 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
// The lockfile shout omit the credentials.
|
||||
insta::with_settings!({
|
||||
|
|
@ -6068,7 +6068,7 @@ fn lock_redact_git_pep508() -> Result<()> {
|
|||
Resolved 2 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => filters.clone(),
|
||||
|
|
@ -6165,7 +6165,7 @@ fn lock_redact_git_sources() -> Result<()> {
|
|||
Resolved 2 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => filters.clone(),
|
||||
|
|
@ -6255,7 +6255,7 @@ fn lock_relative_index() -> Result<()> {
|
|||
Resolved 2 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -6371,7 +6371,7 @@ fn lock_no_sources() -> Result<()> {
|
|||
Resolved 4 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -6459,7 +6459,7 @@ fn lock_no_sources() -> Result<()> {
|
|||
Added sniffio v1.3.1
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -6631,7 +6631,7 @@ fn lock_migrate() -> Result<()> {
|
|||
Added sniffio v1.3.1
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -6733,7 +6733,7 @@ fn lock_upgrade_package() -> Result<()> {
|
|||
Resolved 4 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -6832,7 +6832,7 @@ fn lock_upgrade_package() -> Result<()> {
|
|||
Resolved 4 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -6915,7 +6915,7 @@ fn lock_upgrade_package() -> Result<()> {
|
|||
Resolved 4 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -7005,7 +7005,7 @@ fn lock_upgrade_drop_fork_markers() -> Result<()> {
|
|||
.env_remove("UV_EXCLUDE_NEWER")
|
||||
.assert()
|
||||
.success();
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
assert!(lock.contains("resolution-markers"));
|
||||
|
||||
// Remove the bound and lock with `--upgrade`.
|
||||
|
|
@ -7018,7 +7018,7 @@ fn lock_upgrade_drop_fork_markers() -> Result<()> {
|
|||
.arg("--upgrade")
|
||||
.assert()
|
||||
.success();
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
assert!(!lock.contains("resolution-markers"));
|
||||
Ok(())
|
||||
}
|
||||
|
|
@ -7325,7 +7325,7 @@ fn lock_find_links_http_wheel() -> Result<()> {
|
|||
Resolved 2 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -7420,7 +7420,7 @@ fn lock_find_links_http_sdist() -> Result<()> {
|
|||
Resolved 2 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -7549,7 +7549,7 @@ fn lock_local_index() -> Result<()> {
|
|||
Resolved 2 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
let index = Url::from_directory_path(&root).unwrap().to_string();
|
||||
let filters = [(index.as_str(), "file://[TMP]")]
|
||||
|
|
@ -7646,7 +7646,7 @@ fn lock_sources_url() -> Result<()> {
|
|||
Resolved 5 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -7786,7 +7786,7 @@ fn lock_sources_archive() -> Result<()> {
|
|||
Resolved 5 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
// insta::with_settings!({
|
||||
// filters => context.filters(),
|
||||
|
|
@ -7936,7 +7936,7 @@ fn lock_sources_source_tree() -> Result<()> {
|
|||
Resolved 3 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -8076,7 +8076,7 @@ fn lock_editable() -> Result<()> {
|
|||
Resolved 3 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -8159,7 +8159,7 @@ fn lock_editable() -> Result<()> {
|
|||
Resolved 3 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -8718,7 +8718,7 @@ fn lock_mismatched_versions() -> Result<()> {
|
|||
Resolved 2 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -8842,7 +8842,7 @@ fn lock_change_index() -> Result<()> {
|
|||
Resolved 2 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -8888,7 +8888,7 @@ fn lock_change_index() -> Result<()> {
|
|||
Resolved 2 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -8989,7 +8989,7 @@ fn lock_remove_member() -> Result<()> {
|
|||
Resolved 5 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -9110,7 +9110,7 @@ fn lock_remove_member() -> Result<()> {
|
|||
Removed sniffio v1.3.1
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -9171,7 +9171,7 @@ fn lock_add_member() -> Result<()> {
|
|||
Resolved 1 package in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -9285,7 +9285,7 @@ fn lock_add_member() -> Result<()> {
|
|||
Resolved 5 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -9392,7 +9392,7 @@ fn lock_redundant_add_member() -> Result<()> {
|
|||
Resolved 4 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -9500,7 +9500,7 @@ fn lock_redundant_add_member() -> Result<()> {
|
|||
Resolved 4 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -9595,7 +9595,7 @@ fn lock_new_constraints() -> Result<()> {
|
|||
Resolved 4 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -9705,7 +9705,7 @@ fn lock_new_constraints() -> Result<()> {
|
|||
Updated anyio v4.3.0 -> v4.2.0
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -9813,7 +9813,7 @@ fn lock_remove_member_non_project() -> Result<()> {
|
|||
Resolved 4 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -9921,7 +9921,7 @@ fn lock_remove_member_non_project() -> Result<()> {
|
|||
Removed sniffio v1.3.1
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -9971,7 +9971,7 @@ fn lock_rename_project() -> Result<()> {
|
|||
Resolved 2 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -10055,7 +10055,7 @@ fn lock_rename_project() -> Result<()> {
|
|||
Added renamed v0.1.0
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -10174,7 +10174,7 @@ fn lock_missing_metadata() -> Result<()> {
|
|||
Resolved 4 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -10265,7 +10265,7 @@ fn lock_reorder() -> Result<()> {
|
|||
Resolved 5 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -10524,7 +10524,7 @@ fn lock_exclude_unnecessary_python_forks() -> Result<()> {
|
|||
Resolved 4 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -10634,7 +10634,7 @@ fn lock_constrained_environment() -> Result<()> {
|
|||
Resolved 7 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
// Because we're _not_ locking for Windows, `colorama` should not be included.
|
||||
insta::with_settings!({
|
||||
|
|
@ -10819,7 +10819,7 @@ fn lock_constrained_environment() -> Result<()> {
|
|||
Added colorama v0.4.6
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
// Because we're locking for Windows, `colorama` should be included.
|
||||
insta::with_settings!({
|
||||
|
|
@ -10964,7 +10964,7 @@ fn lock_constrained_environment_legacy() -> Result<()> {
|
|||
Resolved 7 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
// Because we're _not_ locking for Windows, `colorama` should not be included.
|
||||
insta::with_settings!({
|
||||
|
|
@ -11157,7 +11157,7 @@ fn lock_non_project_fork() -> Result<()> {
|
|||
Resolved 6 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -11347,7 +11347,7 @@ fn lock_non_project_conditional() -> Result<()> {
|
|||
Resolved 3 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -11454,7 +11454,7 @@ fn lock_dropped_dev_extra() -> Result<()> {
|
|||
Resolved 2 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -11572,7 +11572,7 @@ fn lock_trailing_slash() -> Result<()> {
|
|||
Resolved 4 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -11704,7 +11704,7 @@ fn lock_explicit_virtual_project() -> Result<()> {
|
|||
Resolved 11 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -11921,7 +11921,7 @@ fn lock_implicit_virtual_project() -> Result<()> {
|
|||
Resolved 11 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -12148,7 +12148,7 @@ fn lock_implicit_virtual_path() -> Result<()> {
|
|||
Resolved 6 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -12334,7 +12334,7 @@ fn lock_split_python_environment() -> Result<()> {
|
|||
Resolved 2 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -12448,7 +12448,7 @@ fn lock_python_upper_bound() -> Result<()> {
|
|||
Resolved 18 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -12822,7 +12822,7 @@ fn lock_dependency_metadata() -> Result<()> {
|
|||
Resolved 3 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -13035,7 +13035,7 @@ fn lock_strip_fragment() -> Result<()> {
|
|||
Resolved 2 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -13290,7 +13290,7 @@ fn lock_change_requires_python() -> Result<()> {
|
|||
Resolved 5 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -13399,7 +13399,7 @@ fn lock_change_requires_python() -> Result<()> {
|
|||
Resolved 5 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -13518,7 +13518,7 @@ fn lock_multiple_sources() -> Result<()> {
|
|||
Resolved 3 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -13696,7 +13696,7 @@ fn lock_multiple_sources_non_total() -> Result<()> {
|
|||
Resolved 3 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -13796,7 +13796,7 @@ fn lock_multiple_sources_respect_marker() -> Result<()> {
|
|||
Resolved 3 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -13900,7 +13900,7 @@ fn lock_multiple_sources_extra() -> Result<()> {
|
|||
Resolved 2 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ fn fork_allows_non_conflicting_non_overlapping_dependencies() -> Result<()> {
|
|||
"###
|
||||
);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let lock = context.read("uv.lock");
|
||||
insta::with_settings!({
|
||||
filters => filters,
|
||||
}, {
|
||||
|
|
@ -194,7 +194,7 @@ fn fork_allows_non_conflicting_repeated_dependencies() -> Result<()> {
|
|||
"###
|
||||
);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let lock = context.read("uv.lock");
|
||||
insta::with_settings!({
|
||||
filters => filters,
|
||||
}, {
|
||||
|
|
@ -293,7 +293,7 @@ fn fork_basic() -> Result<()> {
|
|||
"###
|
||||
);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let lock = context.read("uv.lock");
|
||||
insta::with_settings!({
|
||||
filters => filters,
|
||||
}, {
|
||||
|
|
@ -578,7 +578,7 @@ fn fork_filter_sibling_dependencies() -> Result<()> {
|
|||
"###
|
||||
);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let lock = context.read("uv.lock");
|
||||
insta::with_settings!({
|
||||
filters => filters,
|
||||
}, {
|
||||
|
|
@ -756,7 +756,7 @@ fn fork_upgrade() -> Result<()> {
|
|||
"###
|
||||
);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let lock = context.read("uv.lock");
|
||||
insta::with_settings!({
|
||||
filters => filters,
|
||||
}, {
|
||||
|
|
@ -876,7 +876,7 @@ fn fork_incomplete_markers() -> Result<()> {
|
|||
"###
|
||||
);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let lock = context.read("uv.lock");
|
||||
insta::with_settings!({
|
||||
filters => filters,
|
||||
}, {
|
||||
|
|
@ -1029,7 +1029,7 @@ fn fork_marker_accrue() -> Result<()> {
|
|||
"###
|
||||
);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let lock = context.read("uv.lock");
|
||||
insta::with_settings!({
|
||||
filters => filters,
|
||||
}, {
|
||||
|
|
@ -1232,7 +1232,7 @@ fn fork_marker_inherit_combined_allowed() -> Result<()> {
|
|||
"###
|
||||
);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let lock = context.read("uv.lock");
|
||||
insta::with_settings!({
|
||||
filters => filters,
|
||||
}, {
|
||||
|
|
@ -1412,7 +1412,7 @@ fn fork_marker_inherit_combined_disallowed() -> Result<()> {
|
|||
"###
|
||||
);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let lock = context.read("uv.lock");
|
||||
insta::with_settings!({
|
||||
filters => filters,
|
||||
}, {
|
||||
|
|
@ -1581,7 +1581,7 @@ fn fork_marker_inherit_combined() -> Result<()> {
|
|||
"###
|
||||
);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let lock = context.read("uv.lock");
|
||||
insta::with_settings!({
|
||||
filters => filters,
|
||||
}, {
|
||||
|
|
@ -1743,7 +1743,7 @@ fn fork_marker_inherit_isolated() -> Result<()> {
|
|||
"###
|
||||
);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let lock = context.read("uv.lock");
|
||||
insta::with_settings!({
|
||||
filters => filters,
|
||||
}, {
|
||||
|
|
@ -1891,7 +1891,7 @@ fn fork_marker_inherit_transitive() -> Result<()> {
|
|||
"###
|
||||
);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let lock = context.read("uv.lock");
|
||||
insta::with_settings!({
|
||||
filters => filters,
|
||||
}, {
|
||||
|
|
@ -2047,7 +2047,7 @@ fn fork_marker_inherit() -> Result<()> {
|
|||
"###
|
||||
);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let lock = context.read("uv.lock");
|
||||
insta::with_settings!({
|
||||
filters => filters,
|
||||
}, {
|
||||
|
|
@ -2185,7 +2185,7 @@ fn fork_marker_limited_inherit() -> Result<()> {
|
|||
"###
|
||||
);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let lock = context.read("uv.lock");
|
||||
insta::with_settings!({
|
||||
filters => filters,
|
||||
}, {
|
||||
|
|
@ -2340,7 +2340,7 @@ fn fork_marker_selection() -> Result<()> {
|
|||
"###
|
||||
);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let lock = context.read("uv.lock");
|
||||
insta::with_settings!({
|
||||
filters => filters,
|
||||
}, {
|
||||
|
|
@ -2495,7 +2495,7 @@ fn fork_marker_track() -> Result<()> {
|
|||
"###
|
||||
);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let lock = context.read("uv.lock");
|
||||
insta::with_settings!({
|
||||
filters => filters,
|
||||
}, {
|
||||
|
|
@ -2647,7 +2647,7 @@ fn fork_non_fork_marker_transitive() -> Result<()> {
|
|||
"###
|
||||
);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let lock = context.read("uv.lock");
|
||||
insta::with_settings!({
|
||||
filters => filters,
|
||||
}, {
|
||||
|
|
@ -2946,7 +2946,7 @@ fn fork_overlapping_markers_basic() -> Result<()> {
|
|||
"###
|
||||
);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let lock = context.read("uv.lock");
|
||||
insta::with_settings!({
|
||||
filters => filters,
|
||||
}, {
|
||||
|
|
@ -3113,7 +3113,7 @@ fn preferences_dependent_forking_bistable() -> Result<()> {
|
|||
"###
|
||||
);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let lock = context.read("uv.lock");
|
||||
insta::with_settings!({
|
||||
filters => filters,
|
||||
}, {
|
||||
|
|
@ -3491,7 +3491,7 @@ fn preferences_dependent_forking_tristable() -> Result<()> {
|
|||
"###
|
||||
);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let lock = context.read("uv.lock");
|
||||
insta::with_settings!({
|
||||
filters => filters,
|
||||
}, {
|
||||
|
|
@ -3774,7 +3774,7 @@ fn preferences_dependent_forking() -> Result<()> {
|
|||
"###
|
||||
);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let lock = context.read("uv.lock");
|
||||
insta::with_settings!({
|
||||
filters => filters,
|
||||
}, {
|
||||
|
|
@ -3948,7 +3948,7 @@ fn fork_remaining_universe_partitioning() -> Result<()> {
|
|||
"###
|
||||
);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let lock = context.read("uv.lock");
|
||||
insta::with_settings!({
|
||||
filters => filters,
|
||||
}, {
|
||||
|
|
@ -4100,7 +4100,7 @@ fn fork_requires_python_full_prerelease() -> Result<()> {
|
|||
"###
|
||||
);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let lock = context.read("uv.lock");
|
||||
insta::with_settings!({
|
||||
filters => filters,
|
||||
}, {
|
||||
|
|
@ -4184,7 +4184,7 @@ fn fork_requires_python_full() -> Result<()> {
|
|||
"###
|
||||
);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let lock = context.read("uv.lock");
|
||||
insta::with_settings!({
|
||||
filters => filters,
|
||||
}, {
|
||||
|
|
@ -4272,7 +4272,7 @@ fn fork_requires_python_patch_overlap() -> Result<()> {
|
|||
"###
|
||||
);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let lock = context.read("uv.lock");
|
||||
insta::with_settings!({
|
||||
filters => filters,
|
||||
}, {
|
||||
|
|
@ -4365,7 +4365,7 @@ fn fork_requires_python() -> Result<()> {
|
|||
"###
|
||||
);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let lock = context.read("uv.lock");
|
||||
insta::with_settings!({
|
||||
filters => filters,
|
||||
}, {
|
||||
|
|
@ -4448,7 +4448,7 @@ fn unreachable_package() -> Result<()> {
|
|||
"###
|
||||
);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let lock = context.read("uv.lock");
|
||||
insta::with_settings!({
|
||||
filters => filters,
|
||||
}, {
|
||||
|
|
@ -4549,7 +4549,7 @@ fn unreachable_wheels() -> Result<()> {
|
|||
"###
|
||||
);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let lock = context.read("uv.lock");
|
||||
insta::with_settings!({
|
||||
filters => filters,
|
||||
}, {
|
||||
|
|
@ -4666,7 +4666,7 @@ fn requires_python_wheels() -> Result<()> {
|
|||
"###
|
||||
);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let lock = context.read("uv.lock");
|
||||
insta::with_settings!({
|
||||
filters => filters,
|
||||
}, {
|
||||
|
|
|
|||
|
|
@ -35,8 +35,7 @@ fn python_pin() {
|
|||
----- stderr -----
|
||||
"###);
|
||||
|
||||
let python_version =
|
||||
fs_err::read_to_string(context.temp_dir.join(PYTHON_VERSION_FILENAME)).unwrap();
|
||||
let python_version = context.read(PYTHON_VERSION_FILENAME);
|
||||
assert_snapshot!(python_version, @r#"any"#);
|
||||
|
||||
// Without arguments, we read the current pin
|
||||
|
|
@ -50,8 +49,7 @@ fn python_pin() {
|
|||
"###);
|
||||
|
||||
// We should not mutate the file
|
||||
let python_version =
|
||||
fs_err::read_to_string(context.temp_dir.join(PYTHON_VERSION_FILENAME)).unwrap();
|
||||
let python_version = context.read(PYTHON_VERSION_FILENAME);
|
||||
assert_snapshot!(python_version, @r#"any"#);
|
||||
|
||||
// Request Python 3.12
|
||||
|
|
@ -64,8 +62,7 @@ fn python_pin() {
|
|||
----- stderr -----
|
||||
"###);
|
||||
|
||||
let python_version =
|
||||
fs_err::read_to_string(context.temp_dir.join(PYTHON_VERSION_FILENAME)).unwrap();
|
||||
let python_version = context.read(PYTHON_VERSION_FILENAME);
|
||||
assert_snapshot!(python_version, @r###"
|
||||
3.12
|
||||
"###);
|
||||
|
|
@ -80,8 +77,7 @@ fn python_pin() {
|
|||
----- stderr -----
|
||||
"###);
|
||||
|
||||
let python_version =
|
||||
fs_err::read_to_string(context.temp_dir.join(PYTHON_VERSION_FILENAME)).unwrap();
|
||||
let python_version = context.read(PYTHON_VERSION_FILENAME);
|
||||
assert_snapshot!(python_version, @r###"
|
||||
3.11
|
||||
"###);
|
||||
|
|
@ -96,8 +92,7 @@ fn python_pin() {
|
|||
----- stderr -----
|
||||
"###);
|
||||
|
||||
let python_version =
|
||||
fs_err::read_to_string(context.temp_dir.join(PYTHON_VERSION_FILENAME)).unwrap();
|
||||
let python_version = context.read(PYTHON_VERSION_FILENAME);
|
||||
assert_snapshot!(python_version, @r###"
|
||||
cpython
|
||||
"###);
|
||||
|
|
@ -112,8 +107,7 @@ fn python_pin() {
|
|||
----- stderr -----
|
||||
"###);
|
||||
|
||||
let python_version =
|
||||
fs_err::read_to_string(context.temp_dir.join(PYTHON_VERSION_FILENAME)).unwrap();
|
||||
let python_version = context.read(PYTHON_VERSION_FILENAME);
|
||||
assert_snapshot!(python_version, @r###"
|
||||
cpython@3.12
|
||||
"###);
|
||||
|
|
@ -128,8 +122,7 @@ fn python_pin() {
|
|||
----- stderr -----
|
||||
"###);
|
||||
|
||||
let python_version =
|
||||
fs_err::read_to_string(context.temp_dir.join(PYTHON_VERSION_FILENAME)).unwrap();
|
||||
let python_version = context.read(PYTHON_VERSION_FILENAME);
|
||||
assert_snapshot!(python_version, @r###"
|
||||
cpython@3.12
|
||||
"###);
|
||||
|
|
@ -144,8 +137,7 @@ fn python_pin() {
|
|||
----- stderr -----
|
||||
"###);
|
||||
|
||||
let python_version =
|
||||
fs_err::read_to_string(context.temp_dir.join(PYTHON_VERSION_FILENAME)).unwrap();
|
||||
let python_version = context.read(PYTHON_VERSION_FILENAME);
|
||||
assert_snapshot!(python_version, @r###"
|
||||
cpython-3.12-any-any-any
|
||||
"###);
|
||||
|
|
@ -160,8 +152,7 @@ fn python_pin() {
|
|||
----- stderr -----
|
||||
"###);
|
||||
|
||||
let python_version =
|
||||
fs_err::read_to_string(context.temp_dir.join(PYTHON_VERSION_FILENAME)).unwrap();
|
||||
let python_version = context.read(PYTHON_VERSION_FILENAME);
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
}, {
|
||||
|
|
@ -184,8 +175,7 @@ fn python_pin() {
|
|||
warning: No interpreter found for PyPy in system path
|
||||
"###);
|
||||
|
||||
let python_version =
|
||||
fs_err::read_to_string(context.temp_dir.join(PYTHON_VERSION_FILENAME)).unwrap();
|
||||
let python_version = context.read(PYTHON_VERSION_FILENAME);
|
||||
assert_snapshot!(python_version, @r###"
|
||||
pypy
|
||||
"###);
|
||||
|
|
@ -205,8 +195,7 @@ fn python_pin() {
|
|||
warning: No interpreter found for Python 3.7 in system path
|
||||
"###);
|
||||
|
||||
let python_version =
|
||||
fs_err::read_to_string(context.temp_dir.join(PYTHON_VERSION_FILENAME)).unwrap();
|
||||
let python_version = context.read(PYTHON_VERSION_FILENAME);
|
||||
assert_snapshot!(python_version, @r###"
|
||||
3.7
|
||||
"###);
|
||||
|
|
@ -315,8 +304,7 @@ fn python_pin_compatible_with_requires_python() -> anyhow::Result<()> {
|
|||
----- stderr -----
|
||||
"###);
|
||||
|
||||
let python_version =
|
||||
fs_err::read_to_string(context.temp_dir.join(PYTHON_VERSION_FILENAME)).unwrap();
|
||||
let python_version = context.read(PYTHON_VERSION_FILENAME);
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
}, {
|
||||
|
|
@ -472,8 +460,7 @@ fn python_pin_resolve() {
|
|||
----- stderr -----
|
||||
"###);
|
||||
|
||||
let python_version =
|
||||
fs_err::read_to_string(context.temp_dir.join(PYTHON_VERSION_FILENAME)).unwrap();
|
||||
let python_version = context.read(PYTHON_VERSION_FILENAME);
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
}, {
|
||||
|
|
@ -492,8 +479,7 @@ fn python_pin_resolve() {
|
|||
----- stderr -----
|
||||
"###);
|
||||
|
||||
let python_version =
|
||||
fs_err::read_to_string(context.temp_dir.join(PYTHON_VERSION_FILENAME)).unwrap();
|
||||
let python_version = context.read(PYTHON_VERSION_FILENAME);
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
}, {
|
||||
|
|
@ -512,8 +498,7 @@ fn python_pin_resolve() {
|
|||
----- stderr -----
|
||||
"###);
|
||||
|
||||
let python_version =
|
||||
fs_err::read_to_string(context.temp_dir.join(PYTHON_VERSION_FILENAME)).unwrap();
|
||||
let python_version = context.read(PYTHON_VERSION_FILENAME);
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
}, {
|
||||
|
|
@ -532,8 +517,7 @@ fn python_pin_resolve() {
|
|||
----- stderr -----
|
||||
"###);
|
||||
|
||||
let python_version =
|
||||
fs_err::read_to_string(context.temp_dir.join(PYTHON_VERSION_FILENAME)).unwrap();
|
||||
let python_version = context.read(PYTHON_VERSION_FILENAME);
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
}, {
|
||||
|
|
@ -552,8 +536,7 @@ fn python_pin_resolve() {
|
|||
----- stderr -----
|
||||
"###);
|
||||
|
||||
let python_version =
|
||||
fs_err::read_to_string(context.temp_dir.join(PYTHON_VERSION_FILENAME)).unwrap();
|
||||
let python_version = context.read(PYTHON_VERSION_FILENAME);
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
}, {
|
||||
|
|
@ -572,8 +555,7 @@ fn python_pin_resolve() {
|
|||
----- stderr -----
|
||||
"###);
|
||||
|
||||
let python_version =
|
||||
fs_err::read_to_string(context.temp_dir.join(PYTHON_VERSION_FILENAME)).unwrap();
|
||||
let python_version = context.read(PYTHON_VERSION_FILENAME);
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
}, {
|
||||
|
|
@ -597,8 +579,7 @@ fn python_pin_resolve() {
|
|||
----- stderr -----
|
||||
"###);
|
||||
|
||||
let python_version =
|
||||
fs_err::read_to_string(context.temp_dir.join(PYTHON_VERSION_FILENAME)).unwrap();
|
||||
let python_version = context.read(PYTHON_VERSION_FILENAME);
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
}, {
|
||||
|
|
@ -619,8 +600,7 @@ fn python_pin_resolve() {
|
|||
error: No interpreter found for PyPy in system path
|
||||
"###);
|
||||
|
||||
let python_version =
|
||||
fs_err::read_to_string(context.temp_dir.join(PYTHON_VERSION_FILENAME)).unwrap();
|
||||
let python_version = context.read(PYTHON_VERSION_FILENAME);
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
}, {
|
||||
|
|
@ -641,8 +621,7 @@ fn python_pin_resolve() {
|
|||
error: No interpreter found for Python 3.7 in system path
|
||||
"###);
|
||||
|
||||
let python_version =
|
||||
fs_err::read_to_string(context.temp_dir.join(PYTHON_VERSION_FILENAME)).unwrap();
|
||||
let python_version = context.read(PYTHON_VERSION_FILENAME);
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
}, {
|
||||
|
|
|
|||
|
|
@ -890,7 +890,7 @@ fn run_locked() -> Result<()> {
|
|||
// Lock the initial requirements.
|
||||
context.lock().assert().success();
|
||||
|
||||
let existing = fs_err::read_to_string(context.temp_dir.child("uv.lock"))?;
|
||||
let existing = context.read("uv.lock");
|
||||
|
||||
// Update the requirements.
|
||||
pyproject_toml.write_str(
|
||||
|
|
@ -918,7 +918,7 @@ fn run_locked() -> Result<()> {
|
|||
error: The lockfile at `uv.lock` needs to be updated, but `--locked` was provided. To update the lockfile, run `uv lock`.
|
||||
"###);
|
||||
|
||||
let updated = fs_err::read_to_string(context.temp_dir.child("uv.lock"))?;
|
||||
let updated = context.read("uv.lock");
|
||||
|
||||
// And the lockfile should be unchanged.
|
||||
assert_eq!(existing, updated);
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ fn locked() -> Result<()> {
|
|||
// Lock the initial requirements.
|
||||
context.lock().assert().success();
|
||||
|
||||
let existing = fs_err::read_to_string(context.temp_dir.child("uv.lock"))?;
|
||||
let existing = context.read("uv.lock");
|
||||
|
||||
// Update the requirements.
|
||||
pyproject_toml.write_str(
|
||||
|
|
@ -109,7 +109,7 @@ fn locked() -> Result<()> {
|
|||
error: The lockfile at `uv.lock` needs to be updated, but `--locked` was provided. To update the lockfile, run `uv lock`.
|
||||
"###);
|
||||
|
||||
let updated = fs_err::read_to_string(context.temp_dir.child("uv.lock"))?;
|
||||
let updated = context.read("uv.lock");
|
||||
|
||||
// And the lockfile should be unchanged.
|
||||
assert_eq!(existing, updated);
|
||||
|
|
@ -855,7 +855,7 @@ fn sync_relative_wheel() -> Result<()> {
|
|||
+ relative-wheel==0.1.0 (from file://[TEMP_DIR]/)
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!(
|
||||
{
|
||||
|
|
@ -1043,12 +1043,12 @@ fn read_metadata_statically_over_the_cache() -> Result<()> {
|
|||
)?;
|
||||
|
||||
context.sync().assert().success();
|
||||
let lock1 = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let lock1 = context.read("uv.lock");
|
||||
// Assert we're reading static metadata.
|
||||
assert!(lock1.contains(">=4,<5"));
|
||||
assert!(!lock1.contains("<5,>=4"));
|
||||
context.sync().assert().success();
|
||||
let lock2 = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let lock2 = context.read("uv.lock");
|
||||
// Assert stability.
|
||||
assert_eq!(lock1, lock2);
|
||||
|
||||
|
|
@ -1381,7 +1381,7 @@ fn convert_to_virtual() -> Result<()> {
|
|||
+ project==0.1.0 (from file://[TEMP_DIR]/)
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -1440,7 +1440,7 @@ fn convert_to_virtual() -> Result<()> {
|
|||
- project==0.1.0 (from file://[TEMP_DIR]/)
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -1508,7 +1508,7 @@ fn convert_to_package() -> Result<()> {
|
|||
+ iniconfig==2.0.0
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -1572,7 +1572,7 @@ fn convert_to_package() -> Result<()> {
|
|||
+ project==0.1.0 (from file://[TEMP_DIR]/)
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap();
|
||||
let lock = context.read("uv.lock");
|
||||
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
@ -2155,8 +2155,7 @@ fn sync_environment_prompt() -> Result<()> {
|
|||
"###);
|
||||
|
||||
// The `pyvenv.cfg` should contain the prompt matching the project name
|
||||
let pyvenv_cfg =
|
||||
fs_err::read_to_string(context.temp_dir.join(".venv").join("pyvenv.cfg")).unwrap();
|
||||
let pyvenv_cfg = context.read(".venv/pyvenv.cfg");
|
||||
|
||||
assert!(pyvenv_cfg.contains("prompt = my-project"));
|
||||
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ fn nested_dependencies() -> Result<()> {
|
|||
);
|
||||
|
||||
// `uv tree` should update the lockfile
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let lock = context.read("uv.lock");
|
||||
assert!(!lock.is_empty());
|
||||
|
||||
Ok(())
|
||||
|
|
@ -144,7 +144,7 @@ fn frozen() -> Result<()> {
|
|||
);
|
||||
|
||||
// `uv tree` should update the lockfile
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let lock = context.read("uv.lock");
|
||||
assert!(!lock.is_empty());
|
||||
|
||||
// Update the project dependencies.
|
||||
|
|
@ -252,7 +252,7 @@ fn platform_dependencies() -> Result<()> {
|
|||
);
|
||||
|
||||
// `uv tree` should update the lockfile
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let lock = context.read("uv.lock");
|
||||
assert!(!lock.is_empty());
|
||||
|
||||
Ok(())
|
||||
|
|
@ -343,7 +343,7 @@ fn repeated_dependencies() -> Result<()> {
|
|||
);
|
||||
|
||||
// `uv tree` should update the lockfile
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let lock = context.read("uv.lock");
|
||||
assert!(!lock.is_empty());
|
||||
|
||||
Ok(())
|
||||
|
|
@ -417,7 +417,7 @@ fn repeated_version() -> Result<()> {
|
|||
);
|
||||
|
||||
// `uv tree` should update the lockfile
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let lock = context.read("uv.lock");
|
||||
assert!(!lock.is_empty());
|
||||
|
||||
Ok(())
|
||||
|
|
@ -458,7 +458,7 @@ fn dev_dependencies() -> Result<()> {
|
|||
);
|
||||
|
||||
// `uv tree` should update the lockfile
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let lock = context.read("uv.lock");
|
||||
assert!(!lock.is_empty());
|
||||
|
||||
Ok(())
|
||||
|
|
@ -501,7 +501,7 @@ fn dev_dependencies_inverted() -> Result<()> {
|
|||
);
|
||||
|
||||
// `uv tree` should update the lockfile
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let lock = context.read("uv.lock");
|
||||
assert!(!lock.is_empty());
|
||||
|
||||
Ok(())
|
||||
|
|
@ -552,7 +552,7 @@ fn optional_dependencies() -> Result<()> {
|
|||
);
|
||||
|
||||
// `uv tree` should update the lockfile
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let lock = context.read("uv.lock");
|
||||
assert!(!lock.is_empty());
|
||||
|
||||
Ok(())
|
||||
|
|
@ -611,7 +611,7 @@ fn optional_dependencies_inverted() -> Result<()> {
|
|||
);
|
||||
|
||||
// `uv tree` should update the lockfile
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let lock = context.read("uv.lock");
|
||||
assert!(!lock.is_empty());
|
||||
|
||||
Ok(())
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ use common::{diff_snapshot, uv_snapshot, TestContext};
|
|||
mod common;
|
||||
|
||||
#[test]
|
||||
fn packse_add_remove_one_package() -> Result<()> {
|
||||
fn packse_add_remove_one_package() {
|
||||
let context = TestContext::new("3.12");
|
||||
context.copy_ecosystem_project("packse");
|
||||
|
||||
|
|
@ -22,7 +22,7 @@ fn packse_add_remove_one_package() -> Result<()> {
|
|||
Resolved 49 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let lock = context.read("uv.lock");
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
}, {
|
||||
|
|
@ -206,19 +206,17 @@ fn packse_add_remove_one_package() -> Result<()> {
|
|||
});
|
||||
|
||||
// Back to where we started.
|
||||
let new_lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let new_lock = context.read("uv.lock");
|
||||
let diff = diff_snapshot(&lock, &new_lock);
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
}, {
|
||||
assert_snapshot!(diff, @r###""###);
|
||||
});
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn packse_add_remove_existing_package_noop() -> Result<()> {
|
||||
fn packse_add_remove_existing_package_noop() {
|
||||
let context = TestContext::new("3.12");
|
||||
context.copy_ecosystem_project("packse");
|
||||
|
||||
|
|
@ -231,7 +229,7 @@ fn packse_add_remove_existing_package_noop() -> Result<()> {
|
|||
Resolved 49 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let lock = context.read("uv.lock");
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
}, {
|
||||
|
|
@ -248,14 +246,12 @@ fn packse_add_remove_existing_package_noop() -> Result<()> {
|
|||
}, {
|
||||
assert_snapshot!(diff, @"");
|
||||
});
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// This test adds a new direct dependency that was already a
|
||||
/// transitive dependency.
|
||||
#[test]
|
||||
fn packse_promote_transitive_to_direct_then_remove() -> Result<()> {
|
||||
fn packse_promote_transitive_to_direct_then_remove() {
|
||||
let context = TestContext::new("3.12");
|
||||
context.copy_ecosystem_project("packse");
|
||||
|
||||
|
|
@ -268,7 +264,7 @@ fn packse_promote_transitive_to_direct_then_remove() -> Result<()> {
|
|||
Resolved 49 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let lock = context.read("uv.lock");
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
}, {
|
||||
|
|
@ -392,15 +388,13 @@ fn packse_promote_transitive_to_direct_then_remove() -> Result<()> {
|
|||
});
|
||||
|
||||
// Back to where we started.
|
||||
let new_lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let new_lock = context.read("uv.lock");
|
||||
let diff = diff_snapshot(&lock, &new_lock);
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
}, {
|
||||
assert_snapshot!(diff, @r###""###);
|
||||
});
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
@ -427,7 +421,7 @@ fn jax_instability() -> Result<()> {
|
|||
Resolved 8 packages in [TIME]
|
||||
"###);
|
||||
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let lock = context.read("uv.lock");
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
}, {
|
||||
|
|
@ -578,7 +572,7 @@ fn jax_instability() -> Result<()> {
|
|||
//
|
||||
// See: https://github.com/astral-sh/uv/issues/6063
|
||||
// See: https://github.com/astral-sh/uv/issues/6158
|
||||
let new_lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let new_lock = context.read("uv.lock");
|
||||
let diff = diff_snapshot(&lock, &new_lock);
|
||||
insta::with_settings!({
|
||||
filters => context.filters(),
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ fn {{module_name}}() -> Result<()> {
|
|||
);
|
||||
|
||||
{{#expected.satisfiable}}
|
||||
let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?;
|
||||
let lock = context.read("uv.lock")();
|
||||
insta::with_settings!({
|
||||
filters => filters,
|
||||
}, {
|
||||
|
|
|
|||
Loading…
Reference in New Issue