diff --git a/crates/uv/tests/ecosystem.rs b/crates/uv/tests/ecosystem.rs index 2299d6366..32f435e83 100644 --- a/crates/uv/tests/ecosystem.rs +++ b/crates/uv/tests/ecosystem.rs @@ -52,7 +52,7 @@ fn transformers() -> Result<()> { if !cfg!(target_os = "linux") && std::env::var_os("CI").is_some() { return Ok(()); } - lock_ecosystem_package_non_deterministic("3.12", "transformers") + lock_ecosystem_package("3.12", "transformers") } // Source: https://github.com/konstin/warehouse/blob/baae127d90417104c8dee3fdd3855e2ba17aa428/pyproject.toml @@ -68,7 +68,7 @@ fn warehouse() -> Result<()> { if !cfg!(target_os = "linux") && std::env::var_os("CI").is_some() { return Ok(()); } - lock_ecosystem_package_non_deterministic("3.11", "warehouse") + lock_ecosystem_package("3.11", "warehouse") } // Currently ignored because the project doesn't build with `uv` yet. @@ -116,33 +116,3 @@ fn lock_ecosystem_package(python_version: &str, name: &str) -> Result<()> { } Ok(()) } - -/// This is like `lock_ecosystem_package`, but does not assert that a -/// re-run of `uv lock` does not change the lock file. -/// -/// Ideally, this routine would never be used. But it was added as -/// a stop-gap to enable at least tracking the lock files of some -/// ecosystem packages even if re-locking is producing different -/// results. -fn lock_ecosystem_package_non_deterministic(python_version: &str, name: &str) -> Result<()> { - let context = TestContext::new(python_version); - context.copy_ecosystem_project(name); - - let mut cmd = context.lock(); - cmd.env("UV_EXCLUDE_NEWER", EXCLUDE_NEWER); - let (snapshot, _) = common::run_and_format( - &mut cmd, - context.filters(), - name, - Some(common::WindowsFilters::Platform), - ); - insta::assert_snapshot!(format!("{name}-uv-lock-output"), snapshot); - - let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap(); - insta::with_settings!({ - filters => context.filters(), - }, { - assert_snapshot!(format!("{name}-lock-file"), lock); - }); - Ok(()) -}