From 72abd43335d074a9ce70c10c945d44ae0dee662f Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Mon, 22 Jul 2024 14:00:36 -0400 Subject: [PATCH] Fix grammar --- crates/uv-resolver/src/version_map.rs | 3 +- crates/uv/tests/lock.rs | 42 +++++++-------------------- 2 files changed, 11 insertions(+), 34 deletions(-) diff --git a/crates/uv-resolver/src/version_map.rs b/crates/uv-resolver/src/version_map.rs index 28e52a2e1ff7..0b8f3cd972a3 100644 --- a/crates/uv-resolver/src/version_map.rs +++ b/crates/uv-resolver/src/version_map.rs @@ -7,8 +7,7 @@ use tracing::instrument; use distribution_filename::{DistFilename, WheelFilename}; use distribution_types::{ HashComparison, IncompatibleSource, IncompatibleWheel, IndexUrl, PrioritizedDist, - PythonRequirementKind, RegistryBuiltWheel, RegistrySourceDist, SourceDistCompatibility, - WheelCompatibility, + RegistryBuiltWheel, RegistrySourceDist, SourceDistCompatibility, WheelCompatibility, }; use pep440_rs::Version; use platform_tags::{IncompatibleTag, TagCompatibility, Tags}; diff --git a/crates/uv/tests/lock.rs b/crates/uv/tests/lock.rs index efc386e43f03..ca2e06086e2e 100644 --- a/crates/uv/tests/lock.rs +++ b/crates/uv/tests/lock.rs @@ -4268,8 +4268,6 @@ fn lock_resolution_mode() -> Result<()> { fn lock_requires_python_no_wheels() -> Result<()> { let context = TestContext::new("3.12"); - let lockfile = context.temp_dir.join("uv.lock"); - let pyproject_toml = context.temp_dir.child("pyproject.toml"); pyproject_toml.write_str( r#" @@ -4281,37 +4279,17 @@ fn lock_requires_python_no_wheels() -> Result<()> { "#, )?; - deterministic! { context => - uv_snapshot!(context.filters(), context.lock(), @r###" - success: true - exit_code: 0 - ----- stdout ----- - - ----- stderr ----- - warning: `uv lock` is experimental and may change without warning - Resolved 6 packages in [TIME] - "###); - - let lock = fs_err::read_to_string(&lockfile).unwrap(); + uv_snapshot!(context.filters(), context.lock(), @r###" + success: false + exit_code: 1 + ----- stdout ----- - insta::with_settings!({ - filters => context.filters(), - }, { - assert_snapshot!( - lock, @r###" - success: false - exit_code: 1 - ----- stdout ----- - - ----- stderr ----- - warning: `uv lock` is experimental and may change without warning - × No solution found when resolving dependencies: - ╰─▶ Because dearpygui==1.9.1 has no wheels are available with a matching Python ABI and project==0.1.0 depends on dearpygui==1.9.1, we can conclude that project==0.1.0 cannot be used. - And because only project==0.1.0 is available and you require project, we can conclude that the requirements are unsatisfiable. - "### - ); - }); - } + ----- stderr ----- + warning: `uv lock` is experimental and may change without warning + × No solution found when resolving dependencies: + ╰─▶ Because dearpygui==1.9.1 has no wheels are available with a matching Python ABI and project==0.1.0 depends on dearpygui==1.9.1, we can conclude that project==0.1.0 cannot be used. + And because only project==0.1.0 is available and you require project, we can conclude that the requirements are unsatisfiable. + "###); Ok(()) }