From 6db2c629062e6502be17af99a6a5163978a8b2db Mon Sep 17 00:00:00 2001 From: konsti Date: Thu, 15 Jan 2026 17:50:10 +0100 Subject: [PATCH] Normalize test snapshots (#17486) This reduces the churn when changing test snapshots, as insta updates the quotes when the contents change. Instead, we decouple it by updating the quotes in bulk here. Created by: ``` cargo insta test --accept --force-update-snapshots ``` --- crates/uv-auth/src/credentials.rs | 6 +- crates/uv-build-backend/src/lib.rs | 46 +- crates/uv-build-backend/src/metadata.rs | 42 +- crates/uv-build-backend/src/wheel.rs | 24 +- crates/uv-build-frontend/src/error.rs | 12 +- crates/uv-cli/src/version.rs | 24 +- crates/uv-client/src/base_client.rs | 2 +- crates/uv-client/src/html.rs | 4 +- .../uv-client/tests/it/user_agent_version.rs | 21 +- crates/uv-configuration/src/proxy_url.rs | 2 +- .../src/expanded_tags.rs | 6 +- crates/uv-distribution-filename/src/wheel.rs | 20 +- .../src/metadata/requires_dist.rs | 37 +- crates/uv-pep508/src/lib.rs | 316 +- crates/uv-pep508/src/marker/tree.rs | 21 +- crates/uv-platform-tags/src/tags.rs | 2898 ++++++++--------- crates/uv-publish/src/lib.rs | 6 +- crates/uv-python/src/sysconfig/mod.rs | 20 +- crates/uv-python/src/sysconfig/parser.rs | 24 +- crates/uv-requirements-txt/src/lib.rs | 44 +- ...__line-endings-poetry-with-hashes.txt.snap | 1 - ...t__test__parse-poetry-with-hashes.txt.snap | 1 - crates/uv-warnings/src/lib.rs | 2 +- crates/uv/tests/it/auth.rs | 94 +- crates/uv/tests/it/branching_urls.rs | 30 +- crates/uv/tests/it/build.rs | 218 +- crates/uv/tests/it/build_backend.rs | 120 +- crates/uv/tests/it/cache.rs | 2 +- crates/uv/tests/it/cache_clean.rs | 14 +- crates/uv/tests/it/cache_prune.rs | 48 +- crates/uv/tests/it/cache_size.rs | 6 +- crates/uv/tests/it/edit.rs | 1430 ++++---- crates/uv/tests/it/export.rs | 276 +- crates/uv/tests/it/extract.rs | 24 +- crates/uv/tests/it/format.rs | 80 +- crates/uv/tests/it/help.rs | 12 +- crates/uv/tests/it/init.rs | 656 ++-- crates/uv/tests/it/lock.rs | 2233 +++++++------ crates/uv/tests/it/lock_conflict.rs | 394 +-- .../tests/it/lock_exclude_newer_relative.rs | 64 +- crates/uv/tests/it/lock_scenarios.rs | 80 +- crates/uv/tests/it/network.rs | 42 +- crates/uv/tests/it/pip_check.rs | 36 +- crates/uv/tests/it/pip_compile.rs | 1646 +++++----- crates/uv/tests/it/pip_compile_scenarios.rs | 140 +- crates/uv/tests/it/pip_debug.rs | 2 +- crates/uv/tests/it/pip_freeze.rs | 62 +- crates/uv/tests/it/pip_install.rs | 1616 ++++----- crates/uv/tests/it/pip_install_scenarios.rs | 186 +- crates/uv/tests/it/pip_list.rs | 168 +- crates/uv/tests/it/pip_show.rs | 96 +- crates/uv/tests/it/pip_sync.rs | 838 ++--- crates/uv/tests/it/pip_tree.rs | 208 +- crates/uv/tests/it/pip_uninstall.rs | 50 +- crates/uv/tests/it/publish.rs | 50 +- crates/uv/tests/it/python_dir.rs | 4 +- crates/uv/tests/it/python_find.rs | 286 +- crates/uv/tests/it/python_install.rs | 501 ++- crates/uv/tests/it/python_list.rs | 102 +- crates/uv/tests/it/python_module.rs | 56 +- crates/uv/tests/it/python_pin.rs | 244 +- crates/uv/tests/it/python_upgrade.rs | 110 +- crates/uv/tests/it/run.rs | 718 ++-- crates/uv/tests/it/show_settings.rs | 14 +- crates/uv/tests/it/sync.rs | 1002 +++--- crates/uv/tests/it/tool_dir.rs | 8 +- crates/uv/tests/it/tool_install.rs | 612 ++-- crates/uv/tests/it/tool_list.rs | 82 +- crates/uv/tests/it/tool_run.rs | 394 +-- crates/uv/tests/it/tool_uninstall.rs | 32 +- crates/uv/tests/it/tool_upgrade.rs | 160 +- crates/uv/tests/it/tree.rs | 174 +- crates/uv/tests/it/venv.rs | 220 +- crates/uv/tests/it/version.rs | 263 +- crates/uv/tests/it/workflow.rs | 22 +- crates/uv/tests/it/workspace.rs | 166 +- crates/uv/tests/it/workspace_dir.rs | 12 +- crates/uv/tests/it/workspace_list.rs | 20 +- crates/uv/tests/it/workspace_metadata.rs | 2 +- 79 files changed, 9841 insertions(+), 9863 deletions(-) diff --git a/crates/uv-auth/src/credentials.rs b/crates/uv-auth/src/credentials.rs index 846b99bd9..f6b7cb29e 100644 --- a/crates/uv-auth/src/credentials.rs +++ b/crates/uv-auth/src/credentials.rs @@ -620,7 +620,7 @@ mod tests { .clone(); header.set_sensitive(false); - assert_debug_snapshot!(header, @r###""Basic dXNlcjpwYXNzd29yZA==""###); + assert_debug_snapshot!(header, @r#""Basic dXNlcjpwYXNzd29yZA==""#); assert_eq!(Credentials::from_header_value(&header), Some(credentials)); } @@ -642,7 +642,7 @@ mod tests { .clone(); header.set_sensitive(false); - assert_debug_snapshot!(header, @r###""Basic dXNlckBkb21haW46cGFzc3dvcmQ=""###); + assert_debug_snapshot!(header, @r#""Basic dXNlckBkb21haW46cGFzc3dvcmQ=""#); assert_eq!(Credentials::from_header_value(&header), Some(credentials)); } @@ -664,7 +664,7 @@ mod tests { .clone(); header.set_sensitive(false); - assert_debug_snapshot!(header, @r###""Basic dXNlcjpwYXNzd29yZD09""###); + assert_debug_snapshot!(header, @r#""Basic dXNlcjpwYXNzd29yZD09""#); assert_eq!(Credentials::from_header_value(&header), Some(credentials)); } diff --git a/crates/uv-build-backend/src/lib.rs b/crates/uv-build-backend/src/lib.rs index a0d2dee22..82ae3f63e 100644 --- a/crates/uv-build-backend/src/lib.rs +++ b/crates/uv-build-backend/src/lib.rs @@ -673,7 +673,7 @@ mod tests { @"bb74bff575b135bb39e5c9bce56349441fb0923bb8857e32a5eaf34ec1843967" ); // Check both the files we report and the actual files - assert_snapshot!(format_file_list(build.source_dist_list_files, src.path()), @r" + assert_snapshot!(format_file_list(build.source_dist_list_files, src.path()), @" built_by_uv-0.1.0/PKG-INFO (generated) built_by_uv-0.1.0/LICENSE-APACHE (LICENSE-APACHE) built_by_uv-0.1.0/LICENSE-MIT (LICENSE-MIT) @@ -690,7 +690,7 @@ mod tests { built_by_uv-0.1.0/src/built_by_uv/cli.py (src/built_by_uv/cli.py) built_by_uv-0.1.0/third-party-licenses/PEP-401.txt (third-party-licenses/PEP-401.txt) "); - assert_snapshot!(build.source_dist_contents.iter().join("\n"), @r" + assert_snapshot!(build.source_dist_contents.iter().join("\n"), @" built_by_uv-0.1.0/ built_by_uv-0.1.0/LICENSE-APACHE built_by_uv-0.1.0/LICENSE-MIT @@ -726,7 +726,7 @@ mod tests { format!("{:x}", sha2::Sha256::digest(fs_err::read(&wheel_path).unwrap())), @"dbe56fd8bd52184095b2e0ea3e83c95d1bc8b4aa53cf469cec5af62251b24abb" ); - assert_snapshot!(build.wheel_contents.join("\n"), @r" + assert_snapshot!(build.wheel_contents.join("\n"), @" built_by_uv-0.1.0.data/data/ built_by_uv-0.1.0.data/data/data.csv built_by_uv-0.1.0.data/headers/ @@ -751,7 +751,7 @@ mod tests { built_by_uv/arithmetic/pi.txt built_by_uv/cli.py "); - assert_snapshot!(format_file_list(build.wheel_list_files, src.path()), @r" + assert_snapshot!(format_file_list(build.wheel_list_files, src.path()), @" built_by_uv/__init__.py (src/built_by_uv/__init__.py) built_by_uv/arithmetic/__init__.py (src/built_by_uv/arithmetic/__init__.py) built_by_uv/arithmetic/circle.py (src/built_by_uv/arithmetic/circle.py) @@ -775,7 +775,7 @@ mod tests { .unwrap() .read_to_string(&mut record) .unwrap(); - assert_snapshot!(record, @r" + assert_snapshot!(record, @" built_by_uv/__init__.py,sha256=AJ7XpTNWxYktP97ydb81UpnNqoebH7K4sHRakAMQKG4,44 built_by_uv/arithmetic/__init__.py,sha256=x2agwFbJAafc9Z6TdJ0K6b6bLMApQdvRSQjP4iy7IEI,67 built_by_uv/arithmetic/circle.py,sha256=FYZkv6KwrF9nJcwGOKigjke1dm1Fkie7qW1lWJoh3AE,287 @@ -856,13 +856,13 @@ mod tests { .read_to_string(&mut metadata) .unwrap(); - assert_snapshot!(metadata, @r###" + assert_snapshot!(metadata, @" Metadata-Version: 2.3 Name: pep-pep639-license Version: 1.0.0 License: Copy carefully. Sincerely, the authors - "###); + "); } /// Test that `build_wheel` works after the `prepare_metadata_for_build_wheel` hook. @@ -930,11 +930,11 @@ mod tests { assert_eq!(metadata_prepared, metadata_wheel); - assert_snapshot!(metadata_wheel, @r###" + assert_snapshot!(metadata_wheel, @" Metadata-Version: 2.3 Name: two-step-build Version: 1.0.0 - "###); + "); } /// Check that non-normalized paths for `module-root` work with the glob inclusions. @@ -965,7 +965,7 @@ mod tests { let dist = TempDir::new().unwrap(); let build1 = build(src.path(), dist.path(), Preview::default()).unwrap(); - assert_snapshot!(build1.source_dist_contents.join("\n"), @r" + assert_snapshot!(build1.source_dist_contents.join("\n"), @" two_step_build-1.0.0/ two_step_build-1.0.0/PKG-INFO two_step_build-1.0.0/pyproject.toml @@ -973,7 +973,7 @@ mod tests { two_step_build-1.0.0/two_step_build/__init__.py "); - assert_snapshot!(build1.wheel_contents.join("\n"), @r" + assert_snapshot!(build1.wheel_contents.join("\n"), @" two_step_build-1.0.0.dist-info/ two_step_build-1.0.0.dist-info/METADATA two_step_build-1.0.0.dist-info/RECORD @@ -1031,7 +1031,7 @@ mod tests { let dist = TempDir::new().unwrap(); let build1 = build(src.path(), dist.path(), Preview::default()).unwrap(); - assert_snapshot!(build1.wheel_contents.join("\n"), @r" + assert_snapshot!(build1.wheel_contents.join("\n"), @" camelCase/ camelCase/__init__.py camelcase-1.0.0.dist-info/ @@ -1250,7 +1250,7 @@ mod tests { let err_message = format_err(&build_err); assert_snapshot!( err_message, - @r" + @" Invalid module name: django@home-stubs Caused by: Invalid character `@` at position 7 for identifier `django@home`, expected an underscore or an alphanumeric character " @@ -1302,7 +1302,7 @@ mod tests { .unwrap(); let build1 = build(src.path(), dist.path(), Preview::default()).unwrap(); - assert_snapshot!(build1.wheel_contents.join("\n"), @r" + assert_snapshot!(build1.wheel_contents.join("\n"), @" stuffed_bird-stubs/ stuffed_bird-stubs/__init__.pyi stuffed_bird_stubs-1.0.0.dist-info/ @@ -1382,7 +1382,7 @@ mod tests { let dist = TempDir::new().unwrap(); let build1 = build(src.path(), dist.path(), Preview::default()).unwrap(); - assert_snapshot!(build1.source_dist_contents.join("\n"), @r" + assert_snapshot!(build1.source_dist_contents.join("\n"), @" simple_namespace_part-1.0.0/ simple_namespace_part-1.0.0/PKG-INFO simple_namespace_part-1.0.0/pyproject.toml @@ -1391,7 +1391,7 @@ mod tests { simple_namespace_part-1.0.0/src/simple_namespace/part simple_namespace_part-1.0.0/src/simple_namespace/part/__init__.py "); - assert_snapshot!(build1.wheel_contents.join("\n"), @r" + assert_snapshot!(build1.wheel_contents.join("\n"), @" simple_namespace/ simple_namespace/part/ simple_namespace/part/__init__.py @@ -1473,7 +1473,7 @@ mod tests { let dist = TempDir::new().unwrap(); let build1 = build(src.path(), dist.path(), Preview::default()).unwrap(); - assert_snapshot!(build1.wheel_contents.join("\n"), @r" + assert_snapshot!(build1.wheel_contents.join("\n"), @" complex_namespace-1.0.0.dist-info/ complex_namespace-1.0.0.dist-info/METADATA complex_namespace-1.0.0.dist-info/RECORD @@ -1544,7 +1544,7 @@ mod tests { let dist = TempDir::new().unwrap(); let build = build(src.path(), dist.path(), Preview::default()).unwrap(); - assert_snapshot!(build.wheel_contents.join("\n"), @r" + assert_snapshot!(build.wheel_contents.join("\n"), @" cloud-stubs/ cloud-stubs/db/ cloud-stubs/db/schema/ @@ -1641,7 +1641,7 @@ mod tests { let dist = TempDir::new().unwrap(); let build = build(src.path(), dist.path(), Preview::default()).unwrap(); - assert_snapshot!(build.source_dist_contents.join("\n"), @r" + assert_snapshot!(build.source_dist_contents.join("\n"), @" simple_namespace_part-1.0.0/ simple_namespace_part-1.0.0/PKG-INFO simple_namespace_part-1.0.0/pyproject.toml @@ -1654,7 +1654,7 @@ mod tests { simple_namespace_part-1.0.0/src/simple_namespace/part_b simple_namespace_part-1.0.0/src/simple_namespace/part_b/__init__.py "); - assert_snapshot!(build.wheel_contents.join("\n"), @r" + assert_snapshot!(build.wheel_contents.join("\n"), @" foo/ foo/__init__.py simple_namespace/ @@ -1755,7 +1755,7 @@ mod tests { let dist = TempDir::new().unwrap(); let build = build(src.path(), dist.path(), Preview::default()).unwrap(); - assert_snapshot!(build.source_dist_contents.join("\n"), @r" + assert_snapshot!(build.source_dist_contents.join("\n"), @" duplicate-1.0.0/ duplicate-1.0.0/PKG-INFO duplicate-1.0.0/pyproject.toml @@ -1766,7 +1766,7 @@ mod tests { duplicate-1.0.0/src/foo duplicate-1.0.0/src/foo/__init__.py "); - assert_snapshot!(build.wheel_contents.join("\n"), @r" + assert_snapshot!(build.wheel_contents.join("\n"), @" bar/ bar/baz/ bar/baz/__init__.py @@ -1814,7 +1814,7 @@ mod tests { ) .unwrap(); - assert_snapshot!(build.wheel_contents.join("\n"), @r" + assert_snapshot!(build.wheel_contents.join("\n"), @" metadata_json_preview-1.0.0.dist-info/ metadata_json_preview-1.0.0.dist-info/METADATA metadata_json_preview-1.0.0.dist-info/METADATA.json diff --git a/crates/uv-build-backend/src/metadata.rs b/crates/uv-build-backend/src/metadata.rs index 1fdc476ad..d2d86603f 100644 --- a/crates/uv-build-backend/src/metadata.rs +++ b/crates/uv-build-backend/src/metadata.rs @@ -950,7 +950,7 @@ mod tests { let temp_dir = TempDir::new().unwrap(); let metadata = pyproject_toml.to_metadata(temp_dir.path()).unwrap(); - assert_snapshot!(metadata.core_metadata_format(), @r" + assert_snapshot!(metadata.core_metadata_format(), @" Metadata-Version: 2.3 Name: Hello-World Version: 0.1.0 @@ -1034,7 +1034,7 @@ mod tests { let pyproject_toml: PyProjectToml = toml::from_str(contents).unwrap(); let metadata = pyproject_toml.to_metadata(temp_dir.path()).unwrap(); - assert_snapshot!(metadata.core_metadata_format(), @r###" + assert_snapshot!(metadata.core_metadata_format(), @r#" Metadata-Version: 2.3 Name: hello-world Version: 0.1.0 @@ -1067,9 +1067,9 @@ mod tests { # Foo This is the foo library. - "###); + "#); - assert_snapshot!(pyproject_toml.to_entry_points().unwrap().unwrap(), @r###" + assert_snapshot!(pyproject_toml.to_entry_points().unwrap().unwrap(), @" [console_scripts] foo = foo.cli:__main__ @@ -1078,8 +1078,7 @@ mod tests { [bar_group] foo-bar = foo:bar - - "###); + "); } #[test] @@ -1128,7 +1127,7 @@ mod tests { let pyproject_toml: PyProjectToml = toml::from_str(contents).unwrap(); let metadata = pyproject_toml.to_metadata(temp_dir.path()).unwrap(); - assert_snapshot!(metadata.core_metadata_format(), @r" + assert_snapshot!(metadata.core_metadata_format(), @" Metadata-Version: 2.3 Name: hello-world Version: 0.1.0 @@ -1220,7 +1219,7 @@ mod tests { let pyproject_toml: PyProjectToml = toml::from_str(contents).unwrap(); let metadata = pyproject_toml.to_metadata(temp_dir.path()).unwrap(); - assert_snapshot!(metadata.core_metadata_format(), @r###" + assert_snapshot!(metadata.core_metadata_format(), @r#" Metadata-Version: 2.3 Name: hello-world Version: 0.1.0 @@ -1260,9 +1259,9 @@ mod tests { # Foo This is the foo library. - "###); + "#); - assert_snapshot!(pyproject_toml.to_entry_points().unwrap().unwrap(), @r###" + assert_snapshot!(pyproject_toml.to_entry_points().unwrap().unwrap(), @" [console_scripts] foo = foo.cli:__main__ @@ -1271,8 +1270,7 @@ mod tests { [bar_group] foo-bar = foo:bar - - "###); + "); } #[test] @@ -1299,7 +1297,7 @@ mod tests { let pyproject_toml: PyProjectToml = toml::from_str(contents).unwrap(); assert_snapshot!( pyproject_toml.check_build_system("0.4.15+test").join("\n"), - @r###"`build_system.requires = ["uv_build"]` is missing an upper bound on the `uv_build` version such as `<0.5`. Without bounding the `uv_build` version, the source distribution will break when a future, breaking version of `uv_build` is released."### + @r#"`build_system.requires = ["uv_build"]` is missing an upper bound on the `uv_build` version such as `<0.5`. Without bounding the `uv_build` version, the source distribution will break when a future, breaking version of `uv_build` is released."# ); } @@ -1353,7 +1351,7 @@ mod tests { let pyproject_toml: PyProjectToml = toml::from_str(contents).unwrap(); assert_snapshot!( pyproject_toml.check_build_system("0.4.15+test").join("\n"), - @r###"The value for `build_system.build-backend` should be `"uv_build"`, not `"setuptools"`"### + @r#"The value for `build_system.build-backend` should be `"uv_build"`, not `"setuptools"`"# ); } @@ -1366,11 +1364,11 @@ mod tests { .to_metadata(Path::new("/do/not/read")) .unwrap(); - assert_snapshot!(metadata.core_metadata_format(), @r###" + assert_snapshot!(metadata.core_metadata_format(), @" Metadata-Version: 2.3 Name: hello-world Version: 0.1.0 - "###); + "); } #[test] @@ -1423,7 +1421,7 @@ mod tests { .unwrap() .to_metadata(Path::new("/do/not/read")) .unwrap_err(); - assert_snapshot!(format_err(err), @r" + assert_snapshot!(format_err(err), @" Invalid project metadata Caused by: `project.description` must be a single line "); @@ -1441,7 +1439,7 @@ mod tests { .unwrap() .to_metadata(Path::new("/do/not/read")) .unwrap_err(); - assert_snapshot!(format_err(err), @r" + assert_snapshot!(format_err(err), @" Invalid project metadata Caused by: When `project.license-files` is defined, `project.license` must be an SPDX expression string "); @@ -1457,12 +1455,12 @@ mod tests { .unwrap() .to_metadata(Path::new("/do/not/read")) .unwrap(); - assert_snapshot!(metadata.core_metadata_format(), @r###" + assert_snapshot!(metadata.core_metadata_format(), @" Metadata-Version: 2.4 Name: hello-world Version: 0.1.0 License-Expression: MIT OR Apache-2.0 - "###); + "); } #[test] @@ -1476,7 +1474,7 @@ mod tests { .to_metadata(Path::new("/do/not/read")) .unwrap_err(); // TODO(konsti): We mess up the indentation in the error. - assert_snapshot!(format_err(err), @r" + assert_snapshot!(format_err(err), @" Invalid project metadata Caused by: `project.license` is not a valid SPDX expression: MIT XOR Apache-2 Caused by: MIT XOR Apache-2 @@ -1495,7 +1493,7 @@ mod tests { .unwrap() .to_metadata(Path::new("/do/not/read")) .unwrap_err(); - assert_snapshot!(format_err(err), @r" + assert_snapshot!(format_err(err), @" Invalid project metadata Caused by: Dynamic metadata is not supported "); diff --git a/crates/uv-build-backend/src/wheel.rs b/crates/uv-build-backend/src/wheel.rs index 7e2da3188..9c7a817c4 100644 --- a/crates/uv-build-backend/src/wheel.rs +++ b/crates/uv-build-backend/src/wheel.rs @@ -884,12 +884,12 @@ mod test { PlatformTag::Any, ); - assert_snapshot!(WheelInfo::new(&filename, "1.0.0+test").to_string(), @r" + assert_snapshot!(WheelInfo::new(&filename, "1.0.0+test").to_string(), @" Wheel-Version: 1.0 Generator: uv 1.0.0+test Root-Is-Purelib: true Tag: py3-none-any - "); + "); } #[test] @@ -902,9 +902,9 @@ mod test { let mut writer = Vec::new(); write_record(&mut writer, "built_by_uv-0.1.0", record).unwrap(); - assert_snapshot!(String::from_utf8(writer).unwrap(), @r" - built_by_uv/__init__.py,sha256=ifhp5To6AGGlLAIz5kQtTXLegKii00BtnqC_05fteGU,37 - built_by_uv-0.1.0/RECORD,, + assert_snapshot!(String::from_utf8(writer).unwrap(), @" + built_by_uv/__init__.py,sha256=ifhp5To6AGGlLAIz5kQtTXLegKii00BtnqC_05fteGU,37 + built_by_uv-0.1.0/RECORD,, "); } @@ -936,18 +936,18 @@ mod test { .filter(|path| !path.is_empty()) .collect(); files.sort(); - assert_snapshot!(files.join("\n"), @r###" + assert_snapshot!(files.join("\n"), @" built_by_uv-0.1.0.dist-info built_by_uv-0.1.0.dist-info/METADATA built_by_uv-0.1.0.dist-info/RECORD built_by_uv-0.1.0.dist-info/WHEEL built_by_uv-0.1.0.dist-info/entry_points.txt - "###); + "); let metadata_file = metadata_dir .path() .join("built_by_uv-0.1.0.dist-info/METADATA"); - assert_snapshot!(fs_err::read_to_string(metadata_file).unwrap(), @r###" + assert_snapshot!(fs_err::read_to_string(metadata_file).unwrap(), @" Metadata-Version: 2.4 Name: built-by-uv Version: 0.1.0 @@ -962,12 +962,12 @@ mod test { # built_by_uv A package to be built with the uv build backend that uses all features exposed by the build backend. - "###); + "); let record_file = metadata_dir .path() .join("built_by_uv-0.1.0.dist-info/RECORD"); - assert_snapshot!(fs_err::read_to_string(record_file).unwrap(), @r" + assert_snapshot!(fs_err::read_to_string(record_file).unwrap(), @" built_by_uv-0.1.0.dist-info/WHEEL,sha256=JBpLtoa_WBz5WPGpRsAUTD4Dz6H0KkkdiKWCkfMSS1U,84 built_by_uv-0.1.0.dist-info/entry_points.txt,sha256=-IO6yaq6x6HSl-zWH96rZmgYvfyHlH00L5WQoCpz-YI,50 built_by_uv-0.1.0.dist-info/METADATA,sha256=m6EkVvKrGmqx43b_VR45LHD37IZxPYC0NI6Qx9_UXLE,474 @@ -977,11 +977,11 @@ mod test { let wheel_file = metadata_dir .path() .join("built_by_uv-0.1.0.dist-info/WHEEL"); - assert_snapshot!(fs_err::read_to_string(wheel_file).unwrap(), @r###" + assert_snapshot!(fs_err::read_to_string(wheel_file).unwrap(), @" Wheel-Version: 1.0 Generator: uv 1.0.0+test Root-Is-Purelib: true Tag: py3-none-any - "###); + "); } } diff --git a/crates/uv-build-frontend/src/error.rs b/crates/uv-build-frontend/src/error.rs index be6b1ab27..9f0cc5233 100644 --- a/crates/uv-build-frontend/src/error.rs +++ b/crates/uv-build-frontend/src/error.rs @@ -512,7 +512,7 @@ mod test { .to_string() .replace("exit status: ", "exit code: "); let formatted = anstream::adapter::strip_str(&formatted); - insta::assert_snapshot!(formatted, @r###" + insta::assert_snapshot!(formatted, @r#" Failed building wheel through setup.py (exit code: 0) [stdout] @@ -534,7 +534,7 @@ mod test { error: command '/usr/bin/gcc' failed with exit code 1 hint: This error likely indicates that you need to install a library that provides "graphviz/cgraph.h" for `pygraphviz-1.11` - "###); + "#); } #[test] @@ -570,7 +570,7 @@ mod test { .to_string() .replace("exit status: ", "exit code: "); let formatted = anstream::adapter::strip_str(&formatted); - insta::assert_snapshot!(formatted, @r###" + insta::assert_snapshot!(formatted, @" Failed building wheel through setup.py (exit code: 0) [stderr] @@ -581,7 +581,7 @@ mod test { error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1 hint: This error likely indicates that you need to install the library that provides a shared library for `ncurses` for `pygraphviz-1.11` (e.g., `libncurses-dev`) - "###); + "); } #[test] @@ -669,7 +669,7 @@ mod test { .to_string() .replace("exit status: ", "exit code: "); let formatted = anstream::adapter::strip_str(&formatted); - insta::assert_snapshot!(formatted, @r###" + insta::assert_snapshot!(formatted, @" Failed building wheel through setup.py (exit code: 0) [stderr] @@ -677,6 +677,6 @@ mod test { ModuleNotFoundError: No module named 'distutils' hint: `distutils` was removed from the standard library in Python 3.12. Consider adding a constraint (like `pygraphviz >1.11`) to avoid building a version of `pygraphviz` that depends on `distutils`. - "###); + "); } } diff --git a/crates/uv-cli/src/version.rs b/crates/uv-cli/src/version.rs index 8ec96e4df..94169873a 100644 --- a/crates/uv-cli/src/version.rs +++ b/crates/uv-cli/src/version.rs @@ -162,17 +162,17 @@ mod tests { }), }; assert_json_snapshot!(version, @r#" - { - "package_name": "uv", - "version": "0.0.0", - "commit_info": { - "short_commit_hash": "53b0f5d92", - "commit_hash": "53b0f5d924110e5b26fbf09f6fd3a03d67b475b7", - "commit_date": "2023-10-19", - "last_tag": "v0.0.1", - "commits_since_last_tag": 0 - } - } - "#); + { + "package_name": "uv", + "version": "0.0.0", + "commit_info": { + "short_commit_hash": "53b0f5d92", + "commit_hash": "53b0f5d924110e5b26fbf09f6fd3a03d67b475b7", + "commit_date": "2023-10-19", + "last_tag": "v0.0.1", + "commits_since_last_tag": 0 + } + } + "#); } } diff --git a/crates/uv-client/src/base_client.rs b/crates/uv-client/src/base_client.rs index 6c73dca3b..c5292da21 100644 --- a/crates/uv-client/src/base_client.rs +++ b/crates/uv-client/src/base_client.rs @@ -1540,7 +1540,7 @@ mod tests { } } - assert_debug_snapshot!(retried, @r" + assert_debug_snapshot!(retried, @" [ 100, 102, diff --git a/crates/uv-client/src/html.rs b/crates/uv-client/src/html.rs index 5cd73fc7e..f39e24ed2 100644 --- a/crates/uv-client/src/html.rs +++ b/crates/uv-client/src/html.rs @@ -1613,7 +1613,7 @@ mod tests { &DisplaySafeUrl::parse("https://pypi.org/simple/pepy/").unwrap(), ) .unwrap(); - insta::assert_debug_snapshot!(result.project_status, @r" + insta::assert_debug_snapshot!(result.project_status, @" ProjectStatus { status: Archived, reason: None, @@ -1716,7 +1716,7 @@ mod tests { text, &DisplaySafeUrl::parse("https://pypi.org/simple/unknownproject/").unwrap(), ); - insta::assert_debug_snapshot!(result.unwrap().project_status, @r" + insta::assert_debug_snapshot!(result.unwrap().project_status, @" ProjectStatus { status: Active, reason: None, diff --git a/crates/uv-client/tests/it/user_agent_version.rs b/crates/uv-client/tests/it/user_agent_version.rs index ac0bc4034..403b95481 100644 --- a/crates/uv-client/tests/it/user_agent_version.rs +++ b/crates/uv-client/tests/it/user_agent_version.rs @@ -250,16 +250,17 @@ async fn test_user_agent_has_linehaul() -> Result<()> { ".name" => "[distro.name]", ".version" => "[distro.version]" // We mock the libc version already - }, @r###" - { - "name": "[distro.name]", - "version": "[distro.version]", - "id": "[distro.id]", - "libc": { - "lib": "glibc", - "version": "2.38" - } - }"### + }, @r#" + { + "name": "[distro.name]", + "version": "[distro.version]", + "id": "[distro.id]", + "libc": { + "lib": "glibc", + "version": "2.38" + } + } + "# ); // Check dynamic values let distro_info = linehaul diff --git a/crates/uv-configuration/src/proxy_url.rs b/crates/uv-configuration/src/proxy_url.rs index 93a4ea610..536e0a51c 100644 --- a/crates/uv-configuration/src/proxy_url.rs +++ b/crates/uv-configuration/src/proxy_url.rs @@ -225,7 +225,7 @@ mod tests { let result: Result = serde_json::from_str(r#""ftp://proxy.example.com:8080""#); insta::assert_snapshot!( result.unwrap_err().to_string(), - @r#"invalid proxy URL scheme `ftp` in `ftp://proxy.example.com:8080/`: expected http, https, socks5, or socks5h"# + @"invalid proxy URL scheme `ftp` in `ftp://proxy.example.com:8080/`: expected http, https, socks5, or socks5h" ); let result: Result = serde_json::from_str(r#""not a url""#); diff --git a/crates/uv-distribution-filename/src/expanded_tags.rs b/crates/uv-distribution-filename/src/expanded_tags.rs index b04898089..1abe02266 100644 --- a/crates/uv-distribution-filename/src/expanded_tags.rs +++ b/crates/uv-distribution-filename/src/expanded_tags.rs @@ -152,7 +152,7 @@ mod tests { fn test_parse_simple_expanded_tag() { let tags = ExpandedTags::parse(vec!["py3-none-any"]).unwrap(); - insta::assert_debug_snapshot!(tags, @r" + insta::assert_debug_snapshot!(tags, @" ExpandedTags( [ Small { @@ -179,7 +179,7 @@ mod tests { ]) .unwrap(); - insta::assert_debug_snapshot!(tags, @r" + insta::assert_debug_snapshot!(tags, @" ExpandedTags( [ Small { @@ -383,7 +383,7 @@ mod tests { assert!(result.is_ok()); let tag = result.unwrap(); - insta::assert_debug_snapshot!(tag, @r" + insta::assert_debug_snapshot!(tag, @" Small { small: WheelTagSmall { python_tag: Python { diff --git a/crates/uv-distribution-filename/src/wheel.rs b/crates/uv-distribution-filename/src/wheel.rs index c3ba40bdf..19a11d3f4 100644 --- a/crates/uv-distribution-filename/src/wheel.rs +++ b/crates/uv-distribution-filename/src/wheel.rs @@ -352,62 +352,62 @@ mod tests { #[test] fn err_not_whl_extension() { let err = WheelFilename::from_str("foo.rs").unwrap_err(); - insta::assert_snapshot!(err, @r###"The wheel filename "foo.rs" is invalid: Must end with .whl"###); + insta::assert_snapshot!(err, @r#"The wheel filename "foo.rs" is invalid: Must end with .whl"#); } #[test] fn err_1_part_empty() { let err = WheelFilename::from_str(".whl").unwrap_err(); - insta::assert_snapshot!(err, @r###"The wheel filename ".whl" is invalid: Must have a version"###); + insta::assert_snapshot!(err, @r#"The wheel filename ".whl" is invalid: Must have a version"#); } #[test] fn err_1_part_no_version() { let err = WheelFilename::from_str("foo.whl").unwrap_err(); - insta::assert_snapshot!(err, @r###"The wheel filename "foo.whl" is invalid: Must have a version"###); + insta::assert_snapshot!(err, @r#"The wheel filename "foo.whl" is invalid: Must have a version"#); } #[test] fn err_2_part_no_pythontag() { let err = WheelFilename::from_str("foo-1.2.3.whl").unwrap_err(); - insta::assert_snapshot!(err, @r###"The wheel filename "foo-1.2.3.whl" is invalid: Must have a Python tag"###); + insta::assert_snapshot!(err, @r#"The wheel filename "foo-1.2.3.whl" is invalid: Must have a Python tag"#); } #[test] fn err_3_part_no_abitag() { let err = WheelFilename::from_str("foo-1.2.3-py3.whl").unwrap_err(); - insta::assert_snapshot!(err, @r###"The wheel filename "foo-1.2.3-py3.whl" is invalid: Must have an ABI tag"###); + insta::assert_snapshot!(err, @r#"The wheel filename "foo-1.2.3-py3.whl" is invalid: Must have an ABI tag"#); } #[test] fn err_4_part_no_platformtag() { let err = WheelFilename::from_str("foo-1.2.3-py3-none.whl").unwrap_err(); - insta::assert_snapshot!(err, @r###"The wheel filename "foo-1.2.3-py3-none.whl" is invalid: Must have a platform tag"###); + insta::assert_snapshot!(err, @r#"The wheel filename "foo-1.2.3-py3-none.whl" is invalid: Must have a platform tag"#); } #[test] fn err_too_many_parts() { let err = WheelFilename::from_str("foo-1.2.3-202206090410-py3-none-any-whoops.whl").unwrap_err(); - insta::assert_snapshot!(err, @r###"The wheel filename "foo-1.2.3-202206090410-py3-none-any-whoops.whl" is invalid: Must have 5 or 6 components, but has more"###); + insta::assert_snapshot!(err, @r#"The wheel filename "foo-1.2.3-202206090410-py3-none-any-whoops.whl" is invalid: Must have 5 or 6 components, but has more"#); } #[test] fn err_invalid_package_name() { let err = WheelFilename::from_str("f!oo-1.2.3-py3-none-any.whl").unwrap_err(); - insta::assert_snapshot!(err, @r###"The wheel filename "f!oo-1.2.3-py3-none-any.whl" has an invalid package name"###); + insta::assert_snapshot!(err, @r#"The wheel filename "f!oo-1.2.3-py3-none-any.whl" has an invalid package name"#); } #[test] fn err_invalid_version() { let err = WheelFilename::from_str("foo-x.y.z-py3-none-any.whl").unwrap_err(); - insta::assert_snapshot!(err, @r###"The wheel filename "foo-x.y.z-py3-none-any.whl" has an invalid version: expected version to start with a number, but no leading ASCII digits were found"###); + insta::assert_snapshot!(err, @r#"The wheel filename "foo-x.y.z-py3-none-any.whl" has an invalid version: expected version to start with a number, but no leading ASCII digits were found"#); } #[test] fn err_invalid_build_tag() { let err = WheelFilename::from_str("foo-1.2.3-tag-py3-none-any.whl").unwrap_err(); - insta::assert_snapshot!(err, @r###"The wheel filename "foo-1.2.3-tag-py3-none-any.whl" has an invalid build tag: must start with a digit"###); + insta::assert_snapshot!(err, @r#"The wheel filename "foo-1.2.3-tag-py3-none-any.whl" has an invalid build tag: must start with a digit"#); } #[test] diff --git a/crates/uv-distribution/src/metadata/requires_dist.rs b/crates/uv-distribution/src/metadata/requires_dist.rs index 2cbf4c6d6..10aab0e07 100644 --- a/crates/uv-distribution/src/metadata/requires_dist.rs +++ b/crates/uv-distribution/src/metadata/requires_dist.rs @@ -509,14 +509,13 @@ mod test { tqdm = true "#}; - assert_snapshot!(format_err(input).await, @r###" + assert_snapshot!(format_err(input).await, @" error: TOML parse error at line 8, column 8 | 8 | tqdm = true | ^^^^ invalid type: boolean `true`, expected a single source (as a map) or list of sources - - "###); + "); } #[tokio::test] @@ -532,13 +531,13 @@ mod test { tqdm = { git = "https://github.com/tqdm/tqdm", rev = "baaaaaab", tag = "v1.0.0" } "#}; - assert_snapshot!(format_err(input).await, @r###" + assert_snapshot!(format_err(input).await, @r#" error: TOML parse error at line 8, column 8 | 8 | tqdm = { git = "https://github.com/tqdm/tqdm", rev = "baaaaaab", tag = "v1.0.0" } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected at most one of `rev`, `tag`, or `branch` - "###); + "#); } #[tokio::test] @@ -575,13 +574,13 @@ mod test { tqdm = { git = "https://github.com/tqdm/tqdm", extra = "torch", group = "dev" } "#}; - assert_snapshot!(format_err(input).await, @r###" + assert_snapshot!(format_err(input).await, @r#" error: TOML parse error at line 7, column 8 | 7 | tqdm = { git = "https://github.com/tqdm/tqdm", extra = "torch", group = "dev" } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot specify both `extra` and `group` - "###); + "#); } #[tokio::test] @@ -597,13 +596,13 @@ mod test { tqdm = { path = "tqdm", index = "torch" } "#}; - assert_snapshot!(format_err(input).await, @r###" + assert_snapshot!(format_err(input).await, @r#" error: TOML parse error at line 8, column 8 | 8 | tqdm = { path = "tqdm", index = "torch" } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot specify both `path` and `index` - "###); + "#); } #[tokio::test] @@ -654,13 +653,13 @@ mod test { tqdm = { url = "§invalid#+#*Ä" } "#}; - assert_snapshot!(format_err(input).await, @r###" + assert_snapshot!(format_err(input).await, @r#" error: TOML parse error at line 8, column 16 | 8 | tqdm = { url = "§invalid#+#*Ä" } | ^^^^^^^^^^^^^^^^^ relative URL without a base: "§invalid#+#*Ä" - "###); + "#); } #[tokio::test] @@ -676,10 +675,10 @@ mod test { tqdm = { workspace = true } "#}; - assert_snapshot!(format_err(input).await, @r###" + assert_snapshot!(format_err(input).await, @" error: Failed to parse entry: `tqdm` Caused by: `tqdm` references a workspace in `tool.uv.sources` (e.g., `tqdm = { workspace = true }`), but is not a workspace member - "###); + "); } #[tokio::test] @@ -695,10 +694,10 @@ mod test { tqdm = { workspace = true } "#}; - assert_snapshot!(format_err(input).await, @r###" + assert_snapshot!(format_err(input).await, @" error: Failed to parse entry: `tqdm` Caused by: `tqdm` references a workspace in `tool.uv.sources` (e.g., `tqdm = { workspace = true }`), but is not a workspace member - "###); + "); } #[tokio::test] @@ -714,9 +713,7 @@ mod test { tqdm = { workspace = true } "#}; - assert_snapshot!(format_err(input).await, @r###" - error: The following field was marked as dynamic: dependencies - "###); + assert_snapshot!(format_err(input).await, @"error: The following field was marked as dynamic: dependencies"); } #[tokio::test] @@ -726,9 +723,7 @@ mod test { tqdm = { workspace = true } "}; - assert_snapshot!(format_err(input).await, @r###" - error: metadata field project not found - "###); + assert_snapshot!(format_err(input).await, @"error: metadata field project not found"); } #[test] diff --git a/crates/uv-pep508/src/lib.rs b/crates/uv-pep508/src/lib.rs index 30c7b9362..dead9c675 100644 --- a/crates/uv-pep508/src/lib.rs +++ b/crates/uv-pep508/src/lib.rs @@ -1131,10 +1131,11 @@ mod tests { fn error_empty() { assert_snapshot!( parse_pep508_err(""), - @r" - Empty field is not allowed for PEP508 + @" + Empty field is not allowed for PEP508 - ^" + ^ + " ); } @@ -1145,7 +1146,8 @@ mod tests { @" Expected package name starting with an alphanumeric character, found `_` _name - ^" + ^ + " ); } @@ -1156,7 +1158,8 @@ mod tests { @" Package name must end with an alphanumeric character, not `_` name_ - ^" + ^ + " ); } @@ -1273,11 +1276,11 @@ mod tests { fn error_extras_eof1() { assert_snapshot!( parse_pep508_err("black["), - @r#" - Missing closing bracket (expected ']', found end of dependency specification) - black[ - ^ - "# + @" + Missing closing bracket (expected ']', found end of dependency specification) + black[ + ^ + " ); } @@ -1285,11 +1288,11 @@ mod tests { fn error_extras_eof2() { assert_snapshot!( parse_pep508_err("black[d"), - @r#" - Missing closing bracket (expected ']', found end of dependency specification) - black[d - ^ - "# + @" + Missing closing bracket (expected ']', found end of dependency specification) + black[d + ^ + " ); } @@ -1297,11 +1300,11 @@ mod tests { fn error_extras_eof3() { assert_snapshot!( parse_pep508_err("black[d,"), - @r#" - Missing closing bracket (expected ']', found end of dependency specification) - black[d, - ^ - "# + @" + Missing closing bracket (expected ']', found end of dependency specification) + black[d, + ^ + " ); } @@ -1309,11 +1312,11 @@ mod tests { fn error_extras_illegal_start1() { assert_snapshot!( parse_pep508_err("black[ö]"), - @r#" - Expected an alphanumeric character starting the extra name, found `ö` - black[ö] - ^ - "# + @" + Expected an alphanumeric character starting the extra name, found `ö` + black[ö] + ^ + " ); } @@ -1321,11 +1324,11 @@ mod tests { fn error_extras_illegal_start2() { assert_snapshot!( parse_pep508_err("black[_d]"), - @r#" - Expected an alphanumeric character starting the extra name, found `_` - black[_d] - ^ - "# + @" + Expected an alphanumeric character starting the extra name, found `_` + black[_d] + ^ + " ); } @@ -1333,11 +1336,11 @@ mod tests { fn error_extras_illegal_start3() { assert_snapshot!( parse_pep508_err("black[,]"), - @r#" - Expected either alphanumerical character (starting the extra name) or `]` (ending the extras section), found `,` - black[,] - ^ - "# + @" + Expected either alphanumerical character (starting the extra name) or `]` (ending the extras section), found `,` + black[,] + ^ + " ); } @@ -1345,11 +1348,11 @@ mod tests { fn error_extras_illegal_character() { assert_snapshot!( parse_pep508_err("black[jüpyter]"), - @r#" - Invalid character in extras name, expected an alphanumeric character, `-`, `_`, `.`, `,` or `]`, found `ü` - black[jüpyter] - ^ - "# + @" + Invalid character in extras name, expected an alphanumeric character, `-`, `_`, `.`, `,` or `]`, found `ü` + black[jüpyter] + ^ + " ); } @@ -1390,7 +1393,8 @@ mod tests { @" Expected an alphanumeric character starting the extra name, found `]` black[d,] - ^" + ^ + " ); } @@ -1398,10 +1402,11 @@ mod tests { fn error_parenthesized_pep440() { assert_snapshot!( parse_pep508_err("numpy ( ><1.19 )"), - @" - no such comparison operator \"><\", must be one of ~= == != <= >= < > === + @r#" + no such comparison operator "><", must be one of ~= == != <= >= < > === numpy ( ><1.19 ) - ^^^^^^^" + ^^^^^^^ + "# ); } @@ -1409,11 +1414,11 @@ mod tests { fn error_parenthesized_parenthesis() { assert_snapshot!( parse_pep508_err("numpy ( >=1.19"), - @r#" - Missing closing parenthesis (expected ')', found end of dependency specification) - numpy ( >=1.19 - ^ - "# + @" + Missing closing parenthesis (expected ')', found end of dependency specification) + numpy ( >=1.19 + ^ + " ); } @@ -1421,11 +1426,11 @@ mod tests { fn error_whats_that() { assert_snapshot!( parse_pep508_err("numpy % 1.16"), - @r#" - Expected one of `@`, `(`, `<`, `=`, `>`, `~`, `!`, `;`, found `%` - numpy % 1.16 - ^ - "# + @" + Expected one of `@`, `(`, `<`, `=`, `>`, `~`, `!`, `;`, found `%` + numpy % 1.16 + ^ + " ); } @@ -1492,11 +1497,11 @@ mod tests { fn error_marker_incomplete1() { assert_snapshot!( parse_pep508_err(r"numpy; sys_platform"), - @r#" - Expected a valid marker operator (such as `>=` or `not in`), found `` - numpy; sys_platform - ^ - "# + @" + Expected a valid marker operator (such as `>=` or `not in`), found `` + numpy; sys_platform + ^ + " ); } @@ -1504,11 +1509,11 @@ mod tests { fn error_marker_incomplete2() { assert_snapshot!( parse_pep508_err(r"numpy; sys_platform =="), - @r#" - Expected marker value, found end of dependency specification - numpy; sys_platform == - ^ - "# + @" + Expected marker value, found end of dependency specification + numpy; sys_platform == + ^ + " ); } @@ -1517,10 +1522,10 @@ mod tests { assert_snapshot!( parse_pep508_err(r#"numpy; sys_platform == "win32" or"#), @r#" - Expected marker value, found end of dependency specification - numpy; sys_platform == "win32" or - ^ - "# + Expected marker value, found end of dependency specification + numpy; sys_platform == "win32" or + ^ + "# ); } @@ -1529,10 +1534,10 @@ mod tests { assert_snapshot!( parse_pep508_err(r#"numpy; sys_platform == "win32" or (os_name == "linux""#), @r#" - Expected ')', found end of dependency specification - numpy; sys_platform == "win32" or (os_name == "linux" - ^ - "# + Expected ')', found end of dependency specification + numpy; sys_platform == "win32" or (os_name == "linux" + ^ + "# ); } @@ -1541,10 +1546,10 @@ mod tests { assert_snapshot!( parse_pep508_err(r#"numpy; sys_platform == "win32" or (os_name == "linux" and"#), @r#" - Expected marker value, found end of dependency specification - numpy; sys_platform == "win32" or (os_name == "linux" and - ^ - "# + Expected marker value, found end of dependency specification + numpy; sys_platform == "win32" or (os_name == "linux" and + ^ + "# ); } @@ -1552,11 +1557,11 @@ mod tests { fn error_pep440() { assert_snapshot!( parse_pep508_err(r"numpy >=1.1.*"), - @r#" - Operator >= cannot be used with a wildcard version specifier - numpy >=1.1.* - ^^^^^^^ - "# + @" + Operator >= cannot be used with a wildcard version specifier + numpy >=1.1.* + ^^^^^^^ + " ); } @@ -1564,11 +1569,11 @@ mod tests { fn error_no_name() { assert_snapshot!( parse_pep508_err(r"==0.0"), - @r" - Expected package name starting with an alphanumeric character, found `=` - ==0.0 - ^ - " + @" + Expected package name starting with an alphanumeric character, found `=` + ==0.0 + ^ + " ); } @@ -1579,7 +1584,8 @@ mod tests { @" URL requirement must be preceded by a package name. Add the name of the package before the URL (e.g., `package_name @ https://...`). git+https://github.com/pallets/flask.git - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + " ); } @@ -1587,11 +1593,11 @@ mod tests { fn error_unnamed_file_path() { assert_snapshot!( parse_pep508_err(r"/path/to/flask.tar.gz"), - @r###" - URL requirement must be preceded by a package name. Add the name of the package before the URL (e.g., `package_name @ /path/to/file`). - /path/to/flask.tar.gz - ^^^^^^^^^^^^^^^^^^^^^ - "### + @" + URL requirement must be preceded by a package name. Add the name of the package before the URL (e.g., `package_name @ /path/to/file`). + /path/to/flask.tar.gz + ^^^^^^^^^^^^^^^^^^^^^ + " ); } @@ -1599,11 +1605,11 @@ mod tests { fn error_no_comma_between_extras() { assert_snapshot!( parse_pep508_err(r"name[bar baz]"), - @r#" - Expected either `,` (separating extras) or `]` (ending the extras section), found `b` - name[bar baz] - ^ - "# + @" + Expected either `,` (separating extras) or `]` (ending the extras section), found `b` + name[bar baz] + ^ + " ); } @@ -1611,11 +1617,11 @@ mod tests { fn error_extra_comma_after_extras() { assert_snapshot!( parse_pep508_err(r"name[bar, baz,]"), - @r#" - Expected an alphanumeric character starting the extra name, found `]` - name[bar, baz,] - ^ - "# + @" + Expected an alphanumeric character starting the extra name, found `]` + name[bar, baz,] + ^ + " ); } @@ -1623,11 +1629,11 @@ mod tests { fn error_extras_not_closed() { assert_snapshot!( parse_pep508_err(r"name[bar, baz >= 1.0"), - @r#" - Expected either `,` (separating extras) or `]` (ending the extras section), found `>` - name[bar, baz >= 1.0 - ^ - "# + @" + Expected either `,` (separating extras) or `]` (ending the extras section), found `>` + name[bar, baz >= 1.0 + ^ + " ); } @@ -1635,11 +1641,11 @@ mod tests { fn error_name_at_nothing() { assert_snapshot!( parse_pep508_err(r"name @"), - @r#" - Expected URL - name @ - ^ - "# + @" + Expected URL + name @ + ^ + " ); } @@ -1647,14 +1653,14 @@ mod tests { fn parse_name_with_star() { assert_snapshot!( parse_pep508_err("wheel-*.whl"), - @r" + @" Package name must end with an alphanumeric character, not `-` wheel-*.whl ^ "); assert_snapshot!( parse_pep508_err("wheelѦ"), - @r" + @" Expected one of `@`, `(`, `<`, `=`, `>`, `~`, `!`, `;`, found `Ѧ` wheelѦ ^ @@ -1665,11 +1671,11 @@ mod tests { fn test_error_invalid_marker_key() { assert_snapshot!( parse_pep508_err(r"name; invalid_name"), - @r#" - Expected a quoted string or a valid marker name, found `invalid_name` - name; invalid_name - ^^^^^^^^^^^^ - "# + @" + Expected a quoted string or a valid marker name, found `invalid_name` + name; invalid_name + ^^^^^^^^^^^^ + " ); } @@ -1677,11 +1683,11 @@ mod tests { fn error_markers_invalid_order() { assert_snapshot!( parse_pep508_err("name; '3.7' <= invalid_name"), - @r#" - Expected a quoted string or a valid marker name, found `invalid_name` - name; '3.7' <= invalid_name - ^^^^^^^^^^^^ - "# + @" + Expected a quoted string or a valid marker name, found `invalid_name` + name; '3.7' <= invalid_name + ^^^^^^^^^^^^ + " ); } @@ -1692,7 +1698,8 @@ mod tests { @" Expected a valid marker operator (such as `>=` or `not in`), found `notin` name; '3.7' notin python_version - ^^^^^" + ^^^^^ + " ); } @@ -1712,11 +1719,11 @@ mod tests { fn error_markers_inpython_version() { assert_snapshot!( parse_pep508_err("name; '3.6'inpython_version"), - @r#" - Expected a valid marker operator (such as `>=` or `not in`), found `inpython_version` - name; '3.6'inpython_version - ^^^^^^^^^^^^^^^^ - "# + @" + Expected a valid marker operator (such as `>=` or `not in`), found `inpython_version` + name; '3.6'inpython_version + ^^^^^^^^^^^^^^^^ + " ); } @@ -1727,7 +1734,8 @@ mod tests { @" Expected `i`, found `p` name; '3.7' not python_version - ^" + ^ + " ); } @@ -1738,7 +1746,8 @@ mod tests { @" Expected a valid marker operator (such as `>=` or `not in`), found `~` name; '3.7' ~ python_version - ^" + ^ + " ); } @@ -1746,11 +1755,11 @@ mod tests { fn error_invalid_prerelease() { assert_snapshot!( parse_pep508_err("name==1.0.org1"), - @r###" - after parsing `1.0`, found `.org1`, which is not part of a valid version - name==1.0.org1 - ^^^^^^^^^^ - "### + @" + after parsing `1.0`, found `.org1`, which is not part of a valid version + name==1.0.org1 + ^^^^^^^^^^ + " ); } @@ -1761,7 +1770,8 @@ mod tests { @" Unexpected end of version specifier, expected version name== - ^^" + ^^ + " ); } @@ -1769,11 +1779,11 @@ mod tests { fn error_no_version_operator() { assert_snapshot!( parse_pep508_err("name 1.0"), - @r#" - Expected one of `@`, `(`, `<`, `=`, `>`, `~`, `!`, `;`, found `1` - name 1.0 - ^ - "# + @" + Expected one of `@`, `(`, `<`, `=`, `>`, `~`, `!`, `;`, found `1` + name 1.0 + ^ + " ); } @@ -1781,11 +1791,11 @@ mod tests { fn error_random_char() { assert_snapshot!( parse_pep508_err("name >= 1.0 #"), - @r##" - Trailing `#` is not allowed - name >= 1.0 # - ^^^^^^^^ - "## + @" + Trailing `#` is not allowed + name >= 1.0 # + ^^^^^^^^ + " ); } @@ -1794,11 +1804,11 @@ mod tests { fn error_invalid_extra_unnamed_url() { assert_snapshot!( parse_unnamed_err("/foo-3.0.0-py3-none-any.whl[d,]"), - @r#" - Expected an alphanumeric character starting the extra name, found `]` - /foo-3.0.0-py3-none-any.whl[d,] - ^ - "# + @" + Expected an alphanumeric character starting the extra name, found `]` + /foo-3.0.0-py3-none-any.whl[d,] + ^ + " ); } diff --git a/crates/uv-pep508/src/marker/tree.rs b/crates/uv-pep508/src/marker/tree.rs index ea175a309..10dd843f7 100644 --- a/crates/uv-pep508/src/marker/tree.rs +++ b/crates/uv-pep508/src/marker/tree.rs @@ -2354,16 +2354,18 @@ mod test { assert_snapshot!( parse_err(r#"python_version == "3.8".* and python_version >= "3.8""#), @r#" - Unexpected character '.', expected 'and', 'or' or end of input - python_version == "3.8".* and python_version >= "3.8" - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"# + Unexpected character '.', expected 'and', 'or' or end of input + python_version == "3.8".* and python_version >= "3.8" + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + "# ); assert_snapshot!( parse_err(r#"python_version == "3.8".*"#), @r#" - Unexpected character '.', expected 'and', 'or' or end of input - python_version == "3.8".* - ^"# + Unexpected character '.', expected 'and', 'or' or end of input + python_version == "3.8".* + ^ + "# ); } @@ -2403,9 +2405,10 @@ mod test { assert_snapshot!( err, @r#" - Unexpected character 'a', expected end of input - os_name == "nt" and python_version >= "3.8" - ^^^^^^^^^^^^^^^^^^^^^^^^^^"# + Unexpected character 'a', expected end of input + os_name == "nt" and python_version >= "3.8" + ^^^^^^^^^^^^^^^^^^^^^^^^^^ + "# ); } diff --git a/crates/uv-platform-tags/src/tags.rs b/crates/uv-platform-tags/src/tags.rs index dd0993678..b33a646bd 100644 --- a/crates/uv-platform-tags/src/tags.rs +++ b/crates/uv-platform-tags/src/tags.rs @@ -1012,30 +1012,30 @@ mod tests { let tags = tags.iter().map(ToString::to_string).collect::>(); assert_debug_snapshot!( tags, - @r###" - [ - "manylinux_2_20_x86_64", - "manylinux_2_19_x86_64", - "manylinux_2_18_x86_64", - "manylinux_2_17_x86_64", - "manylinux2014_x86_64", - "manylinux_2_16_x86_64", - "manylinux_2_15_x86_64", - "manylinux_2_14_x86_64", - "manylinux_2_13_x86_64", - "manylinux_2_12_x86_64", - "manylinux2010_x86_64", - "manylinux_2_11_x86_64", - "manylinux_2_10_x86_64", - "manylinux_2_9_x86_64", - "manylinux_2_8_x86_64", - "manylinux_2_7_x86_64", - "manylinux_2_6_x86_64", - "manylinux_2_5_x86_64", - "manylinux1_x86_64", - "linux_x86_64", - ] - "### + @r#" + [ + "manylinux_2_20_x86_64", + "manylinux_2_19_x86_64", + "manylinux_2_18_x86_64", + "manylinux_2_17_x86_64", + "manylinux2014_x86_64", + "manylinux_2_16_x86_64", + "manylinux_2_15_x86_64", + "manylinux_2_14_x86_64", + "manylinux_2_13_x86_64", + "manylinux_2_12_x86_64", + "manylinux2010_x86_64", + "manylinux_2_11_x86_64", + "manylinux_2_10_x86_64", + "manylinux_2_9_x86_64", + "manylinux_2_8_x86_64", + "manylinux_2_7_x86_64", + "manylinux_2_6_x86_64", + "manylinux_2_5_x86_64", + "manylinux1_x86_64", + "linux_x86_64", + ] + "# ); } @@ -1052,154 +1052,154 @@ mod tests { let tags = tags.iter().map(ToString::to_string).collect::>(); assert_debug_snapshot!( tags, - @r###" - [ - "macosx_21_0_x86_64", - "macosx_21_0_intel", - "macosx_21_0_fat64", - "macosx_21_0_fat32", - "macosx_21_0_universal2", - "macosx_21_0_universal", - "macosx_20_0_x86_64", - "macosx_20_0_intel", - "macosx_20_0_fat64", - "macosx_20_0_fat32", - "macosx_20_0_universal2", - "macosx_20_0_universal", - "macosx_19_0_x86_64", - "macosx_19_0_intel", - "macosx_19_0_fat64", - "macosx_19_0_fat32", - "macosx_19_0_universal2", - "macosx_19_0_universal", - "macosx_18_0_x86_64", - "macosx_18_0_intel", - "macosx_18_0_fat64", - "macosx_18_0_fat32", - "macosx_18_0_universal2", - "macosx_18_0_universal", - "macosx_17_0_x86_64", - "macosx_17_0_intel", - "macosx_17_0_fat64", - "macosx_17_0_fat32", - "macosx_17_0_universal2", - "macosx_17_0_universal", - "macosx_16_0_x86_64", - "macosx_16_0_intel", - "macosx_16_0_fat64", - "macosx_16_0_fat32", - "macosx_16_0_universal2", - "macosx_16_0_universal", - "macosx_15_0_x86_64", - "macosx_15_0_intel", - "macosx_15_0_fat64", - "macosx_15_0_fat32", - "macosx_15_0_universal2", - "macosx_15_0_universal", - "macosx_14_0_x86_64", - "macosx_14_0_intel", - "macosx_14_0_fat64", - "macosx_14_0_fat32", - "macosx_14_0_universal2", - "macosx_14_0_universal", - "macosx_13_0_x86_64", - "macosx_13_0_intel", - "macosx_13_0_fat64", - "macosx_13_0_fat32", - "macosx_13_0_universal2", - "macosx_13_0_universal", - "macosx_12_0_x86_64", - "macosx_12_0_intel", - "macosx_12_0_fat64", - "macosx_12_0_fat32", - "macosx_12_0_universal2", - "macosx_12_0_universal", - "macosx_11_0_x86_64", - "macosx_11_0_intel", - "macosx_11_0_fat64", - "macosx_11_0_fat32", - "macosx_11_0_universal2", - "macosx_11_0_universal", - "macosx_10_16_x86_64", - "macosx_10_16_intel", - "macosx_10_16_fat64", - "macosx_10_16_fat32", - "macosx_10_16_universal2", - "macosx_10_16_universal", - "macosx_10_15_x86_64", - "macosx_10_15_intel", - "macosx_10_15_fat64", - "macosx_10_15_fat32", - "macosx_10_15_universal2", - "macosx_10_15_universal", - "macosx_10_14_x86_64", - "macosx_10_14_intel", - "macosx_10_14_fat64", - "macosx_10_14_fat32", - "macosx_10_14_universal2", - "macosx_10_14_universal", - "macosx_10_13_x86_64", - "macosx_10_13_intel", - "macosx_10_13_fat64", - "macosx_10_13_fat32", - "macosx_10_13_universal2", - "macosx_10_13_universal", - "macosx_10_12_x86_64", - "macosx_10_12_intel", - "macosx_10_12_fat64", - "macosx_10_12_fat32", - "macosx_10_12_universal2", - "macosx_10_12_universal", - "macosx_10_11_x86_64", - "macosx_10_11_intel", - "macosx_10_11_fat64", - "macosx_10_11_fat32", - "macosx_10_11_universal2", - "macosx_10_11_universal", - "macosx_10_10_x86_64", - "macosx_10_10_intel", - "macosx_10_10_fat64", - "macosx_10_10_fat32", - "macosx_10_10_universal2", - "macosx_10_10_universal", - "macosx_10_9_x86_64", - "macosx_10_9_intel", - "macosx_10_9_fat64", - "macosx_10_9_fat32", - "macosx_10_9_universal2", - "macosx_10_9_universal", - "macosx_10_8_x86_64", - "macosx_10_8_intel", - "macosx_10_8_fat64", - "macosx_10_8_fat32", - "macosx_10_8_universal2", - "macosx_10_8_universal", - "macosx_10_7_x86_64", - "macosx_10_7_intel", - "macosx_10_7_fat64", - "macosx_10_7_fat32", - "macosx_10_7_universal2", - "macosx_10_7_universal", - "macosx_10_6_x86_64", - "macosx_10_6_intel", - "macosx_10_6_fat64", - "macosx_10_6_fat32", - "macosx_10_6_universal2", - "macosx_10_6_universal", - "macosx_10_5_x86_64", - "macosx_10_5_intel", - "macosx_10_5_fat64", - "macosx_10_5_fat32", - "macosx_10_5_universal2", - "macosx_10_5_universal", - "macosx_10_4_x86_64", - "macosx_10_4_intel", - "macosx_10_4_fat64", - "macosx_10_4_fat32", - "macosx_10_4_universal2", - "macosx_10_4_universal", - ] - "### + @r#" + [ + "macosx_21_0_x86_64", + "macosx_21_0_intel", + "macosx_21_0_fat64", + "macosx_21_0_fat32", + "macosx_21_0_universal2", + "macosx_21_0_universal", + "macosx_20_0_x86_64", + "macosx_20_0_intel", + "macosx_20_0_fat64", + "macosx_20_0_fat32", + "macosx_20_0_universal2", + "macosx_20_0_universal", + "macosx_19_0_x86_64", + "macosx_19_0_intel", + "macosx_19_0_fat64", + "macosx_19_0_fat32", + "macosx_19_0_universal2", + "macosx_19_0_universal", + "macosx_18_0_x86_64", + "macosx_18_0_intel", + "macosx_18_0_fat64", + "macosx_18_0_fat32", + "macosx_18_0_universal2", + "macosx_18_0_universal", + "macosx_17_0_x86_64", + "macosx_17_0_intel", + "macosx_17_0_fat64", + "macosx_17_0_fat32", + "macosx_17_0_universal2", + "macosx_17_0_universal", + "macosx_16_0_x86_64", + "macosx_16_0_intel", + "macosx_16_0_fat64", + "macosx_16_0_fat32", + "macosx_16_0_universal2", + "macosx_16_0_universal", + "macosx_15_0_x86_64", + "macosx_15_0_intel", + "macosx_15_0_fat64", + "macosx_15_0_fat32", + "macosx_15_0_universal2", + "macosx_15_0_universal", + "macosx_14_0_x86_64", + "macosx_14_0_intel", + "macosx_14_0_fat64", + "macosx_14_0_fat32", + "macosx_14_0_universal2", + "macosx_14_0_universal", + "macosx_13_0_x86_64", + "macosx_13_0_intel", + "macosx_13_0_fat64", + "macosx_13_0_fat32", + "macosx_13_0_universal2", + "macosx_13_0_universal", + "macosx_12_0_x86_64", + "macosx_12_0_intel", + "macosx_12_0_fat64", + "macosx_12_0_fat32", + "macosx_12_0_universal2", + "macosx_12_0_universal", + "macosx_11_0_x86_64", + "macosx_11_0_intel", + "macosx_11_0_fat64", + "macosx_11_0_fat32", + "macosx_11_0_universal2", + "macosx_11_0_universal", + "macosx_10_16_x86_64", + "macosx_10_16_intel", + "macosx_10_16_fat64", + "macosx_10_16_fat32", + "macosx_10_16_universal2", + "macosx_10_16_universal", + "macosx_10_15_x86_64", + "macosx_10_15_intel", + "macosx_10_15_fat64", + "macosx_10_15_fat32", + "macosx_10_15_universal2", + "macosx_10_15_universal", + "macosx_10_14_x86_64", + "macosx_10_14_intel", + "macosx_10_14_fat64", + "macosx_10_14_fat32", + "macosx_10_14_universal2", + "macosx_10_14_universal", + "macosx_10_13_x86_64", + "macosx_10_13_intel", + "macosx_10_13_fat64", + "macosx_10_13_fat32", + "macosx_10_13_universal2", + "macosx_10_13_universal", + "macosx_10_12_x86_64", + "macosx_10_12_intel", + "macosx_10_12_fat64", + "macosx_10_12_fat32", + "macosx_10_12_universal2", + "macosx_10_12_universal", + "macosx_10_11_x86_64", + "macosx_10_11_intel", + "macosx_10_11_fat64", + "macosx_10_11_fat32", + "macosx_10_11_universal2", + "macosx_10_11_universal", + "macosx_10_10_x86_64", + "macosx_10_10_intel", + "macosx_10_10_fat64", + "macosx_10_10_fat32", + "macosx_10_10_universal2", + "macosx_10_10_universal", + "macosx_10_9_x86_64", + "macosx_10_9_intel", + "macosx_10_9_fat64", + "macosx_10_9_fat32", + "macosx_10_9_universal2", + "macosx_10_9_universal", + "macosx_10_8_x86_64", + "macosx_10_8_intel", + "macosx_10_8_fat64", + "macosx_10_8_fat32", + "macosx_10_8_universal2", + "macosx_10_8_universal", + "macosx_10_7_x86_64", + "macosx_10_7_intel", + "macosx_10_7_fat64", + "macosx_10_7_fat32", + "macosx_10_7_universal2", + "macosx_10_7_universal", + "macosx_10_6_x86_64", + "macosx_10_6_intel", + "macosx_10_6_fat64", + "macosx_10_6_fat32", + "macosx_10_6_universal2", + "macosx_10_6_universal", + "macosx_10_5_x86_64", + "macosx_10_5_intel", + "macosx_10_5_fat64", + "macosx_10_5_fat32", + "macosx_10_5_universal2", + "macosx_10_5_universal", + "macosx_10_4_x86_64", + "macosx_10_4_intel", + "macosx_10_4_fat64", + "macosx_10_4_fat32", + "macosx_10_4_universal2", + "macosx_10_4_universal", + ] + "# ); let tags = compatible_tags(&Platform::new( @@ -1213,112 +1213,112 @@ mod tests { let tags = tags.iter().map(ToString::to_string).collect::>(); assert_debug_snapshot!( tags, - @r###" - [ - "macosx_14_0_x86_64", - "macosx_14_0_intel", - "macosx_14_0_fat64", - "macosx_14_0_fat32", - "macosx_14_0_universal2", - "macosx_14_0_universal", - "macosx_13_0_x86_64", - "macosx_13_0_intel", - "macosx_13_0_fat64", - "macosx_13_0_fat32", - "macosx_13_0_universal2", - "macosx_13_0_universal", - "macosx_12_0_x86_64", - "macosx_12_0_intel", - "macosx_12_0_fat64", - "macosx_12_0_fat32", - "macosx_12_0_universal2", - "macosx_12_0_universal", - "macosx_11_0_x86_64", - "macosx_11_0_intel", - "macosx_11_0_fat64", - "macosx_11_0_fat32", - "macosx_11_0_universal2", - "macosx_11_0_universal", - "macosx_10_16_x86_64", - "macosx_10_16_intel", - "macosx_10_16_fat64", - "macosx_10_16_fat32", - "macosx_10_16_universal2", - "macosx_10_16_universal", - "macosx_10_15_x86_64", - "macosx_10_15_intel", - "macosx_10_15_fat64", - "macosx_10_15_fat32", - "macosx_10_15_universal2", - "macosx_10_15_universal", - "macosx_10_14_x86_64", - "macosx_10_14_intel", - "macosx_10_14_fat64", - "macosx_10_14_fat32", - "macosx_10_14_universal2", - "macosx_10_14_universal", - "macosx_10_13_x86_64", - "macosx_10_13_intel", - "macosx_10_13_fat64", - "macosx_10_13_fat32", - "macosx_10_13_universal2", - "macosx_10_13_universal", - "macosx_10_12_x86_64", - "macosx_10_12_intel", - "macosx_10_12_fat64", - "macosx_10_12_fat32", - "macosx_10_12_universal2", - "macosx_10_12_universal", - "macosx_10_11_x86_64", - "macosx_10_11_intel", - "macosx_10_11_fat64", - "macosx_10_11_fat32", - "macosx_10_11_universal2", - "macosx_10_11_universal", - "macosx_10_10_x86_64", - "macosx_10_10_intel", - "macosx_10_10_fat64", - "macosx_10_10_fat32", - "macosx_10_10_universal2", - "macosx_10_10_universal", - "macosx_10_9_x86_64", - "macosx_10_9_intel", - "macosx_10_9_fat64", - "macosx_10_9_fat32", - "macosx_10_9_universal2", - "macosx_10_9_universal", - "macosx_10_8_x86_64", - "macosx_10_8_intel", - "macosx_10_8_fat64", - "macosx_10_8_fat32", - "macosx_10_8_universal2", - "macosx_10_8_universal", - "macosx_10_7_x86_64", - "macosx_10_7_intel", - "macosx_10_7_fat64", - "macosx_10_7_fat32", - "macosx_10_7_universal2", - "macosx_10_7_universal", - "macosx_10_6_x86_64", - "macosx_10_6_intel", - "macosx_10_6_fat64", - "macosx_10_6_fat32", - "macosx_10_6_universal2", - "macosx_10_6_universal", - "macosx_10_5_x86_64", - "macosx_10_5_intel", - "macosx_10_5_fat64", - "macosx_10_5_fat32", - "macosx_10_5_universal2", - "macosx_10_5_universal", - "macosx_10_4_x86_64", - "macosx_10_4_intel", - "macosx_10_4_fat64", - "macosx_10_4_fat32", - "macosx_10_4_universal2", - "macosx_10_4_universal", - ] - "### + @r#" + [ + "macosx_14_0_x86_64", + "macosx_14_0_intel", + "macosx_14_0_fat64", + "macosx_14_0_fat32", + "macosx_14_0_universal2", + "macosx_14_0_universal", + "macosx_13_0_x86_64", + "macosx_13_0_intel", + "macosx_13_0_fat64", + "macosx_13_0_fat32", + "macosx_13_0_universal2", + "macosx_13_0_universal", + "macosx_12_0_x86_64", + "macosx_12_0_intel", + "macosx_12_0_fat64", + "macosx_12_0_fat32", + "macosx_12_0_universal2", + "macosx_12_0_universal", + "macosx_11_0_x86_64", + "macosx_11_0_intel", + "macosx_11_0_fat64", + "macosx_11_0_fat32", + "macosx_11_0_universal2", + "macosx_11_0_universal", + "macosx_10_16_x86_64", + "macosx_10_16_intel", + "macosx_10_16_fat64", + "macosx_10_16_fat32", + "macosx_10_16_universal2", + "macosx_10_16_universal", + "macosx_10_15_x86_64", + "macosx_10_15_intel", + "macosx_10_15_fat64", + "macosx_10_15_fat32", + "macosx_10_15_universal2", + "macosx_10_15_universal", + "macosx_10_14_x86_64", + "macosx_10_14_intel", + "macosx_10_14_fat64", + "macosx_10_14_fat32", + "macosx_10_14_universal2", + "macosx_10_14_universal", + "macosx_10_13_x86_64", + "macosx_10_13_intel", + "macosx_10_13_fat64", + "macosx_10_13_fat32", + "macosx_10_13_universal2", + "macosx_10_13_universal", + "macosx_10_12_x86_64", + "macosx_10_12_intel", + "macosx_10_12_fat64", + "macosx_10_12_fat32", + "macosx_10_12_universal2", + "macosx_10_12_universal", + "macosx_10_11_x86_64", + "macosx_10_11_intel", + "macosx_10_11_fat64", + "macosx_10_11_fat32", + "macosx_10_11_universal2", + "macosx_10_11_universal", + "macosx_10_10_x86_64", + "macosx_10_10_intel", + "macosx_10_10_fat64", + "macosx_10_10_fat32", + "macosx_10_10_universal2", + "macosx_10_10_universal", + "macosx_10_9_x86_64", + "macosx_10_9_intel", + "macosx_10_9_fat64", + "macosx_10_9_fat32", + "macosx_10_9_universal2", + "macosx_10_9_universal", + "macosx_10_8_x86_64", + "macosx_10_8_intel", + "macosx_10_8_fat64", + "macosx_10_8_fat32", + "macosx_10_8_universal2", + "macosx_10_8_universal", + "macosx_10_7_x86_64", + "macosx_10_7_intel", + "macosx_10_7_fat64", + "macosx_10_7_fat32", + "macosx_10_7_universal2", + "macosx_10_7_universal", + "macosx_10_6_x86_64", + "macosx_10_6_intel", + "macosx_10_6_fat64", + "macosx_10_6_fat32", + "macosx_10_6_universal2", + "macosx_10_6_universal", + "macosx_10_5_x86_64", + "macosx_10_5_intel", + "macosx_10_5_fat64", + "macosx_10_5_fat32", + "macosx_10_5_universal2", + "macosx_10_5_universal", + "macosx_10_4_x86_64", + "macosx_10_4_intel", + "macosx_10_4_fat64", + "macosx_10_4_fat32", + "macosx_10_4_universal2", + "macosx_10_4_universal", + ] + "# ); let tags = compatible_tags(&Platform::new( @@ -1332,28 +1332,28 @@ mod tests { let tags = tags.iter().map(ToString::to_string).collect::>(); assert_debug_snapshot!( tags, - @r###" - [ - "macosx_10_6_x86_64", - "macosx_10_6_intel", - "macosx_10_6_fat64", - "macosx_10_6_fat32", - "macosx_10_6_universal2", - "macosx_10_6_universal", - "macosx_10_5_x86_64", - "macosx_10_5_intel", - "macosx_10_5_fat64", - "macosx_10_5_fat32", - "macosx_10_5_universal2", - "macosx_10_5_universal", - "macosx_10_4_x86_64", - "macosx_10_4_intel", - "macosx_10_4_fat64", - "macosx_10_4_fat32", - "macosx_10_4_universal2", - "macosx_10_4_universal", - ] - "### + @r#" + [ + "macosx_10_6_x86_64", + "macosx_10_6_intel", + "macosx_10_6_fat64", + "macosx_10_6_fat32", + "macosx_10_6_universal2", + "macosx_10_6_universal", + "macosx_10_5_x86_64", + "macosx_10_5_intel", + "macosx_10_5_fat64", + "macosx_10_5_fat32", + "macosx_10_5_universal2", + "macosx_10_5_universal", + "macosx_10_4_x86_64", + "macosx_10_4_intel", + "macosx_10_4_fat64", + "macosx_10_4_fat32", + "macosx_10_4_universal2", + "macosx_10_4_universal", + ] + "# ); } @@ -1364,9 +1364,7 @@ mod tests { let tags = tags.iter().map(ToString::to_string).collect::>(); assert_debug_snapshot!( tags, - @r###" - [] - "### + @"[]" ); let tags = @@ -1374,15 +1372,15 @@ mod tests { let tags = tags.iter().map(ToString::to_string).collect::>(); assert_debug_snapshot!( tags, - @r###" - [ - "android_20_arm64_v8a", - "android_19_arm64_v8a", - "android_18_arm64_v8a", - "android_17_arm64_v8a", - "android_16_arm64_v8a", - ] - "### + @r#" + [ + "android_20_arm64_v8a", + "android_19_arm64_v8a", + "android_18_arm64_v8a", + "android_17_arm64_v8a", + "android_16_arm64_v8a", + ] + "# ); } @@ -1400,9 +1398,7 @@ mod tests { let tags = tags.iter().map(ToString::to_string).collect::>(); assert_debug_snapshot!( tags, - @r###" - [] - "### + @"[]" ); let tags = compatible_tags(&Platform::new( @@ -1417,14 +1413,14 @@ mod tests { let tags = tags.iter().map(ToString::to_string).collect::>(); assert_debug_snapshot!( tags, - @r###" - [ - "ios_12_3_arm64_iphoneos", - "ios_12_2_arm64_iphoneos", - "ios_12_1_arm64_iphoneos", - "ios_12_0_arm64_iphoneos", - ] - "### + @r#" + [ + "ios_12_3_arm64_iphoneos", + "ios_12_2_arm64_iphoneos", + "ios_12_1_arm64_iphoneos", + "ios_12_0_arm64_iphoneos", + ] + "# ); let tags = compatible_tags(&Platform::new( @@ -1439,42 +1435,42 @@ mod tests { let tags = tags.iter().map(ToString::to_string).collect::>(); assert_debug_snapshot!( tags, - @r###" - [ - "ios_15_1_arm64_iphoneos", - "ios_15_0_arm64_iphoneos", - "ios_14_9_arm64_iphoneos", - "ios_14_8_arm64_iphoneos", - "ios_14_7_arm64_iphoneos", - "ios_14_6_arm64_iphoneos", - "ios_14_5_arm64_iphoneos", - "ios_14_4_arm64_iphoneos", - "ios_14_3_arm64_iphoneos", - "ios_14_2_arm64_iphoneos", - "ios_14_1_arm64_iphoneos", - "ios_14_0_arm64_iphoneos", - "ios_13_9_arm64_iphoneos", - "ios_13_8_arm64_iphoneos", - "ios_13_7_arm64_iphoneos", - "ios_13_6_arm64_iphoneos", - "ios_13_5_arm64_iphoneos", - "ios_13_4_arm64_iphoneos", - "ios_13_3_arm64_iphoneos", - "ios_13_2_arm64_iphoneos", - "ios_13_1_arm64_iphoneos", - "ios_13_0_arm64_iphoneos", - "ios_12_9_arm64_iphoneos", - "ios_12_8_arm64_iphoneos", - "ios_12_7_arm64_iphoneos", - "ios_12_6_arm64_iphoneos", - "ios_12_5_arm64_iphoneos", - "ios_12_4_arm64_iphoneos", - "ios_12_3_arm64_iphoneos", - "ios_12_2_arm64_iphoneos", - "ios_12_1_arm64_iphoneos", - "ios_12_0_arm64_iphoneos", - ] - "### + @r#" + [ + "ios_15_1_arm64_iphoneos", + "ios_15_0_arm64_iphoneos", + "ios_14_9_arm64_iphoneos", + "ios_14_8_arm64_iphoneos", + "ios_14_7_arm64_iphoneos", + "ios_14_6_arm64_iphoneos", + "ios_14_5_arm64_iphoneos", + "ios_14_4_arm64_iphoneos", + "ios_14_3_arm64_iphoneos", + "ios_14_2_arm64_iphoneos", + "ios_14_1_arm64_iphoneos", + "ios_14_0_arm64_iphoneos", + "ios_13_9_arm64_iphoneos", + "ios_13_8_arm64_iphoneos", + "ios_13_7_arm64_iphoneos", + "ios_13_6_arm64_iphoneos", + "ios_13_5_arm64_iphoneos", + "ios_13_4_arm64_iphoneos", + "ios_13_3_arm64_iphoneos", + "ios_13_2_arm64_iphoneos", + "ios_13_1_arm64_iphoneos", + "ios_13_0_arm64_iphoneos", + "ios_12_9_arm64_iphoneos", + "ios_12_8_arm64_iphoneos", + "ios_12_7_arm64_iphoneos", + "ios_12_6_arm64_iphoneos", + "ios_12_5_arm64_iphoneos", + "ios_12_4_arm64_iphoneos", + "ios_12_3_arm64_iphoneos", + "ios_12_2_arm64_iphoneos", + "ios_12_1_arm64_iphoneos", + "ios_12_0_arm64_iphoneos", + ] + "# ); } @@ -1500,41 +1496,41 @@ mod tests { .unwrap(); assert_snapshot!( tags, - @r###" - cp39-cp39-linux_x86_64 - cp39-abi3-linux_x86_64 - cp39-none-linux_x86_64 - cp38-abi3-linux_x86_64 - cp37-abi3-linux_x86_64 - cp36-abi3-linux_x86_64 - cp35-abi3-linux_x86_64 - cp34-abi3-linux_x86_64 - cp33-abi3-linux_x86_64 - cp32-abi3-linux_x86_64 - py39-none-linux_x86_64 - py3-none-linux_x86_64 - py38-none-linux_x86_64 - py37-none-linux_x86_64 - py36-none-linux_x86_64 - py35-none-linux_x86_64 - py34-none-linux_x86_64 - py33-none-linux_x86_64 - py32-none-linux_x86_64 - py31-none-linux_x86_64 - py30-none-linux_x86_64 - cp39-none-any - py39-none-any - py3-none-any - py38-none-any - py37-none-any - py36-none-any - py35-none-any - py34-none-any - py33-none-any - py32-none-any - py31-none-any - py30-none-any - "###); + @" + cp39-cp39-linux_x86_64 + cp39-abi3-linux_x86_64 + cp39-none-linux_x86_64 + cp38-abi3-linux_x86_64 + cp37-abi3-linux_x86_64 + cp36-abi3-linux_x86_64 + cp35-abi3-linux_x86_64 + cp34-abi3-linux_x86_64 + cp33-abi3-linux_x86_64 + cp32-abi3-linux_x86_64 + py39-none-linux_x86_64 + py3-none-linux_x86_64 + py38-none-linux_x86_64 + py37-none-linux_x86_64 + py36-none-linux_x86_64 + py35-none-linux_x86_64 + py34-none-linux_x86_64 + py33-none-linux_x86_64 + py32-none-linux_x86_64 + py31-none-linux_x86_64 + py30-none-linux_x86_64 + cp39-none-any + py39-none-any + py3-none-any + py38-none-any + py37-none-any + py36-none-any + py35-none-any + py34-none-any + py33-none-any + py32-none-any + py31-none-any + py30-none-any + "); } /// Check full tag ordering. @@ -1564,608 +1560,608 @@ mod tests { .unwrap(); assert_snapshot!( tags, - @r###" - cp39-cp39-manylinux_2_28_x86_64 - cp39-cp39-manylinux_2_27_x86_64 - cp39-cp39-manylinux_2_26_x86_64 - cp39-cp39-manylinux_2_25_x86_64 - cp39-cp39-manylinux_2_24_x86_64 - cp39-cp39-manylinux_2_23_x86_64 - cp39-cp39-manylinux_2_22_x86_64 - cp39-cp39-manylinux_2_21_x86_64 - cp39-cp39-manylinux_2_20_x86_64 - cp39-cp39-manylinux_2_19_x86_64 - cp39-cp39-manylinux_2_18_x86_64 - cp39-cp39-manylinux_2_17_x86_64 - cp39-cp39-manylinux2014_x86_64 - cp39-cp39-manylinux_2_16_x86_64 - cp39-cp39-manylinux_2_15_x86_64 - cp39-cp39-manylinux_2_14_x86_64 - cp39-cp39-manylinux_2_13_x86_64 - cp39-cp39-manylinux_2_12_x86_64 - cp39-cp39-manylinux2010_x86_64 - cp39-cp39-manylinux_2_11_x86_64 - cp39-cp39-manylinux_2_10_x86_64 - cp39-cp39-manylinux_2_9_x86_64 - cp39-cp39-manylinux_2_8_x86_64 - cp39-cp39-manylinux_2_7_x86_64 - cp39-cp39-manylinux_2_6_x86_64 - cp39-cp39-manylinux_2_5_x86_64 - cp39-cp39-manylinux1_x86_64 - cp39-cp39-linux_x86_64 - cp39-abi3-manylinux_2_28_x86_64 - cp39-abi3-manylinux_2_27_x86_64 - cp39-abi3-manylinux_2_26_x86_64 - cp39-abi3-manylinux_2_25_x86_64 - cp39-abi3-manylinux_2_24_x86_64 - cp39-abi3-manylinux_2_23_x86_64 - cp39-abi3-manylinux_2_22_x86_64 - cp39-abi3-manylinux_2_21_x86_64 - cp39-abi3-manylinux_2_20_x86_64 - cp39-abi3-manylinux_2_19_x86_64 - cp39-abi3-manylinux_2_18_x86_64 - cp39-abi3-manylinux_2_17_x86_64 - cp39-abi3-manylinux2014_x86_64 - cp39-abi3-manylinux_2_16_x86_64 - cp39-abi3-manylinux_2_15_x86_64 - cp39-abi3-manylinux_2_14_x86_64 - cp39-abi3-manylinux_2_13_x86_64 - cp39-abi3-manylinux_2_12_x86_64 - cp39-abi3-manylinux2010_x86_64 - cp39-abi3-manylinux_2_11_x86_64 - cp39-abi3-manylinux_2_10_x86_64 - cp39-abi3-manylinux_2_9_x86_64 - cp39-abi3-manylinux_2_8_x86_64 - cp39-abi3-manylinux_2_7_x86_64 - cp39-abi3-manylinux_2_6_x86_64 - cp39-abi3-manylinux_2_5_x86_64 - cp39-abi3-manylinux1_x86_64 - cp39-abi3-linux_x86_64 - cp39-none-manylinux_2_28_x86_64 - cp39-none-manylinux_2_27_x86_64 - cp39-none-manylinux_2_26_x86_64 - cp39-none-manylinux_2_25_x86_64 - cp39-none-manylinux_2_24_x86_64 - cp39-none-manylinux_2_23_x86_64 - cp39-none-manylinux_2_22_x86_64 - cp39-none-manylinux_2_21_x86_64 - cp39-none-manylinux_2_20_x86_64 - cp39-none-manylinux_2_19_x86_64 - cp39-none-manylinux_2_18_x86_64 - cp39-none-manylinux_2_17_x86_64 - cp39-none-manylinux2014_x86_64 - cp39-none-manylinux_2_16_x86_64 - cp39-none-manylinux_2_15_x86_64 - cp39-none-manylinux_2_14_x86_64 - cp39-none-manylinux_2_13_x86_64 - cp39-none-manylinux_2_12_x86_64 - cp39-none-manylinux2010_x86_64 - cp39-none-manylinux_2_11_x86_64 - cp39-none-manylinux_2_10_x86_64 - cp39-none-manylinux_2_9_x86_64 - cp39-none-manylinux_2_8_x86_64 - cp39-none-manylinux_2_7_x86_64 - cp39-none-manylinux_2_6_x86_64 - cp39-none-manylinux_2_5_x86_64 - cp39-none-manylinux1_x86_64 - cp39-none-linux_x86_64 - cp38-abi3-manylinux_2_28_x86_64 - cp38-abi3-manylinux_2_27_x86_64 - cp38-abi3-manylinux_2_26_x86_64 - cp38-abi3-manylinux_2_25_x86_64 - cp38-abi3-manylinux_2_24_x86_64 - cp38-abi3-manylinux_2_23_x86_64 - cp38-abi3-manylinux_2_22_x86_64 - cp38-abi3-manylinux_2_21_x86_64 - cp38-abi3-manylinux_2_20_x86_64 - cp38-abi3-manylinux_2_19_x86_64 - cp38-abi3-manylinux_2_18_x86_64 - cp38-abi3-manylinux_2_17_x86_64 - cp38-abi3-manylinux2014_x86_64 - cp38-abi3-manylinux_2_16_x86_64 - cp38-abi3-manylinux_2_15_x86_64 - cp38-abi3-manylinux_2_14_x86_64 - cp38-abi3-manylinux_2_13_x86_64 - cp38-abi3-manylinux_2_12_x86_64 - cp38-abi3-manylinux2010_x86_64 - cp38-abi3-manylinux_2_11_x86_64 - cp38-abi3-manylinux_2_10_x86_64 - cp38-abi3-manylinux_2_9_x86_64 - cp38-abi3-manylinux_2_8_x86_64 - cp38-abi3-manylinux_2_7_x86_64 - cp38-abi3-manylinux_2_6_x86_64 - cp38-abi3-manylinux_2_5_x86_64 - cp38-abi3-manylinux1_x86_64 - cp38-abi3-linux_x86_64 - cp37-abi3-manylinux_2_28_x86_64 - cp37-abi3-manylinux_2_27_x86_64 - cp37-abi3-manylinux_2_26_x86_64 - cp37-abi3-manylinux_2_25_x86_64 - cp37-abi3-manylinux_2_24_x86_64 - cp37-abi3-manylinux_2_23_x86_64 - cp37-abi3-manylinux_2_22_x86_64 - cp37-abi3-manylinux_2_21_x86_64 - cp37-abi3-manylinux_2_20_x86_64 - cp37-abi3-manylinux_2_19_x86_64 - cp37-abi3-manylinux_2_18_x86_64 - cp37-abi3-manylinux_2_17_x86_64 - cp37-abi3-manylinux2014_x86_64 - cp37-abi3-manylinux_2_16_x86_64 - cp37-abi3-manylinux_2_15_x86_64 - cp37-abi3-manylinux_2_14_x86_64 - cp37-abi3-manylinux_2_13_x86_64 - cp37-abi3-manylinux_2_12_x86_64 - cp37-abi3-manylinux2010_x86_64 - cp37-abi3-manylinux_2_11_x86_64 - cp37-abi3-manylinux_2_10_x86_64 - cp37-abi3-manylinux_2_9_x86_64 - cp37-abi3-manylinux_2_8_x86_64 - cp37-abi3-manylinux_2_7_x86_64 - cp37-abi3-manylinux_2_6_x86_64 - cp37-abi3-manylinux_2_5_x86_64 - cp37-abi3-manylinux1_x86_64 - cp37-abi3-linux_x86_64 - cp36-abi3-manylinux_2_28_x86_64 - cp36-abi3-manylinux_2_27_x86_64 - cp36-abi3-manylinux_2_26_x86_64 - cp36-abi3-manylinux_2_25_x86_64 - cp36-abi3-manylinux_2_24_x86_64 - cp36-abi3-manylinux_2_23_x86_64 - cp36-abi3-manylinux_2_22_x86_64 - cp36-abi3-manylinux_2_21_x86_64 - cp36-abi3-manylinux_2_20_x86_64 - cp36-abi3-manylinux_2_19_x86_64 - cp36-abi3-manylinux_2_18_x86_64 - cp36-abi3-manylinux_2_17_x86_64 - cp36-abi3-manylinux2014_x86_64 - cp36-abi3-manylinux_2_16_x86_64 - cp36-abi3-manylinux_2_15_x86_64 - cp36-abi3-manylinux_2_14_x86_64 - cp36-abi3-manylinux_2_13_x86_64 - cp36-abi3-manylinux_2_12_x86_64 - cp36-abi3-manylinux2010_x86_64 - cp36-abi3-manylinux_2_11_x86_64 - cp36-abi3-manylinux_2_10_x86_64 - cp36-abi3-manylinux_2_9_x86_64 - cp36-abi3-manylinux_2_8_x86_64 - cp36-abi3-manylinux_2_7_x86_64 - cp36-abi3-manylinux_2_6_x86_64 - cp36-abi3-manylinux_2_5_x86_64 - cp36-abi3-manylinux1_x86_64 - cp36-abi3-linux_x86_64 - cp35-abi3-manylinux_2_28_x86_64 - cp35-abi3-manylinux_2_27_x86_64 - cp35-abi3-manylinux_2_26_x86_64 - cp35-abi3-manylinux_2_25_x86_64 - cp35-abi3-manylinux_2_24_x86_64 - cp35-abi3-manylinux_2_23_x86_64 - cp35-abi3-manylinux_2_22_x86_64 - cp35-abi3-manylinux_2_21_x86_64 - cp35-abi3-manylinux_2_20_x86_64 - cp35-abi3-manylinux_2_19_x86_64 - cp35-abi3-manylinux_2_18_x86_64 - cp35-abi3-manylinux_2_17_x86_64 - cp35-abi3-manylinux2014_x86_64 - cp35-abi3-manylinux_2_16_x86_64 - cp35-abi3-manylinux_2_15_x86_64 - cp35-abi3-manylinux_2_14_x86_64 - cp35-abi3-manylinux_2_13_x86_64 - cp35-abi3-manylinux_2_12_x86_64 - cp35-abi3-manylinux2010_x86_64 - cp35-abi3-manylinux_2_11_x86_64 - cp35-abi3-manylinux_2_10_x86_64 - cp35-abi3-manylinux_2_9_x86_64 - cp35-abi3-manylinux_2_8_x86_64 - cp35-abi3-manylinux_2_7_x86_64 - cp35-abi3-manylinux_2_6_x86_64 - cp35-abi3-manylinux_2_5_x86_64 - cp35-abi3-manylinux1_x86_64 - cp35-abi3-linux_x86_64 - cp34-abi3-manylinux_2_28_x86_64 - cp34-abi3-manylinux_2_27_x86_64 - cp34-abi3-manylinux_2_26_x86_64 - cp34-abi3-manylinux_2_25_x86_64 - cp34-abi3-manylinux_2_24_x86_64 - cp34-abi3-manylinux_2_23_x86_64 - cp34-abi3-manylinux_2_22_x86_64 - cp34-abi3-manylinux_2_21_x86_64 - cp34-abi3-manylinux_2_20_x86_64 - cp34-abi3-manylinux_2_19_x86_64 - cp34-abi3-manylinux_2_18_x86_64 - cp34-abi3-manylinux_2_17_x86_64 - cp34-abi3-manylinux2014_x86_64 - cp34-abi3-manylinux_2_16_x86_64 - cp34-abi3-manylinux_2_15_x86_64 - cp34-abi3-manylinux_2_14_x86_64 - cp34-abi3-manylinux_2_13_x86_64 - cp34-abi3-manylinux_2_12_x86_64 - cp34-abi3-manylinux2010_x86_64 - cp34-abi3-manylinux_2_11_x86_64 - cp34-abi3-manylinux_2_10_x86_64 - cp34-abi3-manylinux_2_9_x86_64 - cp34-abi3-manylinux_2_8_x86_64 - cp34-abi3-manylinux_2_7_x86_64 - cp34-abi3-manylinux_2_6_x86_64 - cp34-abi3-manylinux_2_5_x86_64 - cp34-abi3-manylinux1_x86_64 - cp34-abi3-linux_x86_64 - cp33-abi3-manylinux_2_28_x86_64 - cp33-abi3-manylinux_2_27_x86_64 - cp33-abi3-manylinux_2_26_x86_64 - cp33-abi3-manylinux_2_25_x86_64 - cp33-abi3-manylinux_2_24_x86_64 - cp33-abi3-manylinux_2_23_x86_64 - cp33-abi3-manylinux_2_22_x86_64 - cp33-abi3-manylinux_2_21_x86_64 - cp33-abi3-manylinux_2_20_x86_64 - cp33-abi3-manylinux_2_19_x86_64 - cp33-abi3-manylinux_2_18_x86_64 - cp33-abi3-manylinux_2_17_x86_64 - cp33-abi3-manylinux2014_x86_64 - cp33-abi3-manylinux_2_16_x86_64 - cp33-abi3-manylinux_2_15_x86_64 - cp33-abi3-manylinux_2_14_x86_64 - cp33-abi3-manylinux_2_13_x86_64 - cp33-abi3-manylinux_2_12_x86_64 - cp33-abi3-manylinux2010_x86_64 - cp33-abi3-manylinux_2_11_x86_64 - cp33-abi3-manylinux_2_10_x86_64 - cp33-abi3-manylinux_2_9_x86_64 - cp33-abi3-manylinux_2_8_x86_64 - cp33-abi3-manylinux_2_7_x86_64 - cp33-abi3-manylinux_2_6_x86_64 - cp33-abi3-manylinux_2_5_x86_64 - cp33-abi3-manylinux1_x86_64 - cp33-abi3-linux_x86_64 - cp32-abi3-manylinux_2_28_x86_64 - cp32-abi3-manylinux_2_27_x86_64 - cp32-abi3-manylinux_2_26_x86_64 - cp32-abi3-manylinux_2_25_x86_64 - cp32-abi3-manylinux_2_24_x86_64 - cp32-abi3-manylinux_2_23_x86_64 - cp32-abi3-manylinux_2_22_x86_64 - cp32-abi3-manylinux_2_21_x86_64 - cp32-abi3-manylinux_2_20_x86_64 - cp32-abi3-manylinux_2_19_x86_64 - cp32-abi3-manylinux_2_18_x86_64 - cp32-abi3-manylinux_2_17_x86_64 - cp32-abi3-manylinux2014_x86_64 - cp32-abi3-manylinux_2_16_x86_64 - cp32-abi3-manylinux_2_15_x86_64 - cp32-abi3-manylinux_2_14_x86_64 - cp32-abi3-manylinux_2_13_x86_64 - cp32-abi3-manylinux_2_12_x86_64 - cp32-abi3-manylinux2010_x86_64 - cp32-abi3-manylinux_2_11_x86_64 - cp32-abi3-manylinux_2_10_x86_64 - cp32-abi3-manylinux_2_9_x86_64 - cp32-abi3-manylinux_2_8_x86_64 - cp32-abi3-manylinux_2_7_x86_64 - cp32-abi3-manylinux_2_6_x86_64 - cp32-abi3-manylinux_2_5_x86_64 - cp32-abi3-manylinux1_x86_64 - cp32-abi3-linux_x86_64 - py39-none-manylinux_2_28_x86_64 - py39-none-manylinux_2_27_x86_64 - py39-none-manylinux_2_26_x86_64 - py39-none-manylinux_2_25_x86_64 - py39-none-manylinux_2_24_x86_64 - py39-none-manylinux_2_23_x86_64 - py39-none-manylinux_2_22_x86_64 - py39-none-manylinux_2_21_x86_64 - py39-none-manylinux_2_20_x86_64 - py39-none-manylinux_2_19_x86_64 - py39-none-manylinux_2_18_x86_64 - py39-none-manylinux_2_17_x86_64 - py39-none-manylinux2014_x86_64 - py39-none-manylinux_2_16_x86_64 - py39-none-manylinux_2_15_x86_64 - py39-none-manylinux_2_14_x86_64 - py39-none-manylinux_2_13_x86_64 - py39-none-manylinux_2_12_x86_64 - py39-none-manylinux2010_x86_64 - py39-none-manylinux_2_11_x86_64 - py39-none-manylinux_2_10_x86_64 - py39-none-manylinux_2_9_x86_64 - py39-none-manylinux_2_8_x86_64 - py39-none-manylinux_2_7_x86_64 - py39-none-manylinux_2_6_x86_64 - py39-none-manylinux_2_5_x86_64 - py39-none-manylinux1_x86_64 - py39-none-linux_x86_64 - py3-none-manylinux_2_28_x86_64 - py3-none-manylinux_2_27_x86_64 - py3-none-manylinux_2_26_x86_64 - py3-none-manylinux_2_25_x86_64 - py3-none-manylinux_2_24_x86_64 - py3-none-manylinux_2_23_x86_64 - py3-none-manylinux_2_22_x86_64 - py3-none-manylinux_2_21_x86_64 - py3-none-manylinux_2_20_x86_64 - py3-none-manylinux_2_19_x86_64 - py3-none-manylinux_2_18_x86_64 - py3-none-manylinux_2_17_x86_64 - py3-none-manylinux2014_x86_64 - py3-none-manylinux_2_16_x86_64 - py3-none-manylinux_2_15_x86_64 - py3-none-manylinux_2_14_x86_64 - py3-none-manylinux_2_13_x86_64 - py3-none-manylinux_2_12_x86_64 - py3-none-manylinux2010_x86_64 - py3-none-manylinux_2_11_x86_64 - py3-none-manylinux_2_10_x86_64 - py3-none-manylinux_2_9_x86_64 - py3-none-manylinux_2_8_x86_64 - py3-none-manylinux_2_7_x86_64 - py3-none-manylinux_2_6_x86_64 - py3-none-manylinux_2_5_x86_64 - py3-none-manylinux1_x86_64 - py3-none-linux_x86_64 - py38-none-manylinux_2_28_x86_64 - py38-none-manylinux_2_27_x86_64 - py38-none-manylinux_2_26_x86_64 - py38-none-manylinux_2_25_x86_64 - py38-none-manylinux_2_24_x86_64 - py38-none-manylinux_2_23_x86_64 - py38-none-manylinux_2_22_x86_64 - py38-none-manylinux_2_21_x86_64 - py38-none-manylinux_2_20_x86_64 - py38-none-manylinux_2_19_x86_64 - py38-none-manylinux_2_18_x86_64 - py38-none-manylinux_2_17_x86_64 - py38-none-manylinux2014_x86_64 - py38-none-manylinux_2_16_x86_64 - py38-none-manylinux_2_15_x86_64 - py38-none-manylinux_2_14_x86_64 - py38-none-manylinux_2_13_x86_64 - py38-none-manylinux_2_12_x86_64 - py38-none-manylinux2010_x86_64 - py38-none-manylinux_2_11_x86_64 - py38-none-manylinux_2_10_x86_64 - py38-none-manylinux_2_9_x86_64 - py38-none-manylinux_2_8_x86_64 - py38-none-manylinux_2_7_x86_64 - py38-none-manylinux_2_6_x86_64 - py38-none-manylinux_2_5_x86_64 - py38-none-manylinux1_x86_64 - py38-none-linux_x86_64 - py37-none-manylinux_2_28_x86_64 - py37-none-manylinux_2_27_x86_64 - py37-none-manylinux_2_26_x86_64 - py37-none-manylinux_2_25_x86_64 - py37-none-manylinux_2_24_x86_64 - py37-none-manylinux_2_23_x86_64 - py37-none-manylinux_2_22_x86_64 - py37-none-manylinux_2_21_x86_64 - py37-none-manylinux_2_20_x86_64 - py37-none-manylinux_2_19_x86_64 - py37-none-manylinux_2_18_x86_64 - py37-none-manylinux_2_17_x86_64 - py37-none-manylinux2014_x86_64 - py37-none-manylinux_2_16_x86_64 - py37-none-manylinux_2_15_x86_64 - py37-none-manylinux_2_14_x86_64 - py37-none-manylinux_2_13_x86_64 - py37-none-manylinux_2_12_x86_64 - py37-none-manylinux2010_x86_64 - py37-none-manylinux_2_11_x86_64 - py37-none-manylinux_2_10_x86_64 - py37-none-manylinux_2_9_x86_64 - py37-none-manylinux_2_8_x86_64 - py37-none-manylinux_2_7_x86_64 - py37-none-manylinux_2_6_x86_64 - py37-none-manylinux_2_5_x86_64 - py37-none-manylinux1_x86_64 - py37-none-linux_x86_64 - py36-none-manylinux_2_28_x86_64 - py36-none-manylinux_2_27_x86_64 - py36-none-manylinux_2_26_x86_64 - py36-none-manylinux_2_25_x86_64 - py36-none-manylinux_2_24_x86_64 - py36-none-manylinux_2_23_x86_64 - py36-none-manylinux_2_22_x86_64 - py36-none-manylinux_2_21_x86_64 - py36-none-manylinux_2_20_x86_64 - py36-none-manylinux_2_19_x86_64 - py36-none-manylinux_2_18_x86_64 - py36-none-manylinux_2_17_x86_64 - py36-none-manylinux2014_x86_64 - py36-none-manylinux_2_16_x86_64 - py36-none-manylinux_2_15_x86_64 - py36-none-manylinux_2_14_x86_64 - py36-none-manylinux_2_13_x86_64 - py36-none-manylinux_2_12_x86_64 - py36-none-manylinux2010_x86_64 - py36-none-manylinux_2_11_x86_64 - py36-none-manylinux_2_10_x86_64 - py36-none-manylinux_2_9_x86_64 - py36-none-manylinux_2_8_x86_64 - py36-none-manylinux_2_7_x86_64 - py36-none-manylinux_2_6_x86_64 - py36-none-manylinux_2_5_x86_64 - py36-none-manylinux1_x86_64 - py36-none-linux_x86_64 - py35-none-manylinux_2_28_x86_64 - py35-none-manylinux_2_27_x86_64 - py35-none-manylinux_2_26_x86_64 - py35-none-manylinux_2_25_x86_64 - py35-none-manylinux_2_24_x86_64 - py35-none-manylinux_2_23_x86_64 - py35-none-manylinux_2_22_x86_64 - py35-none-manylinux_2_21_x86_64 - py35-none-manylinux_2_20_x86_64 - py35-none-manylinux_2_19_x86_64 - py35-none-manylinux_2_18_x86_64 - py35-none-manylinux_2_17_x86_64 - py35-none-manylinux2014_x86_64 - py35-none-manylinux_2_16_x86_64 - py35-none-manylinux_2_15_x86_64 - py35-none-manylinux_2_14_x86_64 - py35-none-manylinux_2_13_x86_64 - py35-none-manylinux_2_12_x86_64 - py35-none-manylinux2010_x86_64 - py35-none-manylinux_2_11_x86_64 - py35-none-manylinux_2_10_x86_64 - py35-none-manylinux_2_9_x86_64 - py35-none-manylinux_2_8_x86_64 - py35-none-manylinux_2_7_x86_64 - py35-none-manylinux_2_6_x86_64 - py35-none-manylinux_2_5_x86_64 - py35-none-manylinux1_x86_64 - py35-none-linux_x86_64 - py34-none-manylinux_2_28_x86_64 - py34-none-manylinux_2_27_x86_64 - py34-none-manylinux_2_26_x86_64 - py34-none-manylinux_2_25_x86_64 - py34-none-manylinux_2_24_x86_64 - py34-none-manylinux_2_23_x86_64 - py34-none-manylinux_2_22_x86_64 - py34-none-manylinux_2_21_x86_64 - py34-none-manylinux_2_20_x86_64 - py34-none-manylinux_2_19_x86_64 - py34-none-manylinux_2_18_x86_64 - py34-none-manylinux_2_17_x86_64 - py34-none-manylinux2014_x86_64 - py34-none-manylinux_2_16_x86_64 - py34-none-manylinux_2_15_x86_64 - py34-none-manylinux_2_14_x86_64 - py34-none-manylinux_2_13_x86_64 - py34-none-manylinux_2_12_x86_64 - py34-none-manylinux2010_x86_64 - py34-none-manylinux_2_11_x86_64 - py34-none-manylinux_2_10_x86_64 - py34-none-manylinux_2_9_x86_64 - py34-none-manylinux_2_8_x86_64 - py34-none-manylinux_2_7_x86_64 - py34-none-manylinux_2_6_x86_64 - py34-none-manylinux_2_5_x86_64 - py34-none-manylinux1_x86_64 - py34-none-linux_x86_64 - py33-none-manylinux_2_28_x86_64 - py33-none-manylinux_2_27_x86_64 - py33-none-manylinux_2_26_x86_64 - py33-none-manylinux_2_25_x86_64 - py33-none-manylinux_2_24_x86_64 - py33-none-manylinux_2_23_x86_64 - py33-none-manylinux_2_22_x86_64 - py33-none-manylinux_2_21_x86_64 - py33-none-manylinux_2_20_x86_64 - py33-none-manylinux_2_19_x86_64 - py33-none-manylinux_2_18_x86_64 - py33-none-manylinux_2_17_x86_64 - py33-none-manylinux2014_x86_64 - py33-none-manylinux_2_16_x86_64 - py33-none-manylinux_2_15_x86_64 - py33-none-manylinux_2_14_x86_64 - py33-none-manylinux_2_13_x86_64 - py33-none-manylinux_2_12_x86_64 - py33-none-manylinux2010_x86_64 - py33-none-manylinux_2_11_x86_64 - py33-none-manylinux_2_10_x86_64 - py33-none-manylinux_2_9_x86_64 - py33-none-manylinux_2_8_x86_64 - py33-none-manylinux_2_7_x86_64 - py33-none-manylinux_2_6_x86_64 - py33-none-manylinux_2_5_x86_64 - py33-none-manylinux1_x86_64 - py33-none-linux_x86_64 - py32-none-manylinux_2_28_x86_64 - py32-none-manylinux_2_27_x86_64 - py32-none-manylinux_2_26_x86_64 - py32-none-manylinux_2_25_x86_64 - py32-none-manylinux_2_24_x86_64 - py32-none-manylinux_2_23_x86_64 - py32-none-manylinux_2_22_x86_64 - py32-none-manylinux_2_21_x86_64 - py32-none-manylinux_2_20_x86_64 - py32-none-manylinux_2_19_x86_64 - py32-none-manylinux_2_18_x86_64 - py32-none-manylinux_2_17_x86_64 - py32-none-manylinux2014_x86_64 - py32-none-manylinux_2_16_x86_64 - py32-none-manylinux_2_15_x86_64 - py32-none-manylinux_2_14_x86_64 - py32-none-manylinux_2_13_x86_64 - py32-none-manylinux_2_12_x86_64 - py32-none-manylinux2010_x86_64 - py32-none-manylinux_2_11_x86_64 - py32-none-manylinux_2_10_x86_64 - py32-none-manylinux_2_9_x86_64 - py32-none-manylinux_2_8_x86_64 - py32-none-manylinux_2_7_x86_64 - py32-none-manylinux_2_6_x86_64 - py32-none-manylinux_2_5_x86_64 - py32-none-manylinux1_x86_64 - py32-none-linux_x86_64 - py31-none-manylinux_2_28_x86_64 - py31-none-manylinux_2_27_x86_64 - py31-none-manylinux_2_26_x86_64 - py31-none-manylinux_2_25_x86_64 - py31-none-manylinux_2_24_x86_64 - py31-none-manylinux_2_23_x86_64 - py31-none-manylinux_2_22_x86_64 - py31-none-manylinux_2_21_x86_64 - py31-none-manylinux_2_20_x86_64 - py31-none-manylinux_2_19_x86_64 - py31-none-manylinux_2_18_x86_64 - py31-none-manylinux_2_17_x86_64 - py31-none-manylinux2014_x86_64 - py31-none-manylinux_2_16_x86_64 - py31-none-manylinux_2_15_x86_64 - py31-none-manylinux_2_14_x86_64 - py31-none-manylinux_2_13_x86_64 - py31-none-manylinux_2_12_x86_64 - py31-none-manylinux2010_x86_64 - py31-none-manylinux_2_11_x86_64 - py31-none-manylinux_2_10_x86_64 - py31-none-manylinux_2_9_x86_64 - py31-none-manylinux_2_8_x86_64 - py31-none-manylinux_2_7_x86_64 - py31-none-manylinux_2_6_x86_64 - py31-none-manylinux_2_5_x86_64 - py31-none-manylinux1_x86_64 - py31-none-linux_x86_64 - py30-none-manylinux_2_28_x86_64 - py30-none-manylinux_2_27_x86_64 - py30-none-manylinux_2_26_x86_64 - py30-none-manylinux_2_25_x86_64 - py30-none-manylinux_2_24_x86_64 - py30-none-manylinux_2_23_x86_64 - py30-none-manylinux_2_22_x86_64 - py30-none-manylinux_2_21_x86_64 - py30-none-manylinux_2_20_x86_64 - py30-none-manylinux_2_19_x86_64 - py30-none-manylinux_2_18_x86_64 - py30-none-manylinux_2_17_x86_64 - py30-none-manylinux2014_x86_64 - py30-none-manylinux_2_16_x86_64 - py30-none-manylinux_2_15_x86_64 - py30-none-manylinux_2_14_x86_64 - py30-none-manylinux_2_13_x86_64 - py30-none-manylinux_2_12_x86_64 - py30-none-manylinux2010_x86_64 - py30-none-manylinux_2_11_x86_64 - py30-none-manylinux_2_10_x86_64 - py30-none-manylinux_2_9_x86_64 - py30-none-manylinux_2_8_x86_64 - py30-none-manylinux_2_7_x86_64 - py30-none-manylinux_2_6_x86_64 - py30-none-manylinux_2_5_x86_64 - py30-none-manylinux1_x86_64 - py30-none-linux_x86_64 - cp39-none-any - py39-none-any - py3-none-any - py38-none-any - py37-none-any - py36-none-any - py35-none-any - py34-none-any - py33-none-any - py32-none-any - py31-none-any - py30-none-any - "### + @" + cp39-cp39-manylinux_2_28_x86_64 + cp39-cp39-manylinux_2_27_x86_64 + cp39-cp39-manylinux_2_26_x86_64 + cp39-cp39-manylinux_2_25_x86_64 + cp39-cp39-manylinux_2_24_x86_64 + cp39-cp39-manylinux_2_23_x86_64 + cp39-cp39-manylinux_2_22_x86_64 + cp39-cp39-manylinux_2_21_x86_64 + cp39-cp39-manylinux_2_20_x86_64 + cp39-cp39-manylinux_2_19_x86_64 + cp39-cp39-manylinux_2_18_x86_64 + cp39-cp39-manylinux_2_17_x86_64 + cp39-cp39-manylinux2014_x86_64 + cp39-cp39-manylinux_2_16_x86_64 + cp39-cp39-manylinux_2_15_x86_64 + cp39-cp39-manylinux_2_14_x86_64 + cp39-cp39-manylinux_2_13_x86_64 + cp39-cp39-manylinux_2_12_x86_64 + cp39-cp39-manylinux2010_x86_64 + cp39-cp39-manylinux_2_11_x86_64 + cp39-cp39-manylinux_2_10_x86_64 + cp39-cp39-manylinux_2_9_x86_64 + cp39-cp39-manylinux_2_8_x86_64 + cp39-cp39-manylinux_2_7_x86_64 + cp39-cp39-manylinux_2_6_x86_64 + cp39-cp39-manylinux_2_5_x86_64 + cp39-cp39-manylinux1_x86_64 + cp39-cp39-linux_x86_64 + cp39-abi3-manylinux_2_28_x86_64 + cp39-abi3-manylinux_2_27_x86_64 + cp39-abi3-manylinux_2_26_x86_64 + cp39-abi3-manylinux_2_25_x86_64 + cp39-abi3-manylinux_2_24_x86_64 + cp39-abi3-manylinux_2_23_x86_64 + cp39-abi3-manylinux_2_22_x86_64 + cp39-abi3-manylinux_2_21_x86_64 + cp39-abi3-manylinux_2_20_x86_64 + cp39-abi3-manylinux_2_19_x86_64 + cp39-abi3-manylinux_2_18_x86_64 + cp39-abi3-manylinux_2_17_x86_64 + cp39-abi3-manylinux2014_x86_64 + cp39-abi3-manylinux_2_16_x86_64 + cp39-abi3-manylinux_2_15_x86_64 + cp39-abi3-manylinux_2_14_x86_64 + cp39-abi3-manylinux_2_13_x86_64 + cp39-abi3-manylinux_2_12_x86_64 + cp39-abi3-manylinux2010_x86_64 + cp39-abi3-manylinux_2_11_x86_64 + cp39-abi3-manylinux_2_10_x86_64 + cp39-abi3-manylinux_2_9_x86_64 + cp39-abi3-manylinux_2_8_x86_64 + cp39-abi3-manylinux_2_7_x86_64 + cp39-abi3-manylinux_2_6_x86_64 + cp39-abi3-manylinux_2_5_x86_64 + cp39-abi3-manylinux1_x86_64 + cp39-abi3-linux_x86_64 + cp39-none-manylinux_2_28_x86_64 + cp39-none-manylinux_2_27_x86_64 + cp39-none-manylinux_2_26_x86_64 + cp39-none-manylinux_2_25_x86_64 + cp39-none-manylinux_2_24_x86_64 + cp39-none-manylinux_2_23_x86_64 + cp39-none-manylinux_2_22_x86_64 + cp39-none-manylinux_2_21_x86_64 + cp39-none-manylinux_2_20_x86_64 + cp39-none-manylinux_2_19_x86_64 + cp39-none-manylinux_2_18_x86_64 + cp39-none-manylinux_2_17_x86_64 + cp39-none-manylinux2014_x86_64 + cp39-none-manylinux_2_16_x86_64 + cp39-none-manylinux_2_15_x86_64 + cp39-none-manylinux_2_14_x86_64 + cp39-none-manylinux_2_13_x86_64 + cp39-none-manylinux_2_12_x86_64 + cp39-none-manylinux2010_x86_64 + cp39-none-manylinux_2_11_x86_64 + cp39-none-manylinux_2_10_x86_64 + cp39-none-manylinux_2_9_x86_64 + cp39-none-manylinux_2_8_x86_64 + cp39-none-manylinux_2_7_x86_64 + cp39-none-manylinux_2_6_x86_64 + cp39-none-manylinux_2_5_x86_64 + cp39-none-manylinux1_x86_64 + cp39-none-linux_x86_64 + cp38-abi3-manylinux_2_28_x86_64 + cp38-abi3-manylinux_2_27_x86_64 + cp38-abi3-manylinux_2_26_x86_64 + cp38-abi3-manylinux_2_25_x86_64 + cp38-abi3-manylinux_2_24_x86_64 + cp38-abi3-manylinux_2_23_x86_64 + cp38-abi3-manylinux_2_22_x86_64 + cp38-abi3-manylinux_2_21_x86_64 + cp38-abi3-manylinux_2_20_x86_64 + cp38-abi3-manylinux_2_19_x86_64 + cp38-abi3-manylinux_2_18_x86_64 + cp38-abi3-manylinux_2_17_x86_64 + cp38-abi3-manylinux2014_x86_64 + cp38-abi3-manylinux_2_16_x86_64 + cp38-abi3-manylinux_2_15_x86_64 + cp38-abi3-manylinux_2_14_x86_64 + cp38-abi3-manylinux_2_13_x86_64 + cp38-abi3-manylinux_2_12_x86_64 + cp38-abi3-manylinux2010_x86_64 + cp38-abi3-manylinux_2_11_x86_64 + cp38-abi3-manylinux_2_10_x86_64 + cp38-abi3-manylinux_2_9_x86_64 + cp38-abi3-manylinux_2_8_x86_64 + cp38-abi3-manylinux_2_7_x86_64 + cp38-abi3-manylinux_2_6_x86_64 + cp38-abi3-manylinux_2_5_x86_64 + cp38-abi3-manylinux1_x86_64 + cp38-abi3-linux_x86_64 + cp37-abi3-manylinux_2_28_x86_64 + cp37-abi3-manylinux_2_27_x86_64 + cp37-abi3-manylinux_2_26_x86_64 + cp37-abi3-manylinux_2_25_x86_64 + cp37-abi3-manylinux_2_24_x86_64 + cp37-abi3-manylinux_2_23_x86_64 + cp37-abi3-manylinux_2_22_x86_64 + cp37-abi3-manylinux_2_21_x86_64 + cp37-abi3-manylinux_2_20_x86_64 + cp37-abi3-manylinux_2_19_x86_64 + cp37-abi3-manylinux_2_18_x86_64 + cp37-abi3-manylinux_2_17_x86_64 + cp37-abi3-manylinux2014_x86_64 + cp37-abi3-manylinux_2_16_x86_64 + cp37-abi3-manylinux_2_15_x86_64 + cp37-abi3-manylinux_2_14_x86_64 + cp37-abi3-manylinux_2_13_x86_64 + cp37-abi3-manylinux_2_12_x86_64 + cp37-abi3-manylinux2010_x86_64 + cp37-abi3-manylinux_2_11_x86_64 + cp37-abi3-manylinux_2_10_x86_64 + cp37-abi3-manylinux_2_9_x86_64 + cp37-abi3-manylinux_2_8_x86_64 + cp37-abi3-manylinux_2_7_x86_64 + cp37-abi3-manylinux_2_6_x86_64 + cp37-abi3-manylinux_2_5_x86_64 + cp37-abi3-manylinux1_x86_64 + cp37-abi3-linux_x86_64 + cp36-abi3-manylinux_2_28_x86_64 + cp36-abi3-manylinux_2_27_x86_64 + cp36-abi3-manylinux_2_26_x86_64 + cp36-abi3-manylinux_2_25_x86_64 + cp36-abi3-manylinux_2_24_x86_64 + cp36-abi3-manylinux_2_23_x86_64 + cp36-abi3-manylinux_2_22_x86_64 + cp36-abi3-manylinux_2_21_x86_64 + cp36-abi3-manylinux_2_20_x86_64 + cp36-abi3-manylinux_2_19_x86_64 + cp36-abi3-manylinux_2_18_x86_64 + cp36-abi3-manylinux_2_17_x86_64 + cp36-abi3-manylinux2014_x86_64 + cp36-abi3-manylinux_2_16_x86_64 + cp36-abi3-manylinux_2_15_x86_64 + cp36-abi3-manylinux_2_14_x86_64 + cp36-abi3-manylinux_2_13_x86_64 + cp36-abi3-manylinux_2_12_x86_64 + cp36-abi3-manylinux2010_x86_64 + cp36-abi3-manylinux_2_11_x86_64 + cp36-abi3-manylinux_2_10_x86_64 + cp36-abi3-manylinux_2_9_x86_64 + cp36-abi3-manylinux_2_8_x86_64 + cp36-abi3-manylinux_2_7_x86_64 + cp36-abi3-manylinux_2_6_x86_64 + cp36-abi3-manylinux_2_5_x86_64 + cp36-abi3-manylinux1_x86_64 + cp36-abi3-linux_x86_64 + cp35-abi3-manylinux_2_28_x86_64 + cp35-abi3-manylinux_2_27_x86_64 + cp35-abi3-manylinux_2_26_x86_64 + cp35-abi3-manylinux_2_25_x86_64 + cp35-abi3-manylinux_2_24_x86_64 + cp35-abi3-manylinux_2_23_x86_64 + cp35-abi3-manylinux_2_22_x86_64 + cp35-abi3-manylinux_2_21_x86_64 + cp35-abi3-manylinux_2_20_x86_64 + cp35-abi3-manylinux_2_19_x86_64 + cp35-abi3-manylinux_2_18_x86_64 + cp35-abi3-manylinux_2_17_x86_64 + cp35-abi3-manylinux2014_x86_64 + cp35-abi3-manylinux_2_16_x86_64 + cp35-abi3-manylinux_2_15_x86_64 + cp35-abi3-manylinux_2_14_x86_64 + cp35-abi3-manylinux_2_13_x86_64 + cp35-abi3-manylinux_2_12_x86_64 + cp35-abi3-manylinux2010_x86_64 + cp35-abi3-manylinux_2_11_x86_64 + cp35-abi3-manylinux_2_10_x86_64 + cp35-abi3-manylinux_2_9_x86_64 + cp35-abi3-manylinux_2_8_x86_64 + cp35-abi3-manylinux_2_7_x86_64 + cp35-abi3-manylinux_2_6_x86_64 + cp35-abi3-manylinux_2_5_x86_64 + cp35-abi3-manylinux1_x86_64 + cp35-abi3-linux_x86_64 + cp34-abi3-manylinux_2_28_x86_64 + cp34-abi3-manylinux_2_27_x86_64 + cp34-abi3-manylinux_2_26_x86_64 + cp34-abi3-manylinux_2_25_x86_64 + cp34-abi3-manylinux_2_24_x86_64 + cp34-abi3-manylinux_2_23_x86_64 + cp34-abi3-manylinux_2_22_x86_64 + cp34-abi3-manylinux_2_21_x86_64 + cp34-abi3-manylinux_2_20_x86_64 + cp34-abi3-manylinux_2_19_x86_64 + cp34-abi3-manylinux_2_18_x86_64 + cp34-abi3-manylinux_2_17_x86_64 + cp34-abi3-manylinux2014_x86_64 + cp34-abi3-manylinux_2_16_x86_64 + cp34-abi3-manylinux_2_15_x86_64 + cp34-abi3-manylinux_2_14_x86_64 + cp34-abi3-manylinux_2_13_x86_64 + cp34-abi3-manylinux_2_12_x86_64 + cp34-abi3-manylinux2010_x86_64 + cp34-abi3-manylinux_2_11_x86_64 + cp34-abi3-manylinux_2_10_x86_64 + cp34-abi3-manylinux_2_9_x86_64 + cp34-abi3-manylinux_2_8_x86_64 + cp34-abi3-manylinux_2_7_x86_64 + cp34-abi3-manylinux_2_6_x86_64 + cp34-abi3-manylinux_2_5_x86_64 + cp34-abi3-manylinux1_x86_64 + cp34-abi3-linux_x86_64 + cp33-abi3-manylinux_2_28_x86_64 + cp33-abi3-manylinux_2_27_x86_64 + cp33-abi3-manylinux_2_26_x86_64 + cp33-abi3-manylinux_2_25_x86_64 + cp33-abi3-manylinux_2_24_x86_64 + cp33-abi3-manylinux_2_23_x86_64 + cp33-abi3-manylinux_2_22_x86_64 + cp33-abi3-manylinux_2_21_x86_64 + cp33-abi3-manylinux_2_20_x86_64 + cp33-abi3-manylinux_2_19_x86_64 + cp33-abi3-manylinux_2_18_x86_64 + cp33-abi3-manylinux_2_17_x86_64 + cp33-abi3-manylinux2014_x86_64 + cp33-abi3-manylinux_2_16_x86_64 + cp33-abi3-manylinux_2_15_x86_64 + cp33-abi3-manylinux_2_14_x86_64 + cp33-abi3-manylinux_2_13_x86_64 + cp33-abi3-manylinux_2_12_x86_64 + cp33-abi3-manylinux2010_x86_64 + cp33-abi3-manylinux_2_11_x86_64 + cp33-abi3-manylinux_2_10_x86_64 + cp33-abi3-manylinux_2_9_x86_64 + cp33-abi3-manylinux_2_8_x86_64 + cp33-abi3-manylinux_2_7_x86_64 + cp33-abi3-manylinux_2_6_x86_64 + cp33-abi3-manylinux_2_5_x86_64 + cp33-abi3-manylinux1_x86_64 + cp33-abi3-linux_x86_64 + cp32-abi3-manylinux_2_28_x86_64 + cp32-abi3-manylinux_2_27_x86_64 + cp32-abi3-manylinux_2_26_x86_64 + cp32-abi3-manylinux_2_25_x86_64 + cp32-abi3-manylinux_2_24_x86_64 + cp32-abi3-manylinux_2_23_x86_64 + cp32-abi3-manylinux_2_22_x86_64 + cp32-abi3-manylinux_2_21_x86_64 + cp32-abi3-manylinux_2_20_x86_64 + cp32-abi3-manylinux_2_19_x86_64 + cp32-abi3-manylinux_2_18_x86_64 + cp32-abi3-manylinux_2_17_x86_64 + cp32-abi3-manylinux2014_x86_64 + cp32-abi3-manylinux_2_16_x86_64 + cp32-abi3-manylinux_2_15_x86_64 + cp32-abi3-manylinux_2_14_x86_64 + cp32-abi3-manylinux_2_13_x86_64 + cp32-abi3-manylinux_2_12_x86_64 + cp32-abi3-manylinux2010_x86_64 + cp32-abi3-manylinux_2_11_x86_64 + cp32-abi3-manylinux_2_10_x86_64 + cp32-abi3-manylinux_2_9_x86_64 + cp32-abi3-manylinux_2_8_x86_64 + cp32-abi3-manylinux_2_7_x86_64 + cp32-abi3-manylinux_2_6_x86_64 + cp32-abi3-manylinux_2_5_x86_64 + cp32-abi3-manylinux1_x86_64 + cp32-abi3-linux_x86_64 + py39-none-manylinux_2_28_x86_64 + py39-none-manylinux_2_27_x86_64 + py39-none-manylinux_2_26_x86_64 + py39-none-manylinux_2_25_x86_64 + py39-none-manylinux_2_24_x86_64 + py39-none-manylinux_2_23_x86_64 + py39-none-manylinux_2_22_x86_64 + py39-none-manylinux_2_21_x86_64 + py39-none-manylinux_2_20_x86_64 + py39-none-manylinux_2_19_x86_64 + py39-none-manylinux_2_18_x86_64 + py39-none-manylinux_2_17_x86_64 + py39-none-manylinux2014_x86_64 + py39-none-manylinux_2_16_x86_64 + py39-none-manylinux_2_15_x86_64 + py39-none-manylinux_2_14_x86_64 + py39-none-manylinux_2_13_x86_64 + py39-none-manylinux_2_12_x86_64 + py39-none-manylinux2010_x86_64 + py39-none-manylinux_2_11_x86_64 + py39-none-manylinux_2_10_x86_64 + py39-none-manylinux_2_9_x86_64 + py39-none-manylinux_2_8_x86_64 + py39-none-manylinux_2_7_x86_64 + py39-none-manylinux_2_6_x86_64 + py39-none-manylinux_2_5_x86_64 + py39-none-manylinux1_x86_64 + py39-none-linux_x86_64 + py3-none-manylinux_2_28_x86_64 + py3-none-manylinux_2_27_x86_64 + py3-none-manylinux_2_26_x86_64 + py3-none-manylinux_2_25_x86_64 + py3-none-manylinux_2_24_x86_64 + py3-none-manylinux_2_23_x86_64 + py3-none-manylinux_2_22_x86_64 + py3-none-manylinux_2_21_x86_64 + py3-none-manylinux_2_20_x86_64 + py3-none-manylinux_2_19_x86_64 + py3-none-manylinux_2_18_x86_64 + py3-none-manylinux_2_17_x86_64 + py3-none-manylinux2014_x86_64 + py3-none-manylinux_2_16_x86_64 + py3-none-manylinux_2_15_x86_64 + py3-none-manylinux_2_14_x86_64 + py3-none-manylinux_2_13_x86_64 + py3-none-manylinux_2_12_x86_64 + py3-none-manylinux2010_x86_64 + py3-none-manylinux_2_11_x86_64 + py3-none-manylinux_2_10_x86_64 + py3-none-manylinux_2_9_x86_64 + py3-none-manylinux_2_8_x86_64 + py3-none-manylinux_2_7_x86_64 + py3-none-manylinux_2_6_x86_64 + py3-none-manylinux_2_5_x86_64 + py3-none-manylinux1_x86_64 + py3-none-linux_x86_64 + py38-none-manylinux_2_28_x86_64 + py38-none-manylinux_2_27_x86_64 + py38-none-manylinux_2_26_x86_64 + py38-none-manylinux_2_25_x86_64 + py38-none-manylinux_2_24_x86_64 + py38-none-manylinux_2_23_x86_64 + py38-none-manylinux_2_22_x86_64 + py38-none-manylinux_2_21_x86_64 + py38-none-manylinux_2_20_x86_64 + py38-none-manylinux_2_19_x86_64 + py38-none-manylinux_2_18_x86_64 + py38-none-manylinux_2_17_x86_64 + py38-none-manylinux2014_x86_64 + py38-none-manylinux_2_16_x86_64 + py38-none-manylinux_2_15_x86_64 + py38-none-manylinux_2_14_x86_64 + py38-none-manylinux_2_13_x86_64 + py38-none-manylinux_2_12_x86_64 + py38-none-manylinux2010_x86_64 + py38-none-manylinux_2_11_x86_64 + py38-none-manylinux_2_10_x86_64 + py38-none-manylinux_2_9_x86_64 + py38-none-manylinux_2_8_x86_64 + py38-none-manylinux_2_7_x86_64 + py38-none-manylinux_2_6_x86_64 + py38-none-manylinux_2_5_x86_64 + py38-none-manylinux1_x86_64 + py38-none-linux_x86_64 + py37-none-manylinux_2_28_x86_64 + py37-none-manylinux_2_27_x86_64 + py37-none-manylinux_2_26_x86_64 + py37-none-manylinux_2_25_x86_64 + py37-none-manylinux_2_24_x86_64 + py37-none-manylinux_2_23_x86_64 + py37-none-manylinux_2_22_x86_64 + py37-none-manylinux_2_21_x86_64 + py37-none-manylinux_2_20_x86_64 + py37-none-manylinux_2_19_x86_64 + py37-none-manylinux_2_18_x86_64 + py37-none-manylinux_2_17_x86_64 + py37-none-manylinux2014_x86_64 + py37-none-manylinux_2_16_x86_64 + py37-none-manylinux_2_15_x86_64 + py37-none-manylinux_2_14_x86_64 + py37-none-manylinux_2_13_x86_64 + py37-none-manylinux_2_12_x86_64 + py37-none-manylinux2010_x86_64 + py37-none-manylinux_2_11_x86_64 + py37-none-manylinux_2_10_x86_64 + py37-none-manylinux_2_9_x86_64 + py37-none-manylinux_2_8_x86_64 + py37-none-manylinux_2_7_x86_64 + py37-none-manylinux_2_6_x86_64 + py37-none-manylinux_2_5_x86_64 + py37-none-manylinux1_x86_64 + py37-none-linux_x86_64 + py36-none-manylinux_2_28_x86_64 + py36-none-manylinux_2_27_x86_64 + py36-none-manylinux_2_26_x86_64 + py36-none-manylinux_2_25_x86_64 + py36-none-manylinux_2_24_x86_64 + py36-none-manylinux_2_23_x86_64 + py36-none-manylinux_2_22_x86_64 + py36-none-manylinux_2_21_x86_64 + py36-none-manylinux_2_20_x86_64 + py36-none-manylinux_2_19_x86_64 + py36-none-manylinux_2_18_x86_64 + py36-none-manylinux_2_17_x86_64 + py36-none-manylinux2014_x86_64 + py36-none-manylinux_2_16_x86_64 + py36-none-manylinux_2_15_x86_64 + py36-none-manylinux_2_14_x86_64 + py36-none-manylinux_2_13_x86_64 + py36-none-manylinux_2_12_x86_64 + py36-none-manylinux2010_x86_64 + py36-none-manylinux_2_11_x86_64 + py36-none-manylinux_2_10_x86_64 + py36-none-manylinux_2_9_x86_64 + py36-none-manylinux_2_8_x86_64 + py36-none-manylinux_2_7_x86_64 + py36-none-manylinux_2_6_x86_64 + py36-none-manylinux_2_5_x86_64 + py36-none-manylinux1_x86_64 + py36-none-linux_x86_64 + py35-none-manylinux_2_28_x86_64 + py35-none-manylinux_2_27_x86_64 + py35-none-manylinux_2_26_x86_64 + py35-none-manylinux_2_25_x86_64 + py35-none-manylinux_2_24_x86_64 + py35-none-manylinux_2_23_x86_64 + py35-none-manylinux_2_22_x86_64 + py35-none-manylinux_2_21_x86_64 + py35-none-manylinux_2_20_x86_64 + py35-none-manylinux_2_19_x86_64 + py35-none-manylinux_2_18_x86_64 + py35-none-manylinux_2_17_x86_64 + py35-none-manylinux2014_x86_64 + py35-none-manylinux_2_16_x86_64 + py35-none-manylinux_2_15_x86_64 + py35-none-manylinux_2_14_x86_64 + py35-none-manylinux_2_13_x86_64 + py35-none-manylinux_2_12_x86_64 + py35-none-manylinux2010_x86_64 + py35-none-manylinux_2_11_x86_64 + py35-none-manylinux_2_10_x86_64 + py35-none-manylinux_2_9_x86_64 + py35-none-manylinux_2_8_x86_64 + py35-none-manylinux_2_7_x86_64 + py35-none-manylinux_2_6_x86_64 + py35-none-manylinux_2_5_x86_64 + py35-none-manylinux1_x86_64 + py35-none-linux_x86_64 + py34-none-manylinux_2_28_x86_64 + py34-none-manylinux_2_27_x86_64 + py34-none-manylinux_2_26_x86_64 + py34-none-manylinux_2_25_x86_64 + py34-none-manylinux_2_24_x86_64 + py34-none-manylinux_2_23_x86_64 + py34-none-manylinux_2_22_x86_64 + py34-none-manylinux_2_21_x86_64 + py34-none-manylinux_2_20_x86_64 + py34-none-manylinux_2_19_x86_64 + py34-none-manylinux_2_18_x86_64 + py34-none-manylinux_2_17_x86_64 + py34-none-manylinux2014_x86_64 + py34-none-manylinux_2_16_x86_64 + py34-none-manylinux_2_15_x86_64 + py34-none-manylinux_2_14_x86_64 + py34-none-manylinux_2_13_x86_64 + py34-none-manylinux_2_12_x86_64 + py34-none-manylinux2010_x86_64 + py34-none-manylinux_2_11_x86_64 + py34-none-manylinux_2_10_x86_64 + py34-none-manylinux_2_9_x86_64 + py34-none-manylinux_2_8_x86_64 + py34-none-manylinux_2_7_x86_64 + py34-none-manylinux_2_6_x86_64 + py34-none-manylinux_2_5_x86_64 + py34-none-manylinux1_x86_64 + py34-none-linux_x86_64 + py33-none-manylinux_2_28_x86_64 + py33-none-manylinux_2_27_x86_64 + py33-none-manylinux_2_26_x86_64 + py33-none-manylinux_2_25_x86_64 + py33-none-manylinux_2_24_x86_64 + py33-none-manylinux_2_23_x86_64 + py33-none-manylinux_2_22_x86_64 + py33-none-manylinux_2_21_x86_64 + py33-none-manylinux_2_20_x86_64 + py33-none-manylinux_2_19_x86_64 + py33-none-manylinux_2_18_x86_64 + py33-none-manylinux_2_17_x86_64 + py33-none-manylinux2014_x86_64 + py33-none-manylinux_2_16_x86_64 + py33-none-manylinux_2_15_x86_64 + py33-none-manylinux_2_14_x86_64 + py33-none-manylinux_2_13_x86_64 + py33-none-manylinux_2_12_x86_64 + py33-none-manylinux2010_x86_64 + py33-none-manylinux_2_11_x86_64 + py33-none-manylinux_2_10_x86_64 + py33-none-manylinux_2_9_x86_64 + py33-none-manylinux_2_8_x86_64 + py33-none-manylinux_2_7_x86_64 + py33-none-manylinux_2_6_x86_64 + py33-none-manylinux_2_5_x86_64 + py33-none-manylinux1_x86_64 + py33-none-linux_x86_64 + py32-none-manylinux_2_28_x86_64 + py32-none-manylinux_2_27_x86_64 + py32-none-manylinux_2_26_x86_64 + py32-none-manylinux_2_25_x86_64 + py32-none-manylinux_2_24_x86_64 + py32-none-manylinux_2_23_x86_64 + py32-none-manylinux_2_22_x86_64 + py32-none-manylinux_2_21_x86_64 + py32-none-manylinux_2_20_x86_64 + py32-none-manylinux_2_19_x86_64 + py32-none-manylinux_2_18_x86_64 + py32-none-manylinux_2_17_x86_64 + py32-none-manylinux2014_x86_64 + py32-none-manylinux_2_16_x86_64 + py32-none-manylinux_2_15_x86_64 + py32-none-manylinux_2_14_x86_64 + py32-none-manylinux_2_13_x86_64 + py32-none-manylinux_2_12_x86_64 + py32-none-manylinux2010_x86_64 + py32-none-manylinux_2_11_x86_64 + py32-none-manylinux_2_10_x86_64 + py32-none-manylinux_2_9_x86_64 + py32-none-manylinux_2_8_x86_64 + py32-none-manylinux_2_7_x86_64 + py32-none-manylinux_2_6_x86_64 + py32-none-manylinux_2_5_x86_64 + py32-none-manylinux1_x86_64 + py32-none-linux_x86_64 + py31-none-manylinux_2_28_x86_64 + py31-none-manylinux_2_27_x86_64 + py31-none-manylinux_2_26_x86_64 + py31-none-manylinux_2_25_x86_64 + py31-none-manylinux_2_24_x86_64 + py31-none-manylinux_2_23_x86_64 + py31-none-manylinux_2_22_x86_64 + py31-none-manylinux_2_21_x86_64 + py31-none-manylinux_2_20_x86_64 + py31-none-manylinux_2_19_x86_64 + py31-none-manylinux_2_18_x86_64 + py31-none-manylinux_2_17_x86_64 + py31-none-manylinux2014_x86_64 + py31-none-manylinux_2_16_x86_64 + py31-none-manylinux_2_15_x86_64 + py31-none-manylinux_2_14_x86_64 + py31-none-manylinux_2_13_x86_64 + py31-none-manylinux_2_12_x86_64 + py31-none-manylinux2010_x86_64 + py31-none-manylinux_2_11_x86_64 + py31-none-manylinux_2_10_x86_64 + py31-none-manylinux_2_9_x86_64 + py31-none-manylinux_2_8_x86_64 + py31-none-manylinux_2_7_x86_64 + py31-none-manylinux_2_6_x86_64 + py31-none-manylinux_2_5_x86_64 + py31-none-manylinux1_x86_64 + py31-none-linux_x86_64 + py30-none-manylinux_2_28_x86_64 + py30-none-manylinux_2_27_x86_64 + py30-none-manylinux_2_26_x86_64 + py30-none-manylinux_2_25_x86_64 + py30-none-manylinux_2_24_x86_64 + py30-none-manylinux_2_23_x86_64 + py30-none-manylinux_2_22_x86_64 + py30-none-manylinux_2_21_x86_64 + py30-none-manylinux_2_20_x86_64 + py30-none-manylinux_2_19_x86_64 + py30-none-manylinux_2_18_x86_64 + py30-none-manylinux_2_17_x86_64 + py30-none-manylinux2014_x86_64 + py30-none-manylinux_2_16_x86_64 + py30-none-manylinux_2_15_x86_64 + py30-none-manylinux_2_14_x86_64 + py30-none-manylinux_2_13_x86_64 + py30-none-manylinux_2_12_x86_64 + py30-none-manylinux2010_x86_64 + py30-none-manylinux_2_11_x86_64 + py30-none-manylinux_2_10_x86_64 + py30-none-manylinux_2_9_x86_64 + py30-none-manylinux_2_8_x86_64 + py30-none-manylinux_2_7_x86_64 + py30-none-manylinux_2_6_x86_64 + py30-none-manylinux_2_5_x86_64 + py30-none-manylinux1_x86_64 + py30-none-linux_x86_64 + cp39-none-any + py39-none-any + py3-none-any + py38-none-any + py37-none-any + py36-none-any + py35-none-any + py34-none-any + py33-none-any + py32-none-any + py31-none-any + py30-none-any + " ); } @@ -2189,461 +2185,461 @@ mod tests { .unwrap(); assert_snapshot!( tags, - @r###" - cp39-cp39-macosx_14_0_arm64 - cp39-cp39-macosx_14_0_universal2 - cp39-cp39-macosx_13_0_arm64 - cp39-cp39-macosx_13_0_universal2 - cp39-cp39-macosx_12_0_arm64 - cp39-cp39-macosx_12_0_universal2 - cp39-cp39-macosx_11_0_arm64 - cp39-cp39-macosx_11_0_universal2 - cp39-cp39-macosx_10_16_universal2 - cp39-cp39-macosx_10_15_universal2 - cp39-cp39-macosx_10_14_universal2 - cp39-cp39-macosx_10_13_universal2 - cp39-cp39-macosx_10_12_universal2 - cp39-cp39-macosx_10_11_universal2 - cp39-cp39-macosx_10_10_universal2 - cp39-cp39-macosx_10_9_universal2 - cp39-cp39-macosx_10_8_universal2 - cp39-cp39-macosx_10_7_universal2 - cp39-cp39-macosx_10_6_universal2 - cp39-cp39-macosx_10_5_universal2 - cp39-cp39-macosx_10_4_universal2 - cp39-abi3-macosx_14_0_arm64 - cp39-abi3-macosx_14_0_universal2 - cp39-abi3-macosx_13_0_arm64 - cp39-abi3-macosx_13_0_universal2 - cp39-abi3-macosx_12_0_arm64 - cp39-abi3-macosx_12_0_universal2 - cp39-abi3-macosx_11_0_arm64 - cp39-abi3-macosx_11_0_universal2 - cp39-abi3-macosx_10_16_universal2 - cp39-abi3-macosx_10_15_universal2 - cp39-abi3-macosx_10_14_universal2 - cp39-abi3-macosx_10_13_universal2 - cp39-abi3-macosx_10_12_universal2 - cp39-abi3-macosx_10_11_universal2 - cp39-abi3-macosx_10_10_universal2 - cp39-abi3-macosx_10_9_universal2 - cp39-abi3-macosx_10_8_universal2 - cp39-abi3-macosx_10_7_universal2 - cp39-abi3-macosx_10_6_universal2 - cp39-abi3-macosx_10_5_universal2 - cp39-abi3-macosx_10_4_universal2 - cp39-none-macosx_14_0_arm64 - cp39-none-macosx_14_0_universal2 - cp39-none-macosx_13_0_arm64 - cp39-none-macosx_13_0_universal2 - cp39-none-macosx_12_0_arm64 - cp39-none-macosx_12_0_universal2 - cp39-none-macosx_11_0_arm64 - cp39-none-macosx_11_0_universal2 - cp39-none-macosx_10_16_universal2 - cp39-none-macosx_10_15_universal2 - cp39-none-macosx_10_14_universal2 - cp39-none-macosx_10_13_universal2 - cp39-none-macosx_10_12_universal2 - cp39-none-macosx_10_11_universal2 - cp39-none-macosx_10_10_universal2 - cp39-none-macosx_10_9_universal2 - cp39-none-macosx_10_8_universal2 - cp39-none-macosx_10_7_universal2 - cp39-none-macosx_10_6_universal2 - cp39-none-macosx_10_5_universal2 - cp39-none-macosx_10_4_universal2 - cp38-abi3-macosx_14_0_arm64 - cp38-abi3-macosx_14_0_universal2 - cp38-abi3-macosx_13_0_arm64 - cp38-abi3-macosx_13_0_universal2 - cp38-abi3-macosx_12_0_arm64 - cp38-abi3-macosx_12_0_universal2 - cp38-abi3-macosx_11_0_arm64 - cp38-abi3-macosx_11_0_universal2 - cp38-abi3-macosx_10_16_universal2 - cp38-abi3-macosx_10_15_universal2 - cp38-abi3-macosx_10_14_universal2 - cp38-abi3-macosx_10_13_universal2 - cp38-abi3-macosx_10_12_universal2 - cp38-abi3-macosx_10_11_universal2 - cp38-abi3-macosx_10_10_universal2 - cp38-abi3-macosx_10_9_universal2 - cp38-abi3-macosx_10_8_universal2 - cp38-abi3-macosx_10_7_universal2 - cp38-abi3-macosx_10_6_universal2 - cp38-abi3-macosx_10_5_universal2 - cp38-abi3-macosx_10_4_universal2 - cp37-abi3-macosx_14_0_arm64 - cp37-abi3-macosx_14_0_universal2 - cp37-abi3-macosx_13_0_arm64 - cp37-abi3-macosx_13_0_universal2 - cp37-abi3-macosx_12_0_arm64 - cp37-abi3-macosx_12_0_universal2 - cp37-abi3-macosx_11_0_arm64 - cp37-abi3-macosx_11_0_universal2 - cp37-abi3-macosx_10_16_universal2 - cp37-abi3-macosx_10_15_universal2 - cp37-abi3-macosx_10_14_universal2 - cp37-abi3-macosx_10_13_universal2 - cp37-abi3-macosx_10_12_universal2 - cp37-abi3-macosx_10_11_universal2 - cp37-abi3-macosx_10_10_universal2 - cp37-abi3-macosx_10_9_universal2 - cp37-abi3-macosx_10_8_universal2 - cp37-abi3-macosx_10_7_universal2 - cp37-abi3-macosx_10_6_universal2 - cp37-abi3-macosx_10_5_universal2 - cp37-abi3-macosx_10_4_universal2 - cp36-abi3-macosx_14_0_arm64 - cp36-abi3-macosx_14_0_universal2 - cp36-abi3-macosx_13_0_arm64 - cp36-abi3-macosx_13_0_universal2 - cp36-abi3-macosx_12_0_arm64 - cp36-abi3-macosx_12_0_universal2 - cp36-abi3-macosx_11_0_arm64 - cp36-abi3-macosx_11_0_universal2 - cp36-abi3-macosx_10_16_universal2 - cp36-abi3-macosx_10_15_universal2 - cp36-abi3-macosx_10_14_universal2 - cp36-abi3-macosx_10_13_universal2 - cp36-abi3-macosx_10_12_universal2 - cp36-abi3-macosx_10_11_universal2 - cp36-abi3-macosx_10_10_universal2 - cp36-abi3-macosx_10_9_universal2 - cp36-abi3-macosx_10_8_universal2 - cp36-abi3-macosx_10_7_universal2 - cp36-abi3-macosx_10_6_universal2 - cp36-abi3-macosx_10_5_universal2 - cp36-abi3-macosx_10_4_universal2 - cp35-abi3-macosx_14_0_arm64 - cp35-abi3-macosx_14_0_universal2 - cp35-abi3-macosx_13_0_arm64 - cp35-abi3-macosx_13_0_universal2 - cp35-abi3-macosx_12_0_arm64 - cp35-abi3-macosx_12_0_universal2 - cp35-abi3-macosx_11_0_arm64 - cp35-abi3-macosx_11_0_universal2 - cp35-abi3-macosx_10_16_universal2 - cp35-abi3-macosx_10_15_universal2 - cp35-abi3-macosx_10_14_universal2 - cp35-abi3-macosx_10_13_universal2 - cp35-abi3-macosx_10_12_universal2 - cp35-abi3-macosx_10_11_universal2 - cp35-abi3-macosx_10_10_universal2 - cp35-abi3-macosx_10_9_universal2 - cp35-abi3-macosx_10_8_universal2 - cp35-abi3-macosx_10_7_universal2 - cp35-abi3-macosx_10_6_universal2 - cp35-abi3-macosx_10_5_universal2 - cp35-abi3-macosx_10_4_universal2 - cp34-abi3-macosx_14_0_arm64 - cp34-abi3-macosx_14_0_universal2 - cp34-abi3-macosx_13_0_arm64 - cp34-abi3-macosx_13_0_universal2 - cp34-abi3-macosx_12_0_arm64 - cp34-abi3-macosx_12_0_universal2 - cp34-abi3-macosx_11_0_arm64 - cp34-abi3-macosx_11_0_universal2 - cp34-abi3-macosx_10_16_universal2 - cp34-abi3-macosx_10_15_universal2 - cp34-abi3-macosx_10_14_universal2 - cp34-abi3-macosx_10_13_universal2 - cp34-abi3-macosx_10_12_universal2 - cp34-abi3-macosx_10_11_universal2 - cp34-abi3-macosx_10_10_universal2 - cp34-abi3-macosx_10_9_universal2 - cp34-abi3-macosx_10_8_universal2 - cp34-abi3-macosx_10_7_universal2 - cp34-abi3-macosx_10_6_universal2 - cp34-abi3-macosx_10_5_universal2 - cp34-abi3-macosx_10_4_universal2 - cp33-abi3-macosx_14_0_arm64 - cp33-abi3-macosx_14_0_universal2 - cp33-abi3-macosx_13_0_arm64 - cp33-abi3-macosx_13_0_universal2 - cp33-abi3-macosx_12_0_arm64 - cp33-abi3-macosx_12_0_universal2 - cp33-abi3-macosx_11_0_arm64 - cp33-abi3-macosx_11_0_universal2 - cp33-abi3-macosx_10_16_universal2 - cp33-abi3-macosx_10_15_universal2 - cp33-abi3-macosx_10_14_universal2 - cp33-abi3-macosx_10_13_universal2 - cp33-abi3-macosx_10_12_universal2 - cp33-abi3-macosx_10_11_universal2 - cp33-abi3-macosx_10_10_universal2 - cp33-abi3-macosx_10_9_universal2 - cp33-abi3-macosx_10_8_universal2 - cp33-abi3-macosx_10_7_universal2 - cp33-abi3-macosx_10_6_universal2 - cp33-abi3-macosx_10_5_universal2 - cp33-abi3-macosx_10_4_universal2 - cp32-abi3-macosx_14_0_arm64 - cp32-abi3-macosx_14_0_universal2 - cp32-abi3-macosx_13_0_arm64 - cp32-abi3-macosx_13_0_universal2 - cp32-abi3-macosx_12_0_arm64 - cp32-abi3-macosx_12_0_universal2 - cp32-abi3-macosx_11_0_arm64 - cp32-abi3-macosx_11_0_universal2 - cp32-abi3-macosx_10_16_universal2 - cp32-abi3-macosx_10_15_universal2 - cp32-abi3-macosx_10_14_universal2 - cp32-abi3-macosx_10_13_universal2 - cp32-abi3-macosx_10_12_universal2 - cp32-abi3-macosx_10_11_universal2 - cp32-abi3-macosx_10_10_universal2 - cp32-abi3-macosx_10_9_universal2 - cp32-abi3-macosx_10_8_universal2 - cp32-abi3-macosx_10_7_universal2 - cp32-abi3-macosx_10_6_universal2 - cp32-abi3-macosx_10_5_universal2 - cp32-abi3-macosx_10_4_universal2 - py39-none-macosx_14_0_arm64 - py39-none-macosx_14_0_universal2 - py39-none-macosx_13_0_arm64 - py39-none-macosx_13_0_universal2 - py39-none-macosx_12_0_arm64 - py39-none-macosx_12_0_universal2 - py39-none-macosx_11_0_arm64 - py39-none-macosx_11_0_universal2 - py39-none-macosx_10_16_universal2 - py39-none-macosx_10_15_universal2 - py39-none-macosx_10_14_universal2 - py39-none-macosx_10_13_universal2 - py39-none-macosx_10_12_universal2 - py39-none-macosx_10_11_universal2 - py39-none-macosx_10_10_universal2 - py39-none-macosx_10_9_universal2 - py39-none-macosx_10_8_universal2 - py39-none-macosx_10_7_universal2 - py39-none-macosx_10_6_universal2 - py39-none-macosx_10_5_universal2 - py39-none-macosx_10_4_universal2 - py3-none-macosx_14_0_arm64 - py3-none-macosx_14_0_universal2 - py3-none-macosx_13_0_arm64 - py3-none-macosx_13_0_universal2 - py3-none-macosx_12_0_arm64 - py3-none-macosx_12_0_universal2 - py3-none-macosx_11_0_arm64 - py3-none-macosx_11_0_universal2 - py3-none-macosx_10_16_universal2 - py3-none-macosx_10_15_universal2 - py3-none-macosx_10_14_universal2 - py3-none-macosx_10_13_universal2 - py3-none-macosx_10_12_universal2 - py3-none-macosx_10_11_universal2 - py3-none-macosx_10_10_universal2 - py3-none-macosx_10_9_universal2 - py3-none-macosx_10_8_universal2 - py3-none-macosx_10_7_universal2 - py3-none-macosx_10_6_universal2 - py3-none-macosx_10_5_universal2 - py3-none-macosx_10_4_universal2 - py38-none-macosx_14_0_arm64 - py38-none-macosx_14_0_universal2 - py38-none-macosx_13_0_arm64 - py38-none-macosx_13_0_universal2 - py38-none-macosx_12_0_arm64 - py38-none-macosx_12_0_universal2 - py38-none-macosx_11_0_arm64 - py38-none-macosx_11_0_universal2 - py38-none-macosx_10_16_universal2 - py38-none-macosx_10_15_universal2 - py38-none-macosx_10_14_universal2 - py38-none-macosx_10_13_universal2 - py38-none-macosx_10_12_universal2 - py38-none-macosx_10_11_universal2 - py38-none-macosx_10_10_universal2 - py38-none-macosx_10_9_universal2 - py38-none-macosx_10_8_universal2 - py38-none-macosx_10_7_universal2 - py38-none-macosx_10_6_universal2 - py38-none-macosx_10_5_universal2 - py38-none-macosx_10_4_universal2 - py37-none-macosx_14_0_arm64 - py37-none-macosx_14_0_universal2 - py37-none-macosx_13_0_arm64 - py37-none-macosx_13_0_universal2 - py37-none-macosx_12_0_arm64 - py37-none-macosx_12_0_universal2 - py37-none-macosx_11_0_arm64 - py37-none-macosx_11_0_universal2 - py37-none-macosx_10_16_universal2 - py37-none-macosx_10_15_universal2 - py37-none-macosx_10_14_universal2 - py37-none-macosx_10_13_universal2 - py37-none-macosx_10_12_universal2 - py37-none-macosx_10_11_universal2 - py37-none-macosx_10_10_universal2 - py37-none-macosx_10_9_universal2 - py37-none-macosx_10_8_universal2 - py37-none-macosx_10_7_universal2 - py37-none-macosx_10_6_universal2 - py37-none-macosx_10_5_universal2 - py37-none-macosx_10_4_universal2 - py36-none-macosx_14_0_arm64 - py36-none-macosx_14_0_universal2 - py36-none-macosx_13_0_arm64 - py36-none-macosx_13_0_universal2 - py36-none-macosx_12_0_arm64 - py36-none-macosx_12_0_universal2 - py36-none-macosx_11_0_arm64 - py36-none-macosx_11_0_universal2 - py36-none-macosx_10_16_universal2 - py36-none-macosx_10_15_universal2 - py36-none-macosx_10_14_universal2 - py36-none-macosx_10_13_universal2 - py36-none-macosx_10_12_universal2 - py36-none-macosx_10_11_universal2 - py36-none-macosx_10_10_universal2 - py36-none-macosx_10_9_universal2 - py36-none-macosx_10_8_universal2 - py36-none-macosx_10_7_universal2 - py36-none-macosx_10_6_universal2 - py36-none-macosx_10_5_universal2 - py36-none-macosx_10_4_universal2 - py35-none-macosx_14_0_arm64 - py35-none-macosx_14_0_universal2 - py35-none-macosx_13_0_arm64 - py35-none-macosx_13_0_universal2 - py35-none-macosx_12_0_arm64 - py35-none-macosx_12_0_universal2 - py35-none-macosx_11_0_arm64 - py35-none-macosx_11_0_universal2 - py35-none-macosx_10_16_universal2 - py35-none-macosx_10_15_universal2 - py35-none-macosx_10_14_universal2 - py35-none-macosx_10_13_universal2 - py35-none-macosx_10_12_universal2 - py35-none-macosx_10_11_universal2 - py35-none-macosx_10_10_universal2 - py35-none-macosx_10_9_universal2 - py35-none-macosx_10_8_universal2 - py35-none-macosx_10_7_universal2 - py35-none-macosx_10_6_universal2 - py35-none-macosx_10_5_universal2 - py35-none-macosx_10_4_universal2 - py34-none-macosx_14_0_arm64 - py34-none-macosx_14_0_universal2 - py34-none-macosx_13_0_arm64 - py34-none-macosx_13_0_universal2 - py34-none-macosx_12_0_arm64 - py34-none-macosx_12_0_universal2 - py34-none-macosx_11_0_arm64 - py34-none-macosx_11_0_universal2 - py34-none-macosx_10_16_universal2 - py34-none-macosx_10_15_universal2 - py34-none-macosx_10_14_universal2 - py34-none-macosx_10_13_universal2 - py34-none-macosx_10_12_universal2 - py34-none-macosx_10_11_universal2 - py34-none-macosx_10_10_universal2 - py34-none-macosx_10_9_universal2 - py34-none-macosx_10_8_universal2 - py34-none-macosx_10_7_universal2 - py34-none-macosx_10_6_universal2 - py34-none-macosx_10_5_universal2 - py34-none-macosx_10_4_universal2 - py33-none-macosx_14_0_arm64 - py33-none-macosx_14_0_universal2 - py33-none-macosx_13_0_arm64 - py33-none-macosx_13_0_universal2 - py33-none-macosx_12_0_arm64 - py33-none-macosx_12_0_universal2 - py33-none-macosx_11_0_arm64 - py33-none-macosx_11_0_universal2 - py33-none-macosx_10_16_universal2 - py33-none-macosx_10_15_universal2 - py33-none-macosx_10_14_universal2 - py33-none-macosx_10_13_universal2 - py33-none-macosx_10_12_universal2 - py33-none-macosx_10_11_universal2 - py33-none-macosx_10_10_universal2 - py33-none-macosx_10_9_universal2 - py33-none-macosx_10_8_universal2 - py33-none-macosx_10_7_universal2 - py33-none-macosx_10_6_universal2 - py33-none-macosx_10_5_universal2 - py33-none-macosx_10_4_universal2 - py32-none-macosx_14_0_arm64 - py32-none-macosx_14_0_universal2 - py32-none-macosx_13_0_arm64 - py32-none-macosx_13_0_universal2 - py32-none-macosx_12_0_arm64 - py32-none-macosx_12_0_universal2 - py32-none-macosx_11_0_arm64 - py32-none-macosx_11_0_universal2 - py32-none-macosx_10_16_universal2 - py32-none-macosx_10_15_universal2 - py32-none-macosx_10_14_universal2 - py32-none-macosx_10_13_universal2 - py32-none-macosx_10_12_universal2 - py32-none-macosx_10_11_universal2 - py32-none-macosx_10_10_universal2 - py32-none-macosx_10_9_universal2 - py32-none-macosx_10_8_universal2 - py32-none-macosx_10_7_universal2 - py32-none-macosx_10_6_universal2 - py32-none-macosx_10_5_universal2 - py32-none-macosx_10_4_universal2 - py31-none-macosx_14_0_arm64 - py31-none-macosx_14_0_universal2 - py31-none-macosx_13_0_arm64 - py31-none-macosx_13_0_universal2 - py31-none-macosx_12_0_arm64 - py31-none-macosx_12_0_universal2 - py31-none-macosx_11_0_arm64 - py31-none-macosx_11_0_universal2 - py31-none-macosx_10_16_universal2 - py31-none-macosx_10_15_universal2 - py31-none-macosx_10_14_universal2 - py31-none-macosx_10_13_universal2 - py31-none-macosx_10_12_universal2 - py31-none-macosx_10_11_universal2 - py31-none-macosx_10_10_universal2 - py31-none-macosx_10_9_universal2 - py31-none-macosx_10_8_universal2 - py31-none-macosx_10_7_universal2 - py31-none-macosx_10_6_universal2 - py31-none-macosx_10_5_universal2 - py31-none-macosx_10_4_universal2 - py30-none-macosx_14_0_arm64 - py30-none-macosx_14_0_universal2 - py30-none-macosx_13_0_arm64 - py30-none-macosx_13_0_universal2 - py30-none-macosx_12_0_arm64 - py30-none-macosx_12_0_universal2 - py30-none-macosx_11_0_arm64 - py30-none-macosx_11_0_universal2 - py30-none-macosx_10_16_universal2 - py30-none-macosx_10_15_universal2 - py30-none-macosx_10_14_universal2 - py30-none-macosx_10_13_universal2 - py30-none-macosx_10_12_universal2 - py30-none-macosx_10_11_universal2 - py30-none-macosx_10_10_universal2 - py30-none-macosx_10_9_universal2 - py30-none-macosx_10_8_universal2 - py30-none-macosx_10_7_universal2 - py30-none-macosx_10_6_universal2 - py30-none-macosx_10_5_universal2 - py30-none-macosx_10_4_universal2 - cp39-none-any - py39-none-any - py3-none-any - py38-none-any - py37-none-any - py36-none-any - py35-none-any - py34-none-any - py33-none-any - py32-none-any - py31-none-any - py30-none-any - "### + @" + cp39-cp39-macosx_14_0_arm64 + cp39-cp39-macosx_14_0_universal2 + cp39-cp39-macosx_13_0_arm64 + cp39-cp39-macosx_13_0_universal2 + cp39-cp39-macosx_12_0_arm64 + cp39-cp39-macosx_12_0_universal2 + cp39-cp39-macosx_11_0_arm64 + cp39-cp39-macosx_11_0_universal2 + cp39-cp39-macosx_10_16_universal2 + cp39-cp39-macosx_10_15_universal2 + cp39-cp39-macosx_10_14_universal2 + cp39-cp39-macosx_10_13_universal2 + cp39-cp39-macosx_10_12_universal2 + cp39-cp39-macosx_10_11_universal2 + cp39-cp39-macosx_10_10_universal2 + cp39-cp39-macosx_10_9_universal2 + cp39-cp39-macosx_10_8_universal2 + cp39-cp39-macosx_10_7_universal2 + cp39-cp39-macosx_10_6_universal2 + cp39-cp39-macosx_10_5_universal2 + cp39-cp39-macosx_10_4_universal2 + cp39-abi3-macosx_14_0_arm64 + cp39-abi3-macosx_14_0_universal2 + cp39-abi3-macosx_13_0_arm64 + cp39-abi3-macosx_13_0_universal2 + cp39-abi3-macosx_12_0_arm64 + cp39-abi3-macosx_12_0_universal2 + cp39-abi3-macosx_11_0_arm64 + cp39-abi3-macosx_11_0_universal2 + cp39-abi3-macosx_10_16_universal2 + cp39-abi3-macosx_10_15_universal2 + cp39-abi3-macosx_10_14_universal2 + cp39-abi3-macosx_10_13_universal2 + cp39-abi3-macosx_10_12_universal2 + cp39-abi3-macosx_10_11_universal2 + cp39-abi3-macosx_10_10_universal2 + cp39-abi3-macosx_10_9_universal2 + cp39-abi3-macosx_10_8_universal2 + cp39-abi3-macosx_10_7_universal2 + cp39-abi3-macosx_10_6_universal2 + cp39-abi3-macosx_10_5_universal2 + cp39-abi3-macosx_10_4_universal2 + cp39-none-macosx_14_0_arm64 + cp39-none-macosx_14_0_universal2 + cp39-none-macosx_13_0_arm64 + cp39-none-macosx_13_0_universal2 + cp39-none-macosx_12_0_arm64 + cp39-none-macosx_12_0_universal2 + cp39-none-macosx_11_0_arm64 + cp39-none-macosx_11_0_universal2 + cp39-none-macosx_10_16_universal2 + cp39-none-macosx_10_15_universal2 + cp39-none-macosx_10_14_universal2 + cp39-none-macosx_10_13_universal2 + cp39-none-macosx_10_12_universal2 + cp39-none-macosx_10_11_universal2 + cp39-none-macosx_10_10_universal2 + cp39-none-macosx_10_9_universal2 + cp39-none-macosx_10_8_universal2 + cp39-none-macosx_10_7_universal2 + cp39-none-macosx_10_6_universal2 + cp39-none-macosx_10_5_universal2 + cp39-none-macosx_10_4_universal2 + cp38-abi3-macosx_14_0_arm64 + cp38-abi3-macosx_14_0_universal2 + cp38-abi3-macosx_13_0_arm64 + cp38-abi3-macosx_13_0_universal2 + cp38-abi3-macosx_12_0_arm64 + cp38-abi3-macosx_12_0_universal2 + cp38-abi3-macosx_11_0_arm64 + cp38-abi3-macosx_11_0_universal2 + cp38-abi3-macosx_10_16_universal2 + cp38-abi3-macosx_10_15_universal2 + cp38-abi3-macosx_10_14_universal2 + cp38-abi3-macosx_10_13_universal2 + cp38-abi3-macosx_10_12_universal2 + cp38-abi3-macosx_10_11_universal2 + cp38-abi3-macosx_10_10_universal2 + cp38-abi3-macosx_10_9_universal2 + cp38-abi3-macosx_10_8_universal2 + cp38-abi3-macosx_10_7_universal2 + cp38-abi3-macosx_10_6_universal2 + cp38-abi3-macosx_10_5_universal2 + cp38-abi3-macosx_10_4_universal2 + cp37-abi3-macosx_14_0_arm64 + cp37-abi3-macosx_14_0_universal2 + cp37-abi3-macosx_13_0_arm64 + cp37-abi3-macosx_13_0_universal2 + cp37-abi3-macosx_12_0_arm64 + cp37-abi3-macosx_12_0_universal2 + cp37-abi3-macosx_11_0_arm64 + cp37-abi3-macosx_11_0_universal2 + cp37-abi3-macosx_10_16_universal2 + cp37-abi3-macosx_10_15_universal2 + cp37-abi3-macosx_10_14_universal2 + cp37-abi3-macosx_10_13_universal2 + cp37-abi3-macosx_10_12_universal2 + cp37-abi3-macosx_10_11_universal2 + cp37-abi3-macosx_10_10_universal2 + cp37-abi3-macosx_10_9_universal2 + cp37-abi3-macosx_10_8_universal2 + cp37-abi3-macosx_10_7_universal2 + cp37-abi3-macosx_10_6_universal2 + cp37-abi3-macosx_10_5_universal2 + cp37-abi3-macosx_10_4_universal2 + cp36-abi3-macosx_14_0_arm64 + cp36-abi3-macosx_14_0_universal2 + cp36-abi3-macosx_13_0_arm64 + cp36-abi3-macosx_13_0_universal2 + cp36-abi3-macosx_12_0_arm64 + cp36-abi3-macosx_12_0_universal2 + cp36-abi3-macosx_11_0_arm64 + cp36-abi3-macosx_11_0_universal2 + cp36-abi3-macosx_10_16_universal2 + cp36-abi3-macosx_10_15_universal2 + cp36-abi3-macosx_10_14_universal2 + cp36-abi3-macosx_10_13_universal2 + cp36-abi3-macosx_10_12_universal2 + cp36-abi3-macosx_10_11_universal2 + cp36-abi3-macosx_10_10_universal2 + cp36-abi3-macosx_10_9_universal2 + cp36-abi3-macosx_10_8_universal2 + cp36-abi3-macosx_10_7_universal2 + cp36-abi3-macosx_10_6_universal2 + cp36-abi3-macosx_10_5_universal2 + cp36-abi3-macosx_10_4_universal2 + cp35-abi3-macosx_14_0_arm64 + cp35-abi3-macosx_14_0_universal2 + cp35-abi3-macosx_13_0_arm64 + cp35-abi3-macosx_13_0_universal2 + cp35-abi3-macosx_12_0_arm64 + cp35-abi3-macosx_12_0_universal2 + cp35-abi3-macosx_11_0_arm64 + cp35-abi3-macosx_11_0_universal2 + cp35-abi3-macosx_10_16_universal2 + cp35-abi3-macosx_10_15_universal2 + cp35-abi3-macosx_10_14_universal2 + cp35-abi3-macosx_10_13_universal2 + cp35-abi3-macosx_10_12_universal2 + cp35-abi3-macosx_10_11_universal2 + cp35-abi3-macosx_10_10_universal2 + cp35-abi3-macosx_10_9_universal2 + cp35-abi3-macosx_10_8_universal2 + cp35-abi3-macosx_10_7_universal2 + cp35-abi3-macosx_10_6_universal2 + cp35-abi3-macosx_10_5_universal2 + cp35-abi3-macosx_10_4_universal2 + cp34-abi3-macosx_14_0_arm64 + cp34-abi3-macosx_14_0_universal2 + cp34-abi3-macosx_13_0_arm64 + cp34-abi3-macosx_13_0_universal2 + cp34-abi3-macosx_12_0_arm64 + cp34-abi3-macosx_12_0_universal2 + cp34-abi3-macosx_11_0_arm64 + cp34-abi3-macosx_11_0_universal2 + cp34-abi3-macosx_10_16_universal2 + cp34-abi3-macosx_10_15_universal2 + cp34-abi3-macosx_10_14_universal2 + cp34-abi3-macosx_10_13_universal2 + cp34-abi3-macosx_10_12_universal2 + cp34-abi3-macosx_10_11_universal2 + cp34-abi3-macosx_10_10_universal2 + cp34-abi3-macosx_10_9_universal2 + cp34-abi3-macosx_10_8_universal2 + cp34-abi3-macosx_10_7_universal2 + cp34-abi3-macosx_10_6_universal2 + cp34-abi3-macosx_10_5_universal2 + cp34-abi3-macosx_10_4_universal2 + cp33-abi3-macosx_14_0_arm64 + cp33-abi3-macosx_14_0_universal2 + cp33-abi3-macosx_13_0_arm64 + cp33-abi3-macosx_13_0_universal2 + cp33-abi3-macosx_12_0_arm64 + cp33-abi3-macosx_12_0_universal2 + cp33-abi3-macosx_11_0_arm64 + cp33-abi3-macosx_11_0_universal2 + cp33-abi3-macosx_10_16_universal2 + cp33-abi3-macosx_10_15_universal2 + cp33-abi3-macosx_10_14_universal2 + cp33-abi3-macosx_10_13_universal2 + cp33-abi3-macosx_10_12_universal2 + cp33-abi3-macosx_10_11_universal2 + cp33-abi3-macosx_10_10_universal2 + cp33-abi3-macosx_10_9_universal2 + cp33-abi3-macosx_10_8_universal2 + cp33-abi3-macosx_10_7_universal2 + cp33-abi3-macosx_10_6_universal2 + cp33-abi3-macosx_10_5_universal2 + cp33-abi3-macosx_10_4_universal2 + cp32-abi3-macosx_14_0_arm64 + cp32-abi3-macosx_14_0_universal2 + cp32-abi3-macosx_13_0_arm64 + cp32-abi3-macosx_13_0_universal2 + cp32-abi3-macosx_12_0_arm64 + cp32-abi3-macosx_12_0_universal2 + cp32-abi3-macosx_11_0_arm64 + cp32-abi3-macosx_11_0_universal2 + cp32-abi3-macosx_10_16_universal2 + cp32-abi3-macosx_10_15_universal2 + cp32-abi3-macosx_10_14_universal2 + cp32-abi3-macosx_10_13_universal2 + cp32-abi3-macosx_10_12_universal2 + cp32-abi3-macosx_10_11_universal2 + cp32-abi3-macosx_10_10_universal2 + cp32-abi3-macosx_10_9_universal2 + cp32-abi3-macosx_10_8_universal2 + cp32-abi3-macosx_10_7_universal2 + cp32-abi3-macosx_10_6_universal2 + cp32-abi3-macosx_10_5_universal2 + cp32-abi3-macosx_10_4_universal2 + py39-none-macosx_14_0_arm64 + py39-none-macosx_14_0_universal2 + py39-none-macosx_13_0_arm64 + py39-none-macosx_13_0_universal2 + py39-none-macosx_12_0_arm64 + py39-none-macosx_12_0_universal2 + py39-none-macosx_11_0_arm64 + py39-none-macosx_11_0_universal2 + py39-none-macosx_10_16_universal2 + py39-none-macosx_10_15_universal2 + py39-none-macosx_10_14_universal2 + py39-none-macosx_10_13_universal2 + py39-none-macosx_10_12_universal2 + py39-none-macosx_10_11_universal2 + py39-none-macosx_10_10_universal2 + py39-none-macosx_10_9_universal2 + py39-none-macosx_10_8_universal2 + py39-none-macosx_10_7_universal2 + py39-none-macosx_10_6_universal2 + py39-none-macosx_10_5_universal2 + py39-none-macosx_10_4_universal2 + py3-none-macosx_14_0_arm64 + py3-none-macosx_14_0_universal2 + py3-none-macosx_13_0_arm64 + py3-none-macosx_13_0_universal2 + py3-none-macosx_12_0_arm64 + py3-none-macosx_12_0_universal2 + py3-none-macosx_11_0_arm64 + py3-none-macosx_11_0_universal2 + py3-none-macosx_10_16_universal2 + py3-none-macosx_10_15_universal2 + py3-none-macosx_10_14_universal2 + py3-none-macosx_10_13_universal2 + py3-none-macosx_10_12_universal2 + py3-none-macosx_10_11_universal2 + py3-none-macosx_10_10_universal2 + py3-none-macosx_10_9_universal2 + py3-none-macosx_10_8_universal2 + py3-none-macosx_10_7_universal2 + py3-none-macosx_10_6_universal2 + py3-none-macosx_10_5_universal2 + py3-none-macosx_10_4_universal2 + py38-none-macosx_14_0_arm64 + py38-none-macosx_14_0_universal2 + py38-none-macosx_13_0_arm64 + py38-none-macosx_13_0_universal2 + py38-none-macosx_12_0_arm64 + py38-none-macosx_12_0_universal2 + py38-none-macosx_11_0_arm64 + py38-none-macosx_11_0_universal2 + py38-none-macosx_10_16_universal2 + py38-none-macosx_10_15_universal2 + py38-none-macosx_10_14_universal2 + py38-none-macosx_10_13_universal2 + py38-none-macosx_10_12_universal2 + py38-none-macosx_10_11_universal2 + py38-none-macosx_10_10_universal2 + py38-none-macosx_10_9_universal2 + py38-none-macosx_10_8_universal2 + py38-none-macosx_10_7_universal2 + py38-none-macosx_10_6_universal2 + py38-none-macosx_10_5_universal2 + py38-none-macosx_10_4_universal2 + py37-none-macosx_14_0_arm64 + py37-none-macosx_14_0_universal2 + py37-none-macosx_13_0_arm64 + py37-none-macosx_13_0_universal2 + py37-none-macosx_12_0_arm64 + py37-none-macosx_12_0_universal2 + py37-none-macosx_11_0_arm64 + py37-none-macosx_11_0_universal2 + py37-none-macosx_10_16_universal2 + py37-none-macosx_10_15_universal2 + py37-none-macosx_10_14_universal2 + py37-none-macosx_10_13_universal2 + py37-none-macosx_10_12_universal2 + py37-none-macosx_10_11_universal2 + py37-none-macosx_10_10_universal2 + py37-none-macosx_10_9_universal2 + py37-none-macosx_10_8_universal2 + py37-none-macosx_10_7_universal2 + py37-none-macosx_10_6_universal2 + py37-none-macosx_10_5_universal2 + py37-none-macosx_10_4_universal2 + py36-none-macosx_14_0_arm64 + py36-none-macosx_14_0_universal2 + py36-none-macosx_13_0_arm64 + py36-none-macosx_13_0_universal2 + py36-none-macosx_12_0_arm64 + py36-none-macosx_12_0_universal2 + py36-none-macosx_11_0_arm64 + py36-none-macosx_11_0_universal2 + py36-none-macosx_10_16_universal2 + py36-none-macosx_10_15_universal2 + py36-none-macosx_10_14_universal2 + py36-none-macosx_10_13_universal2 + py36-none-macosx_10_12_universal2 + py36-none-macosx_10_11_universal2 + py36-none-macosx_10_10_universal2 + py36-none-macosx_10_9_universal2 + py36-none-macosx_10_8_universal2 + py36-none-macosx_10_7_universal2 + py36-none-macosx_10_6_universal2 + py36-none-macosx_10_5_universal2 + py36-none-macosx_10_4_universal2 + py35-none-macosx_14_0_arm64 + py35-none-macosx_14_0_universal2 + py35-none-macosx_13_0_arm64 + py35-none-macosx_13_0_universal2 + py35-none-macosx_12_0_arm64 + py35-none-macosx_12_0_universal2 + py35-none-macosx_11_0_arm64 + py35-none-macosx_11_0_universal2 + py35-none-macosx_10_16_universal2 + py35-none-macosx_10_15_universal2 + py35-none-macosx_10_14_universal2 + py35-none-macosx_10_13_universal2 + py35-none-macosx_10_12_universal2 + py35-none-macosx_10_11_universal2 + py35-none-macosx_10_10_universal2 + py35-none-macosx_10_9_universal2 + py35-none-macosx_10_8_universal2 + py35-none-macosx_10_7_universal2 + py35-none-macosx_10_6_universal2 + py35-none-macosx_10_5_universal2 + py35-none-macosx_10_4_universal2 + py34-none-macosx_14_0_arm64 + py34-none-macosx_14_0_universal2 + py34-none-macosx_13_0_arm64 + py34-none-macosx_13_0_universal2 + py34-none-macosx_12_0_arm64 + py34-none-macosx_12_0_universal2 + py34-none-macosx_11_0_arm64 + py34-none-macosx_11_0_universal2 + py34-none-macosx_10_16_universal2 + py34-none-macosx_10_15_universal2 + py34-none-macosx_10_14_universal2 + py34-none-macosx_10_13_universal2 + py34-none-macosx_10_12_universal2 + py34-none-macosx_10_11_universal2 + py34-none-macosx_10_10_universal2 + py34-none-macosx_10_9_universal2 + py34-none-macosx_10_8_universal2 + py34-none-macosx_10_7_universal2 + py34-none-macosx_10_6_universal2 + py34-none-macosx_10_5_universal2 + py34-none-macosx_10_4_universal2 + py33-none-macosx_14_0_arm64 + py33-none-macosx_14_0_universal2 + py33-none-macosx_13_0_arm64 + py33-none-macosx_13_0_universal2 + py33-none-macosx_12_0_arm64 + py33-none-macosx_12_0_universal2 + py33-none-macosx_11_0_arm64 + py33-none-macosx_11_0_universal2 + py33-none-macosx_10_16_universal2 + py33-none-macosx_10_15_universal2 + py33-none-macosx_10_14_universal2 + py33-none-macosx_10_13_universal2 + py33-none-macosx_10_12_universal2 + py33-none-macosx_10_11_universal2 + py33-none-macosx_10_10_universal2 + py33-none-macosx_10_9_universal2 + py33-none-macosx_10_8_universal2 + py33-none-macosx_10_7_universal2 + py33-none-macosx_10_6_universal2 + py33-none-macosx_10_5_universal2 + py33-none-macosx_10_4_universal2 + py32-none-macosx_14_0_arm64 + py32-none-macosx_14_0_universal2 + py32-none-macosx_13_0_arm64 + py32-none-macosx_13_0_universal2 + py32-none-macosx_12_0_arm64 + py32-none-macosx_12_0_universal2 + py32-none-macosx_11_0_arm64 + py32-none-macosx_11_0_universal2 + py32-none-macosx_10_16_universal2 + py32-none-macosx_10_15_universal2 + py32-none-macosx_10_14_universal2 + py32-none-macosx_10_13_universal2 + py32-none-macosx_10_12_universal2 + py32-none-macosx_10_11_universal2 + py32-none-macosx_10_10_universal2 + py32-none-macosx_10_9_universal2 + py32-none-macosx_10_8_universal2 + py32-none-macosx_10_7_universal2 + py32-none-macosx_10_6_universal2 + py32-none-macosx_10_5_universal2 + py32-none-macosx_10_4_universal2 + py31-none-macosx_14_0_arm64 + py31-none-macosx_14_0_universal2 + py31-none-macosx_13_0_arm64 + py31-none-macosx_13_0_universal2 + py31-none-macosx_12_0_arm64 + py31-none-macosx_12_0_universal2 + py31-none-macosx_11_0_arm64 + py31-none-macosx_11_0_universal2 + py31-none-macosx_10_16_universal2 + py31-none-macosx_10_15_universal2 + py31-none-macosx_10_14_universal2 + py31-none-macosx_10_13_universal2 + py31-none-macosx_10_12_universal2 + py31-none-macosx_10_11_universal2 + py31-none-macosx_10_10_universal2 + py31-none-macosx_10_9_universal2 + py31-none-macosx_10_8_universal2 + py31-none-macosx_10_7_universal2 + py31-none-macosx_10_6_universal2 + py31-none-macosx_10_5_universal2 + py31-none-macosx_10_4_universal2 + py30-none-macosx_14_0_arm64 + py30-none-macosx_14_0_universal2 + py30-none-macosx_13_0_arm64 + py30-none-macosx_13_0_universal2 + py30-none-macosx_12_0_arm64 + py30-none-macosx_12_0_universal2 + py30-none-macosx_11_0_arm64 + py30-none-macosx_11_0_universal2 + py30-none-macosx_10_16_universal2 + py30-none-macosx_10_15_universal2 + py30-none-macosx_10_14_universal2 + py30-none-macosx_10_13_universal2 + py30-none-macosx_10_12_universal2 + py30-none-macosx_10_11_universal2 + py30-none-macosx_10_10_universal2 + py30-none-macosx_10_9_universal2 + py30-none-macosx_10_8_universal2 + py30-none-macosx_10_7_universal2 + py30-none-macosx_10_6_universal2 + py30-none-macosx_10_5_universal2 + py30-none-macosx_10_4_universal2 + cp39-none-any + py39-none-any + py3-none-any + py38-none-any + py37-none-any + py36-none-any + py35-none-any + py34-none-any + py33-none-any + py32-none-any + py31-none-any + py30-none-any + " ); } } diff --git a/crates/uv-publish/src/lib.rs b/crates/uv-publish/src/lib.rs index b1a5a73df..6ee6c2d04 100644 --- a/crates/uv-publish/src/lib.rs +++ b/crates/uv-publish/src/lib.rs @@ -1775,7 +1775,7 @@ mod tests { .iter() .map(|(k, v)| format!("{k}: {v}")) .join("\n"); - assert_snapshot!(&formatted_metadata, @r" + assert_snapshot!(&formatted_metadata, @" :action: file_upload sha256_digest: 89fa05cffa7f457658373b85de302d24d0c205ceda2819a8739e324b75e9430b blake2_256_digest: 40ab79b48c4e289e4990f7e689177adae4096c07a634034eb1d10c0b6700e4d2 @@ -2082,7 +2082,7 @@ mod tests { let capture = anstream::adapter::strip_str(&capture); assert_snapshot!( &capture, - @r" + @" error: Failed to publish `../../test/links/tqdm-4.66.1-py3-none-manylinux_2_12_x86_64.manylinux2010_x86_64.musllinux_1_1_x86_64.whl` to [SERVER]/final Caused by: Too many redirects, only 10 redirects are allowed " @@ -2110,7 +2110,7 @@ mod tests { let capture = anstream::adapter::strip_str(&capture); assert_snapshot!( &capture, - @r" + @" error: Failed to publish `../../test/links/tqdm-4.66.1-py3-none-manylinux_2_12_x86_64.manylinux2010_x86_64.musllinux_1_1_x86_64.whl` to https://different.auth.tld/final/ Caused by: Redirected URL is not in the same realm. Redirected to: https://different.auth.tld/final/ " diff --git a/crates/uv-python/src/sysconfig/mod.rs b/crates/uv-python/src/sysconfig/mod.rs index bc0f0ae21..14c52846f 100644 --- a/crates/uv-python/src/sysconfig/mod.rs +++ b/crates/uv-python/src/sysconfig/mod.rs @@ -305,7 +305,7 @@ mod tests { let real_prefix = Path::new("/real/prefix"); let data = patch_sysconfigdata(sysconfigdata, real_prefix); - insta::assert_snapshot!(data.to_string_pretty()?, @r###" + insta::assert_snapshot!(data.to_string_pretty()?, @r#" # system configuration generated and used by the sysconfig module build_time_vars = { "BASEMODLIBS": "", @@ -318,7 +318,7 @@ mod tests { "exec_prefix": "/real/prefix/exec_prefix", "prefix": "/real/prefix/prefix" } - "###); + "#); Ok(()) } @@ -337,7 +337,7 @@ mod tests { let real_prefix = Path::new("/real/prefix"); let data = patch_sysconfigdata(sysconfigdata, real_prefix); - insta::assert_snapshot!(data.to_string_pretty()?, @r##" + insta::assert_snapshot!(data.to_string_pretty()?, @r#" # system configuration generated and used by the sysconfig module build_time_vars = { "AR": "ar", @@ -345,7 +345,7 @@ mod tests { "CXX": "c++ -pthread", "PYTHON_BUILD_STANDALONE": 1 } - "##); + "#); // Cross-compiles use GNU let sysconfigdata = [ @@ -359,14 +359,14 @@ mod tests { let real_prefix = Path::new("/real/prefix"); let data = patch_sysconfigdata(sysconfigdata, real_prefix); - insta::assert_snapshot!(data.to_string_pretty()?, @r##" + insta::assert_snapshot!(data.to_string_pretty()?, @r#" # system configuration generated and used by the sysconfig module build_time_vars = { "CC": "cc", "CXX": "c++", "PYTHON_BUILD_STANDALONE": 1 } - "##); + "#); Ok(()) } @@ -383,13 +383,13 @@ mod tests { let real_prefix = Path::new("/real/prefix"); let data = patch_sysconfigdata(sysconfigdata, real_prefix); - insta::assert_snapshot!(data.to_string_pretty()?, @r###" + insta::assert_snapshot!(data.to_string_pretty()?, @r#" # system configuration generated and used by the sysconfig module build_time_vars = { "BLDSHARED": "cc -bundle -undefined dynamic_lookup -arch arm64", "PYTHON_BUILD_STANDALONE": 1 } - "###); + "#); Ok(()) } @@ -416,7 +416,7 @@ mod tests { let pkgconfig = patch_pkgconfig(pkgconfig).unwrap(); - insta::assert_snapshot!(pkgconfig, @r###" + insta::assert_snapshot!(pkgconfig, @" # See: man pkg-config prefix=${pcfiledir}/../.. exec_prefix=${prefix} @@ -430,6 +430,6 @@ mod tests { Libs.private: -ldl -framework CoreFoundation Libs: Cflags: -I${includedir}/python3.10 - "###); + "); } } diff --git a/crates/uv-python/src/sysconfig/parser.rs b/crates/uv-python/src/sysconfig/parser.rs index 745cad89a..5fbbb2a57 100644 --- a/crates/uv-python/src/sysconfig/parser.rs +++ b/crates/uv-python/src/sysconfig/parser.rs @@ -287,14 +287,14 @@ mod tests { let result = input.parse::().expect("Parsing failed"); let snapshot = result.to_string_pretty().unwrap(); - insta::assert_snapshot!(snapshot, @r###" + insta::assert_snapshot!(snapshot, @r#" # system configuration generated and used by the sysconfig module build_time_vars = { "key1": "value1", "key2": 42, "key3": "multi-part string" } - "###); + "#); } #[test] @@ -314,7 +314,7 @@ mod tests { let result = input.parse::().expect("Parsing failed"); let snapshot = result.to_string_pretty().unwrap(); - insta::assert_snapshot!(snapshot, @r###" + insta::assert_snapshot!(snapshot, @r#" # system configuration generated and used by the sysconfig module build_time_vars = { "key1": "value1\"value2\"value3", @@ -322,7 +322,7 @@ mod tests { "key3": "value1\\\"value2\\\"value3", "key4": "value1\\\\value2\\\\value3" } - "###); + "#); } #[test] @@ -371,14 +371,14 @@ mod tests { let result = input.parse::().expect("Parsing failed"); let snapshot = result.to_string_pretty().unwrap(); - insta::assert_snapshot!(snapshot, @r###" + insta::assert_snapshot!(snapshot, @r#" # system configuration generated and used by the sysconfig module build_time_vars = { "key1": "value1", "key2": 42, "key3": "multi-part string" } - "###); + "#); } #[test] @@ -396,13 +396,13 @@ mod tests { let result = input.parse::().expect("Parsing failed"); let snapshot = result.to_string_pretty().unwrap(); - insta::assert_snapshot!(snapshot, @r###" + insta::assert_snapshot!(snapshot, @r#" # system configuration generated and used by the sysconfig module build_time_vars = { "key1": 12345, "key2": -15 } - "###); + "#); } #[test] @@ -420,13 +420,13 @@ mod tests { let result = input.parse::().expect("Parsing failed"); let snapshot = result.to_string_pretty().unwrap(); - insta::assert_snapshot!(snapshot, @r###" + insta::assert_snapshot!(snapshot, @r#" # system configuration generated and used by the sysconfig module build_time_vars = { "key1": "value with \"escaped quotes\"", "key2": "single-quoted 'escaped'" } - "###); + "#); } #[test] @@ -445,12 +445,12 @@ mod tests { let result = input.parse::().expect("Parsing failed"); let snapshot = result.to_string_pretty().unwrap(); - insta::assert_snapshot!(snapshot, @r###" + insta::assert_snapshot!(snapshot, @r#" # system configuration generated and used by the sysconfig module build_time_vars = { "key1": "multi-line string" } - "###); + "#); } #[test] diff --git a/crates/uv-requirements-txt/src/lib.rs b/crates/uv-requirements-txt/src/lib.rs index d48c21386..598ccb3f6 100644 --- a/crates/uv-requirements-txt/src/lib.rs +++ b/crates/uv-requirements-txt/src/lib.rs @@ -1736,10 +1736,10 @@ mod test { insta::with_settings!({ filters => filters, }, { - insta::assert_snapshot!(errors, @r###" + insta::assert_snapshot!(errors, @" Error parsing included file in `` at position 0 failed to read from file ``: The system cannot find the path specified. (os error 2) - "###); + "); }); Ok(()) @@ -1763,12 +1763,12 @@ mod test { insta::with_settings!({ filters => filters }, { - insta::assert_snapshot!(errors, @r###" + insta::assert_snapshot!(errors, @" Couldn't parse requirement in `` at position 0 Expected an alphanumeric character starting the extra name, found `ö` numpy[ö]==1.29 ^ - "###); + "); }); Ok(()) @@ -1792,12 +1792,12 @@ mod test { insta::with_settings!({ filters => filters }, { - insta::assert_snapshot!(errors, @r###" + insta::assert_snapshot!(errors, @" Couldn't parse requirement in `` at position 0 empty host numpy @ https:/// ^^^^^^^^^ - "###); + "); }); Ok(()) @@ -1821,12 +1821,12 @@ mod test { insta::with_settings!({ filters => filters }, { - insta::assert_snapshot!(errors, @r###" + insta::assert_snapshot!(errors, @" Couldn't parse requirement in `` at position 3 Expected direct URL (`https://localhost:8080/`) to end in a supported file extension: `.whl`, `.tar.gz`, `.zip`, `.tar.bz2`, `.tar.lz`, `.tar.lzma`, `.tar.xz`, `.tar.zst`, `.tar`, `.tbz`, `.tgz`, `.tlz`, or `.txz` https://localhost:8080/ ^^^^^^^^^^^^^^^^^^^^^^^ - "###); + "); }); Ok(()) @@ -1850,10 +1850,10 @@ mod test { insta::with_settings!({ filters => filters }, { - insta::assert_snapshot!(errors, @r###" + insta::assert_snapshot!(errors, @" Unsupported editable requirement in `` Editable must refer to a local directory, not an HTTPS URL: `https://files.pythonhosted.org/packages/f7/69/96766da2cdb5605e6a31ef2734aff0be17901cefb385b885c2ab88896d76/ruff-0.5.6.tar.gz` - "###); + "); }); Ok(()) @@ -1877,12 +1877,12 @@ mod test { insta::with_settings!({ filters => filters }, { - insta::assert_snapshot!(errors, @r###" + insta::assert_snapshot!(errors, @" Couldn't parse requirement in `` at position 3 Expected either alphanumerical character (starting the extra name) or `]` (ending the extras section), found `,` black[,abcdef] ^ - "###); + "); }); Ok(()) @@ -1906,10 +1906,10 @@ mod test { insta::with_settings!({ filters => filters }, { - insta::assert_snapshot!(errors, @r###" + insta::assert_snapshot!(errors, @" Invalid URL in `` at position 0: `123` relative URL without a base - "###); + "); }); Ok(()) @@ -1933,10 +1933,10 @@ mod test { insta::with_settings!({ filters => filters }, { - insta::assert_snapshot!(errors, @r###" + insta::assert_snapshot!(errors, @" Invalid URL in `` at position 0: `https:////` empty host - "###); + "); }); Ok(()) @@ -2026,7 +2026,7 @@ mod test { insta::with_settings!({ filters => path_filters(&path_filter(temp_dir.path())), }, { - insta::assert_debug_snapshot!(requirements, @r###" + insta::assert_debug_snapshot!(requirements, @r#" RequirementsTxt { requirements: [ RequirementEntry { @@ -2057,7 +2057,7 @@ mod test { no_binary: None, only_binary: None, } - "###); + "#); }); Ok(()) @@ -2086,7 +2086,7 @@ mod test { insta::with_settings!({ filters => path_filters(&path_filter(temp_dir.path())), }, { - insta::assert_debug_snapshot!(requirements, @r###" + insta::assert_debug_snapshot!(requirements, @r#" RequirementsTxt { requirements: [ RequirementEntry { @@ -2123,7 +2123,7 @@ mod test { ), only_binary: None, } - "###); + "#); }); Ok(()) @@ -2851,9 +2851,7 @@ mod test { insta::with_settings!({ filters => filters }, { - insta::assert_snapshot!(errors, @r###" - Unexpected '-', expected '-c', '-e', '-r' or the start of a requirement at :2:3 - "###); + insta::assert_snapshot!(errors, @"Unexpected '-', expected '-c', '-e', '-r' or the start of a requirement at :2:3"); }); Ok(()) diff --git a/crates/uv-requirements-txt/src/snapshots/uv_requirements_txt__test__line-endings-poetry-with-hashes.txt.snap b/crates/uv-requirements-txt/src/snapshots/uv_requirements_txt__test__line-endings-poetry-with-hashes.txt.snap index e13ab75b7..bddbc6f3f 100644 --- a/crates/uv-requirements-txt/src/snapshots/uv_requirements_txt__test__line-endings-poetry-with-hashes.txt.snap +++ b/crates/uv-requirements-txt/src/snapshots/uv_requirements_txt__test__line-endings-poetry-with-hashes.txt.snap @@ -1,7 +1,6 @@ --- source: crates/uv-requirements-txt/src/lib.rs expression: actual -snapshot_kind: text --- RequirementsTxt { requirements: [ diff --git a/crates/uv-requirements-txt/src/snapshots/uv_requirements_txt__test__parse-poetry-with-hashes.txt.snap b/crates/uv-requirements-txt/src/snapshots/uv_requirements_txt__test__parse-poetry-with-hashes.txt.snap index e13ab75b7..bddbc6f3f 100644 --- a/crates/uv-requirements-txt/src/snapshots/uv_requirements_txt__test__parse-poetry-with-hashes.txt.snap +++ b/crates/uv-requirements-txt/src/snapshots/uv_requirements_txt__test__parse-poetry-with-hashes.txt.snap @@ -1,7 +1,6 @@ --- source: crates/uv-requirements-txt/src/lib.rs expression: actual -snapshot_kind: text --- RequirementsTxt { requirements: [ diff --git a/crates/uv-warnings/src/lib.rs b/crates/uv-warnings/src/lib.rs index deb1df9e6..7683613c0 100644 --- a/crates/uv-warnings/src/lib.rs +++ b/crates/uv-warnings/src/lib.rs @@ -146,7 +146,7 @@ mod tests { write_error_chain(err.as_ref(), &mut rendered, "error", AnsiColors::Red).unwrap(); let rendered = anstream::adapter::strip_str(&rendered); - assert_snapshot!(rendered, @r" + assert_snapshot!(rendered, @" error: Failed to download Python 3.12 Caused by: Failed to fetch https://example.com/upload/python3.13.tar.zst Server says: This endpoint only support POST requests. diff --git a/crates/uv/tests/it/auth.rs b/crates/uv/tests/it/auth.rs index cc682637a..fc4918e32 100644 --- a/crates/uv/tests/it/auth.rs +++ b/crates/uv/tests/it/auth.rs @@ -1082,7 +1082,7 @@ fn login_text_store() { .arg("--username") .arg("public") .arg("--password") - .arg("heron"), @r" + .arg("heron"), @" success: true exit_code: 0 ----- stdout ----- @@ -1096,7 +1096,7 @@ fn login_text_store() { uv_snapshot!(context.auth_login() .arg("https://example.com/simple") .arg("--token") - .arg("test-token"), @r" + .arg("test-token"), @" success: true exit_code: 0 ----- stdout ----- @@ -1112,7 +1112,7 @@ fn login_text_store() { .arg("--username") .arg("") .arg("--password") - .arg("testpass"), @r" + .arg("testpass"), @" success: false exit_code: 2 ----- stdout ----- @@ -1128,7 +1128,7 @@ fn login_text_store() { .arg("--username") .arg("testuser") .arg("--password") - .arg(""), @r" + .arg(""), @" success: false exit_code: 2 ----- stdout ----- @@ -1144,7 +1144,7 @@ fn login_text_store() { .arg("--username") .arg("testuser") .arg("--password") - .arg("testpass"), @r" + .arg("testpass"), @" success: false exit_code: 2 ----- stdout ----- @@ -1161,7 +1161,7 @@ fn login_text_store() { .arg("--username") .arg("testuser") .arg("--password") - .arg("testpass"), @r" + .arg("testpass"), @" success: false exit_code: 2 ----- stdout ----- @@ -1178,7 +1178,7 @@ fn login_text_store() { .arg("--username") .arg("testuser") .arg("--password") - .arg("testpass"), @r" + .arg("testpass"), @" success: true exit_code: 0 ----- stdout ----- @@ -1193,7 +1193,7 @@ fn login_text_store() { .arg("--username") .arg("testuser") .arg("--password") - .arg("testpass"), @r" + .arg("testpass"), @" success: true exit_code: 0 ----- stdout ----- @@ -1219,7 +1219,7 @@ fn login_password_stdin() -> Result<()> { .arg("testuser") .arg("--password") .arg("-") - .stdin(std::fs::File::open(password_file)?), @r" + .stdin(std::fs::File::open(password_file)?), @" success: true exit_code: 0 ----- stdout ----- @@ -1233,7 +1233,7 @@ fn login_password_stdin() -> Result<()> { uv_snapshot!(context.auth_token() .arg("https://example.com/simple") .arg("--username") - .arg("testuser"), @r" + .arg("testuser"), @" success: true exit_code: 0 ----- stdout ----- @@ -1260,7 +1260,7 @@ fn login_token_stdin() -> Result<()> { .arg("https://example.com/simple") .arg("--token") .arg("-") - .stdin(std::fs::File::open(token_file)?), @r" + .stdin(std::fs::File::open(token_file)?), @" success: true exit_code: 0 ----- stdout ----- @@ -1272,7 +1272,7 @@ fn login_token_stdin() -> Result<()> { // Verify the credentials work by retrieving the token uv_snapshot!(context.auth_token() - .arg("https://example.com/simple"), @r" + .arg("https://example.com/simple"), @" success: true exit_code: 0 ----- stdout ----- @@ -1304,7 +1304,7 @@ fn token_text_store() { uv_snapshot!(context.auth_token() .arg("https://pypi-proxy.fly.dev/basic-auth/simple") .arg("--username") - .arg("public"), @r" + .arg("public"), @" success: true exit_code: 0 ----- stdout ----- @@ -1325,7 +1325,7 @@ fn token_text_store() { // Retrieve token without username uv_snapshot!(context.auth_token() - .arg("https://example.com/simple"), @r" + .arg("https://example.com/simple"), @" success: true exit_code: 0 ----- stdout ----- @@ -1339,7 +1339,7 @@ fn token_text_store() { uv_snapshot!(context.auth_token() .arg("https://example.com/simple") .arg("--username") - .arg(""), @r" + .arg(""), @" success: false exit_code: 2 ----- stdout ----- @@ -1369,7 +1369,7 @@ fn logout_text_store() { uv_snapshot!(context.auth_logout() .arg("https://pypi-proxy.fly.dev/basic-auth/simple") .arg("--username") - .arg("public"), @r" + .arg("public"), @" success: true exit_code: 0 ----- stdout ----- @@ -1389,7 +1389,7 @@ fn logout_text_store() { .success(); uv_snapshot!(context.auth_logout() - .arg("https://example.com/simple"), @r" + .arg("https://example.com/simple"), @" success: true exit_code: 0 ----- stdout ----- @@ -1403,7 +1403,7 @@ fn logout_text_store() { uv_snapshot!(context.auth_logout() .arg("https://example.com/simple") .arg("--username") - .arg(""), @r" + .arg(""), @" success: false exit_code: 2 ----- stdout ----- @@ -1426,7 +1426,7 @@ fn auth_disabled_provider_uses_text_store() { .arg("--password") .arg("heron") .arg("--keyring-provider") - .arg("disabled"), @r" + .arg("disabled"), @" success: true exit_code: 0 ----- stdout ----- @@ -1442,7 +1442,7 @@ fn auth_disabled_provider_uses_text_store() { .arg("--username") .arg("public") .arg("--keyring-provider") - .arg("disabled"), @r" + .arg("disabled"), @" success: true exit_code: 0 ----- stdout ----- @@ -1463,7 +1463,7 @@ fn login_text_store_strips_simple_suffix() { .arg("--username") .arg("testuser") .arg("--password") - .arg("testpass"), @r" + .arg("testpass"), @" success: true exit_code: 0 ----- stdout ----- @@ -1479,7 +1479,7 @@ fn login_text_store_strips_simple_suffix() { .arg("--username") .arg("devpiuser") .arg("--password") - .arg("devpipass"), @r" + .arg("devpipass"), @" success: true exit_code: 0 ----- stdout ----- @@ -1495,7 +1495,7 @@ fn login_text_store_strips_simple_suffix() { .arg("--username") .arg("caseuser") .arg("--password") - .arg("casepass"), @r" + .arg("casepass"), @" success: true exit_code: 0 ----- stdout ----- @@ -1511,7 +1511,7 @@ fn login_text_store_strips_simple_suffix() { .arg("--username") .arg("apiuser") .arg("--password") - .arg("apipass"), @r" + .arg("apipass"), @" success: true exit_code: 0 ----- stdout ----- @@ -1527,7 +1527,7 @@ fn login_text_store_strips_simple_suffix() { .arg("--username") .arg("slashuser") .arg("--password") - .arg("slashpass"), @r" + .arg("slashpass"), @" success: true exit_code: 0 ----- stdout ----- @@ -1557,7 +1557,7 @@ fn logout_text_store_strips_simple_suffix() { uv_snapshot!(context.auth_logout() .arg("https://example.com/simple") .arg("--username") - .arg("testuser"), @r" + .arg("testuser"), @" success: true exit_code: 0 ----- stdout ----- @@ -1582,7 +1582,7 @@ fn logout_text_store_strips_simple_suffix() { uv_snapshot!(context.auth_logout() .arg("https://devpi.example.com/root/+simple") .arg("--username") - .arg("devpiuser"), @r" + .arg("devpiuser"), @" success: true exit_code: 0 ----- stdout ----- @@ -1612,7 +1612,7 @@ fn token_text_store_strips_simple_suffix() { uv_snapshot!(context.auth_token() .arg("https://example.com/simple") .arg("--username") - .arg("testuser"), @r" + .arg("testuser"), @" success: true exit_code: 0 ----- stdout ----- @@ -1633,7 +1633,7 @@ fn token_text_store_strips_simple_suffix() { // Retrieve token using URL with `/simple` - should work uv_snapshot!(context.auth_token() - .arg("https://token.example.com/simple"), @r" + .arg("https://token.example.com/simple"), @" success: true exit_code: 0 ----- stdout ----- @@ -1663,7 +1663,7 @@ fn token_text_store_username() { uv_snapshot!(context.auth_token() .arg("https://example.com/simple") .arg("--username") - .arg("testuser"), @r" + .arg("testuser"), @" success: true exit_code: 0 ----- stdout ----- @@ -1675,7 +1675,7 @@ fn token_text_store_username() { // Retrieve token without username uv_snapshot!(context.auth_token() - .arg("https://example.com/simple"), @r" + .arg("https://example.com/simple"), @" success: false exit_code: 2 ----- stdout ----- @@ -1689,7 +1689,7 @@ fn token_text_store_username() { uv_snapshot!(context.auth_token() .arg("https://example.com/simple") .arg("--username") - .arg("wronguser"), @r" + .arg("wronguser"), @" success: false exit_code: 2 ----- stdout ----- @@ -1710,7 +1710,7 @@ fn token_text_store_username() { // Retrieve token without specifying username - should work uv_snapshot!(context.auth_token() - .arg("https://token.example.com/simple"), @r" + .arg("https://token.example.com/simple"), @" success: true exit_code: 0 ----- stdout ----- @@ -1733,7 +1733,7 @@ fn token_text_store_username() { // Retrieve token without username should fail uv_snapshot!(context.auth_token() - .arg("https://userexample.com/simple"), @r" + .arg("https://userexample.com/simple"), @" success: false exit_code: 2 ----- stdout ----- @@ -1773,7 +1773,7 @@ fn logout_text_store_multiple_usernames() { uv_snapshot!(context.auth_logout() .arg("https://example.com/simple") .arg("--username") - .arg("user1"), @r" + .arg("user1"), @" success: true exit_code: 0 ----- stdout ----- @@ -1787,7 +1787,7 @@ fn logout_text_store_multiple_usernames() { uv_snapshot!(context.auth_token() .arg("https://example.com/simple") .arg("--username") - .arg("user1"), @r" + .arg("user1"), @" success: false exit_code: 2 ----- stdout ----- @@ -1800,7 +1800,7 @@ fn logout_text_store_multiple_usernames() { uv_snapshot!(context.auth_token() .arg("https://example.com/simple") .arg("--username") - .arg("user2"), @r" + .arg("user2"), @" success: true exit_code: 0 ----- stdout ----- @@ -1812,7 +1812,7 @@ fn logout_text_store_multiple_usernames() { // Try to logout without specifying username (defaults to `__token__`) uv_snapshot!(context.auth_logout() - .arg("https://example.com/simple"), @r" + .arg("https://example.com/simple"), @" success: false exit_code: 2 ----- stdout ----- @@ -1946,14 +1946,14 @@ fn bazel_helper_basic_auth() { uv_snapshot!(context.filters(), context.auth_login() .arg("https://test.example.com") .arg("--username").arg("testuser") - .arg("--password").arg("testpass"), @r###" + .arg("--password").arg("testpass"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Stored credentials for testuser@https://test.example.com/ - "###); + "); uv_snapshot!(context.filters(), context.auth_helper() .arg("--protocol=bazel") @@ -1979,14 +1979,14 @@ fn bazel_helper_token() { // Store token uv_snapshot!(context.filters(), context.auth_login() .arg("https://api.example.com") - .arg("--token").arg("mytoken123"), @r###" + .arg("--token").arg("mytoken123"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Stored credentials for https://api.example.com/ - "###); + "); // Test credential helper - tokens are stored as Basic auth with __token__ username uv_snapshot!(context.filters(), context.auth_helper() @@ -2034,7 +2034,7 @@ fn bazel_helper_invalid_json() { .arg("--protocol=bazel") .arg("get"), input="not json", - @r" + @" success: false exit_code: 2 ----- stdout ----- @@ -2078,14 +2078,14 @@ fn bazel_helper_username_in_uri() { uv_snapshot!(context.filters(), context.auth_login() .arg("https://test.example.com") .arg("--username").arg("specificuser") - .arg("--password").arg("specificpass"), @r###" + .arg("--password").arg("specificpass"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Stored credentials for specificuser@https://test.example.com/ - "###); + "); // Test with username in URI uv_snapshot!(context.filters(), context.auth_helper() @@ -2113,14 +2113,14 @@ fn bazel_helper_unknown_username_in_uri() { uv_snapshot!(context.filters(), context.auth_login() .arg("https://test.example.com") .arg("--username").arg("specificuser") - .arg("--password").arg("specificpass"), @r###" + .arg("--password").arg("specificpass"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Stored credentials for specificuser@https://test.example.com/ - "###); + "); // Test with username in URI uv_snapshot!(context.filters(), context.auth_helper() diff --git a/crates/uv/tests/it/branching_urls.rs b/crates/uv/tests/it/branching_urls.rs index 29493ef14..53b0de49f 100644 --- a/crates/uv/tests/it/branching_urls.rs +++ b/crates/uv/tests/it/branching_urls.rs @@ -27,14 +27,14 @@ fn branching_urls_disjoint() -> Result<()> { "# }; make_project(context.temp_dir.path(), "a", deps)?; - uv_snapshot!(context.filters(), context.lock().current_dir(&context.temp_dir), @r###" + uv_snapshot!(context.filters(), context.lock().current_dir(&context.temp_dir), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 3 packages in [TIME] - "### + " ); Ok(()) @@ -61,7 +61,7 @@ fn branching_urls_overlapping() -> Result<()> { "# }; make_project(context.temp_dir.path(), "a", deps)?; - uv_snapshot!(context.filters(), context.lock().current_dir(&context.temp_dir), @r" + uv_snapshot!(context.filters(), context.lock().current_dir(&context.temp_dir), @" success: false exit_code: 1 ----- stdout ----- @@ -129,7 +129,7 @@ fn root_package_splits_but_transitive_conflict() -> Result<()> { "# }; make_project(&context.temp_dir.path().join("b2"), "b2", deps)?; - uv_snapshot!(context.filters(), context.lock().current_dir(&context.temp_dir), @r" + uv_snapshot!(context.filters(), context.lock().current_dir(&context.temp_dir), @" success: false exit_code: 1 ----- stdout ----- @@ -200,14 +200,14 @@ fn root_package_splits_transitive_too() -> Result<()> { "# }; make_project(&context.temp_dir.path().join("b2"), "b2", deps)?; - uv_snapshot!(context.filters(), context.lock().current_dir(&context.temp_dir), @r###" + uv_snapshot!(context.filters(), context.lock().current_dir(&context.temp_dir), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 10 packages in [TIME] - "### + " ); assert_snapshot!(context.read("uv.lock"), @r#" @@ -397,14 +397,14 @@ fn root_package_splits_other_dependencies_too() -> Result<()> { "# }; make_project(&context.temp_dir.path().join("b2"), "b2", deps)?; - uv_snapshot!(context.filters(), context.lock().current_dir(&context.temp_dir), @r###" + uv_snapshot!(context.filters(), context.lock().current_dir(&context.temp_dir), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 9 packages in [TIME] - "### + " ); assert_snapshot!(context.read("uv.lock"), @r#" @@ -559,14 +559,14 @@ fn branching_between_registry_and_direct_url() -> Result<()> { "# }; make_project(context.temp_dir.path(), "a", deps)?; - uv_snapshot!(context.filters(), context.lock().current_dir(&context.temp_dir), @r###" + uv_snapshot!(context.filters(), context.lock().current_dir(&context.temp_dir), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 3 packages in [TIME] - "### + " ); // We have source dist and wheel for the registry, but only the wheel for the direct URL. @@ -646,14 +646,14 @@ fn branching_urls_of_different_sources_disjoint() -> Result<()> { "# }; make_project(context.temp_dir.path(), "a", deps)?; - uv_snapshot!(context.filters(), context.lock().current_dir(&context.temp_dir), @r###" + uv_snapshot!(context.filters(), context.lock().current_dir(&context.temp_dir), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 3 packages in [TIME] - "### + " ); // We have source dist and wheel for the registry, but only the wheel for the direct URL. @@ -730,7 +730,7 @@ fn branching_urls_of_different_sources_conflict() -> Result<()> { "# }; make_project(context.temp_dir.path(), "a", deps)?; - uv_snapshot!(context.filters(), context.lock().current_dir(&context.temp_dir), @r" + uv_snapshot!(context.filters(), context.lock().current_dir(&context.temp_dir), @" success: false exit_code: 1 ----- stdout ----- @@ -777,14 +777,14 @@ fn dont_pre_visit_url_packages() -> Result<()> { " }; make_project(&context.temp_dir.join("c"), "c", deps)?; - uv_snapshot!(context.filters(), context.lock().arg("--offline").current_dir(&context.temp_dir), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--offline").current_dir(&context.temp_dir), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 3 packages in [TIME] - "### + " ); assert_snapshot!(context.read("uv.lock"), @r#" diff --git a/crates/uv/tests/it/build.rs b/crates/uv/tests/it/build.rs index 73b746cb1..3dc457516 100644 --- a/crates/uv/tests/it/build.rs +++ b/crates/uv/tests/it/build.rs @@ -44,7 +44,7 @@ fn build_basic() -> Result<()> { project.child("README").touch()?; // Build the specified path. - uv_snapshot!(&filters, context.build().arg("project"), @r###" + uv_snapshot!(&filters, context.build().arg("project"), @" success: true exit_code: 0 ----- stdout ----- @@ -54,7 +54,7 @@ fn build_basic() -> Result<()> { Building wheel from source distribution... Successfully built project/dist/project-0.1.0.tar.gz Successfully built project/dist/project-0.1.0-py3-none-any.whl - "###); + "); project .child("dist") @@ -68,7 +68,7 @@ fn build_basic() -> Result<()> { fs_err::remove_dir_all(project.child("dist"))?; // Build the current working directory. - uv_snapshot!(&filters, context.build().current_dir(project.path()), @r###" + uv_snapshot!(&filters, context.build().current_dir(project.path()), @" success: true exit_code: 0 ----- stdout ----- @@ -78,7 +78,7 @@ fn build_basic() -> Result<()> { Building wheel from source distribution... Successfully built dist/project-0.1.0.tar.gz Successfully built dist/project-0.1.0-py3-none-any.whl - "###); + "); project .child("dist") @@ -92,7 +92,7 @@ fn build_basic() -> Result<()> { fs_err::remove_dir_all(project.child("dist"))?; // Error if there's nothing to build. - uv_snapshot!(&filters, context.build(), @r###" + uv_snapshot!(&filters, context.build(), @" success: false exit_code: 2 ----- stdout ----- @@ -101,10 +101,10 @@ fn build_basic() -> Result<()> { Building source distribution... × Failed to build `[TEMP_DIR]/` ╰─▶ [TEMP_DIR]/ does not appear to be a Python project, as neither `pyproject.toml` nor `setup.py` are present in the directory - "###); + "); // Build to a specified path. - uv_snapshot!(&filters, context.build().arg("--out-dir").arg("out").current_dir(project.path()), @r###" + uv_snapshot!(&filters, context.build().arg("--out-dir").arg("out").current_dir(project.path()), @" success: true exit_code: 0 ----- stdout ----- @@ -114,7 +114,7 @@ fn build_basic() -> Result<()> { Building wheel from source distribution... Successfully built out/project-0.1.0.tar.gz Successfully built out/project-0.1.0-py3-none-any.whl - "###); + "); project .child("out") @@ -162,7 +162,7 @@ fn build_sdist() -> Result<()> { project.child("README").touch()?; // Build the specified path. - uv_snapshot!(&filters, context.build().arg("--sdist").current_dir(&project), @r###" + uv_snapshot!(&filters, context.build().arg("--sdist").current_dir(&project), @" success: true exit_code: 0 ----- stdout ----- @@ -170,7 +170,7 @@ fn build_sdist() -> Result<()> { ----- stderr ----- Building source distribution... Successfully built dist/project-0.1.0.tar.gz - "###); + "); project .child("dist") @@ -218,7 +218,7 @@ fn build_wheel() -> Result<()> { project.child("README").touch()?; // Build the specified path. - uv_snapshot!(&filters, context.build().arg("--wheel").current_dir(&project), @r###" + uv_snapshot!(&filters, context.build().arg("--wheel").current_dir(&project), @" success: true exit_code: 0 ----- stdout ----- @@ -226,7 +226,7 @@ fn build_wheel() -> Result<()> { ----- stderr ----- Building wheel... Successfully built dist/project-0.1.0-py3-none-any.whl - "###); + "); project .child("dist") @@ -274,7 +274,7 @@ fn build_sdist_wheel() -> Result<()> { project.child("README").touch()?; // Build the specified path. - uv_snapshot!(&filters, context.build().arg("--sdist").arg("--wheel").current_dir(&project), @r###" + uv_snapshot!(&filters, context.build().arg("--sdist").arg("--wheel").current_dir(&project), @" success: true exit_code: 0 ----- stdout ----- @@ -284,7 +284,7 @@ fn build_sdist_wheel() -> Result<()> { Building wheel... Successfully built dist/project-0.1.0.tar.gz Successfully built dist/project-0.1.0-py3-none-any.whl - "###); + "); project .child("dist") @@ -332,7 +332,7 @@ fn build_wheel_from_sdist() -> Result<()> { project.child("README").touch()?; // Build the sdist. - uv_snapshot!(&filters, context.build().arg("--sdist").current_dir(&project), @r###" + uv_snapshot!(&filters, context.build().arg("--sdist").current_dir(&project), @" success: true exit_code: 0 ----- stdout ----- @@ -340,7 +340,7 @@ fn build_wheel_from_sdist() -> Result<()> { ----- stderr ----- Building source distribution... Successfully built dist/project-0.1.0.tar.gz - "###); + "); project .child("dist") @@ -352,7 +352,7 @@ fn build_wheel_from_sdist() -> Result<()> { .assert(predicate::path::missing()); // Error if `--wheel` is not specified. - uv_snapshot!(&filters, context.build().arg("./dist/project-0.1.0.tar.gz").current_dir(&project), @r###" + uv_snapshot!(&filters, context.build().arg("./dist/project-0.1.0.tar.gz").current_dir(&project), @" success: false exit_code: 2 ----- stdout ----- @@ -360,10 +360,10 @@ fn build_wheel_from_sdist() -> Result<()> { ----- stderr ----- × Failed to build `[TEMP_DIR]/project/dist/project-0.1.0.tar.gz` ╰─▶ Pass `--wheel` explicitly to build a wheel from a source distribution - "###); + "); // Error if `--sdist` is specified. - uv_snapshot!(&filters, context.build().arg("./dist/project-0.1.0.tar.gz").arg("--sdist").current_dir(&project), @r###" + uv_snapshot!(&filters, context.build().arg("./dist/project-0.1.0.tar.gz").arg("--sdist").current_dir(&project), @" success: false exit_code: 2 ----- stdout ----- @@ -371,10 +371,10 @@ fn build_wheel_from_sdist() -> Result<()> { ----- stderr ----- × Failed to build `[TEMP_DIR]/project/dist/project-0.1.0.tar.gz` ╰─▶ Building an `--sdist` from a source distribution is not supported - "###); + "); // Build the wheel from the sdist. - uv_snapshot!(&filters, context.build().arg("./dist/project-0.1.0.tar.gz").arg("--wheel").current_dir(&project), @r###" + uv_snapshot!(&filters, context.build().arg("./dist/project-0.1.0.tar.gz").arg("--wheel").current_dir(&project), @" success: true exit_code: 0 ----- stdout ----- @@ -382,7 +382,7 @@ fn build_wheel_from_sdist() -> Result<()> { ----- stderr ----- Building wheel from source distribution... Successfully built dist/project-0.1.0-py3-none-any.whl - "###); + "); project .child("dist") @@ -394,7 +394,7 @@ fn build_wheel_from_sdist() -> Result<()> { .assert(predicate::path::is_file()); // Passing a wheel is an error. - uv_snapshot!(&filters, context.build().arg("./dist/project-0.1.0-py3-none-any.whl").arg("--wheel").current_dir(&project), @r###" + uv_snapshot!(&filters, context.build().arg("./dist/project-0.1.0-py3-none-any.whl").arg("--wheel").current_dir(&project), @" success: false exit_code: 2 ----- stdout ----- @@ -402,7 +402,7 @@ fn build_wheel_from_sdist() -> Result<()> { ----- stderr ----- × Failed to build `[TEMP_DIR]/project/dist/project-0.1.0-py3-none-any.whl` ╰─▶ `dist/project-0.1.0-py3-none-any.whl` is not a valid build source. Expected to receive a source directory, or a source distribution ending in one of: `.tar.gz`, `.zip`, `.tar.bz2`, `.tar.lz`, `.tar.lzma`, `.tar.xz`, `.tar.zst`, `.tar`, `.tbz`, `.tgz`, `.tlz`, or `.txz`. - "###); + "); Ok(()) } @@ -454,7 +454,7 @@ fn build_fail() -> Result<()> { )?; // Build the specified path. - uv_snapshot!(&filters, context.build().arg("project"), @r###" + uv_snapshot!(&filters, context.build().arg("project"), @r#" success: false exit_code: 2 ----- stdout ----- @@ -477,7 +477,7 @@ fn build_fail() -> Result<()> { ├─▶ The build backend returned an error ╰─▶ Call to `setuptools.build_meta.build_sdist` failed (exit status: 1) hint: This usually indicates a problem with the package or the build environment. - "###); + "#); Ok(()) } @@ -567,7 +567,7 @@ fn build_workspace() -> Result<()> { r#virtual.child("README").touch()?; // Build the member. - uv_snapshot!(&filters, context.build().arg("--package").arg("member").current_dir(&project), @r###" + uv_snapshot!(&filters, context.build().arg("--package").arg("member").current_dir(&project), @" success: true exit_code: 0 ----- stdout ----- @@ -577,7 +577,7 @@ fn build_workspace() -> Result<()> { Building wheel from source distribution... Successfully built dist/member-0.1.0.tar.gz Successfully built dist/member-0.1.0-py3-none-any.whl - "###); + "); project .child("dist") @@ -589,7 +589,7 @@ fn build_workspace() -> Result<()> { .assert(predicate::path::is_file()); // Build all packages. - uv_snapshot!(&filters, context.build().arg("--all").arg("--no-build-logs").current_dir(&project), @r###" + uv_snapshot!(&filters, context.build().arg("--all").arg("--no-build-logs").current_dir(&project), @" success: true exit_code: 0 ----- stdout ----- @@ -603,7 +603,7 @@ fn build_workspace() -> Result<()> { Successfully built dist/member-0.1.0-py3-none-any.whl Successfully built dist/project-0.1.0.tar.gz Successfully built dist/project-0.1.0-py3-none-any.whl - "###); + "); project .child("dist") @@ -623,7 +623,7 @@ fn build_workspace() -> Result<()> { .assert(predicate::path::is_file()); // If a source is provided, discover the workspace from the source. - uv_snapshot!(&filters, context.build().arg("./project").arg("--package").arg("member"), @r###" + uv_snapshot!(&filters, context.build().arg("./project").arg("--package").arg("member"), @" success: true exit_code: 0 ----- stdout ----- @@ -633,10 +633,10 @@ fn build_workspace() -> Result<()> { Building wheel from source distribution... Successfully built project/dist/member-0.1.0.tar.gz Successfully built project/dist/member-0.1.0-py3-none-any.whl - "###); + "); // If a source is provided, discover the workspace from the source. - uv_snapshot!(&filters, context.build().arg("./project").arg("--all").arg("--no-build-logs"), @r###" + uv_snapshot!(&filters, context.build().arg("./project").arg("--all").arg("--no-build-logs"), @" success: true exit_code: 0 ----- stdout ----- @@ -650,10 +650,10 @@ fn build_workspace() -> Result<()> { Successfully built project/dist/member-0.1.0-py3-none-any.whl Successfully built project/dist/project-0.1.0.tar.gz Successfully built project/dist/project-0.1.0-py3-none-any.whl - "###); + "); // Fail when `--package` is provided without a workspace. - uv_snapshot!(&filters, context.build().arg("--package").arg("member"), @r###" + uv_snapshot!(&filters, context.build().arg("--package").arg("member"), @" success: false exit_code: 2 ----- stdout ----- @@ -661,10 +661,10 @@ fn build_workspace() -> Result<()> { ----- stderr ----- error: `--package` was provided, but no workspace was found Caused by: No `pyproject.toml` found in current directory or any parent directory - "###); + "); // Fail when `--all` is provided without a workspace. - uv_snapshot!(&filters, context.build().arg("--all"), @r###" + uv_snapshot!(&filters, context.build().arg("--all"), @" success: false exit_code: 2 ----- stdout ----- @@ -672,17 +672,17 @@ fn build_workspace() -> Result<()> { ----- stderr ----- error: `--all-packages` was provided, but no workspace was found Caused by: No `pyproject.toml` found in current directory or any parent directory - "###); + "); // Fail when `--package` is a non-existent member without a workspace. - uv_snapshot!(&filters, context.build().arg("--package").arg("fail").current_dir(&project), @r###" + uv_snapshot!(&filters, context.build().arg("--package").arg("fail").current_dir(&project), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: Package `fail` not found in workspace - "###); + "); Ok(()) } @@ -790,7 +790,7 @@ fn build_all_with_failure() -> Result<()> { )?; // Build all the packages - uv_snapshot!(&filters, context.build().arg("--all").arg("--no-build-logs").current_dir(&project), @r###" + uv_snapshot!(&filters, context.build().arg("--all").arg("--no-build-logs").current_dir(&project), @" success: false exit_code: 2 ----- stdout ----- @@ -809,7 +809,7 @@ fn build_all_with_failure() -> Result<()> { hint: This usually indicates a problem with the package or the build environment. Successfully built dist/project-0.1.0.tar.gz Successfully built dist/project-0.1.0-py3-none-any.whl - "###); + "); // project and member_a should be built, regardless of member_b build failure project @@ -869,7 +869,7 @@ fn build_constraints() -> Result<()> { .touch()?; project.child("README").touch()?; - uv_snapshot!(&filters, context.build().arg("--build-constraint").arg("constraints.txt").current_dir(&project), @r###" + uv_snapshot!(&filters, context.build().arg("--build-constraint").arg("constraints.txt").current_dir(&project), @" success: false exit_code: 2 ----- stdout ----- @@ -880,7 +880,7 @@ fn build_constraints() -> Result<()> { ├─▶ Failed to resolve requirements from `build-system.requires` ├─▶ No solution found when resolving: `hatchling>=1.0` ╰─▶ Because you require hatchling>=1.0 and hatchling==0.1.0, we can conclude that your requirements are unsatisfiable. - "###); + "); project .child("dist") @@ -955,7 +955,7 @@ fn build_sha() -> Result<()> { # via hatchling "})?; - uv_snapshot!(&filters, context.build().arg("--build-constraint").arg("constraints.txt").current_dir(&project), @r###" + uv_snapshot!(&filters, context.build().arg("--build-constraint").arg("constraints.txt").current_dir(&project), @" success: false exit_code: 2 ----- stdout ----- @@ -973,7 +973,7 @@ fn build_sha() -> Result<()> { Computed: sha256:f56da5bfc396af7b29daa3164851dd04991c994083f56cb054b5003675caecdc - "###); + "); project .child("dist") @@ -987,7 +987,7 @@ fn build_sha() -> Result<()> { fs_err::remove_dir_all(project.child("dist"))?; // Reject a missing hash with `--requires-hashes`. - uv_snapshot!(&filters, context.build().arg("--build-constraint").arg("constraints.txt").arg("--require-hashes").current_dir(&project), @r###" + uv_snapshot!(&filters, context.build().arg("--build-constraint").arg("constraints.txt").arg("--require-hashes").current_dir(&project), @" success: false exit_code: 2 ----- stdout ----- @@ -1005,7 +1005,7 @@ fn build_sha() -> Result<()> { Computed: sha256:f56da5bfc396af7b29daa3164851dd04991c994083f56cb054b5003675caecdc - "###); + "); project .child("dist") @@ -1022,7 +1022,7 @@ fn build_sha() -> Result<()> { let constraints = project.child("constraints.txt"); constraints.write_str("hatchling==1.22.4")?; - uv_snapshot!(&filters, context.build().arg("--build-constraint").arg("constraints.txt").arg("--require-hashes").current_dir(&project), @r###" + uv_snapshot!(&filters, context.build().arg("--build-constraint").arg("constraints.txt").arg("--require-hashes").current_dir(&project), @" success: false exit_code: 2 ----- stdout ----- @@ -1033,7 +1033,7 @@ fn build_sha() -> Result<()> { ├─▶ Failed to resolve requirements from `build-system.requires` ├─▶ No solution found when resolving: `hatchling` ╰─▶ In `--require-hashes` mode, all requirements must be pinned upfront with `==`, but found: `hatchling` - "###); + "); project .child("dist") @@ -1074,7 +1074,7 @@ fn build_sha() -> Result<()> { # via hatchling "})?; - uv_snapshot!(&filters, context.build().arg("--build-constraint").arg("constraints.txt").current_dir(&project), @r###" + uv_snapshot!(&filters, context.build().arg("--build-constraint").arg("constraints.txt").current_dir(&project), @" success: true exit_code: 0 ----- stdout ----- @@ -1084,7 +1084,7 @@ fn build_sha() -> Result<()> { Building wheel from source distribution... Successfully built dist/project-0.1.0.tar.gz Successfully built dist/project-0.1.0-py3-none-any.whl - "###); + "); project .child("dist") @@ -1126,13 +1126,13 @@ fn build_quiet() -> Result<()> { .touch()?; project.child("README").touch()?; - uv_snapshot!(&context.filters(), context.build().arg("project").arg("-q"), @r###" + uv_snapshot!(&context.filters(), context.build().arg("project").arg("-q"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- - "###); + "); Ok(()) } @@ -1165,7 +1165,7 @@ fn build_no_build_logs() -> Result<()> { .touch()?; project.child("README").touch()?; - uv_snapshot!(&context.filters(), context.build().arg("project").arg("--no-build-logs"), @r###" + uv_snapshot!(&context.filters(), context.build().arg("project").arg("--no-build-logs"), @" success: true exit_code: 0 ----- stdout ----- @@ -1175,7 +1175,7 @@ fn build_no_build_logs() -> Result<()> { Building wheel from source distribution... Successfully built project/dist/project-0.1.0.tar.gz Successfully built project/dist/project-0.1.0-py3-none-any.whl - "###); + "); Ok(()) } @@ -1209,7 +1209,7 @@ fn build_hide_build_output_env_var() -> Result<()> { .touch()?; project.child("README").touch()?; - uv_snapshot!(&context.filters(), context.build().arg("project").env(EnvVars::UV_HIDE_BUILD_OUTPUT, "1"), @r###" + uv_snapshot!(&context.filters(), context.build().arg("project").env(EnvVars::UV_HIDE_BUILD_OUTPUT, "1"), @" success: true exit_code: 0 ----- stdout ----- @@ -1219,7 +1219,7 @@ fn build_hide_build_output_env_var() -> Result<()> { Building wheel from source distribution... Successfully built project/dist/project-0.1.0.tar.gz Successfully built project/dist/project-0.1.0-py3-none-any.whl - "###); + "); Ok(()) } @@ -1260,7 +1260,7 @@ fn build_hide_build_output_on_failure() -> Result<()> { "#})?; // With `UV_HIDE_BUILD_OUTPUT`, the output is hidden even on failure. - uv_snapshot!(&filters, context.build().arg("project").env(EnvVars::UV_HIDE_BUILD_OUTPUT, "1").env("FOO", "bar"), @r###" + uv_snapshot!(&filters, context.build().arg("project").env(EnvVars::UV_HIDE_BUILD_OUTPUT, "1").env("FOO", "bar"), @" success: false exit_code: 2 ----- stdout ----- @@ -1271,7 +1271,7 @@ fn build_hide_build_output_on_failure() -> Result<()> { ├─▶ The build backend returned an error ╰─▶ Call to `setuptools.build_meta.build_sdist` failed (exit status: 1) hint: This usually indicates a problem with the package or the build environment. - "###); + "); Ok(()) } @@ -1347,7 +1347,7 @@ fn build_tool_uv_sources() -> Result<()> { .touch()?; project.child("README").touch()?; - uv_snapshot!(filters, context.build().current_dir(project.path()), @r###" + uv_snapshot!(filters, context.build().current_dir(project.path()), @" success: true exit_code: 0 ----- stdout ----- @@ -1357,7 +1357,7 @@ fn build_tool_uv_sources() -> Result<()> { Building wheel from source distribution... Successfully built dist/project-0.1.0.tar.gz Successfully built dist/project-0.1.0-py3-none-any.whl - "###); + "); project .child("dist") @@ -1396,7 +1396,7 @@ fn build_git_boundary_in_dist_build() -> Result<()> { "#, )?; - uv_snapshot!(&context.filters(), context.build().current_dir(project.path()), @r###" + uv_snapshot!(&context.filters(), context.build().current_dir(project.path()), @" success: true exit_code: 0 ----- stdout ----- @@ -1406,7 +1406,7 @@ fn build_git_boundary_in_dist_build() -> Result<()> { Building wheel from source distribution... Successfully built dist/demo-0.1.0.tar.gz Successfully built dist/demo-0.1.0-py3-none-any.whl - "###); + "); // Check that the source file is included let reader = File::open(project.join("dist/demo-0.1.0-py3-none-any.whl"))?; @@ -1415,12 +1415,12 @@ fn build_git_boundary_in_dist_build() -> Result<()> { .map(ToString::to_string) .collect(); files.sort(); - assert_snapshot!(files.join("\n"), @r###" + assert_snapshot!(files.join("\n"), @" demo-0.1.0.dist-info/METADATA demo-0.1.0.dist-info/RECORD demo-0.1.0.dist-info/WHEEL demo/__init__.py - "###); + "); Ok(()) } @@ -1474,7 +1474,7 @@ fn build_non_package() -> Result<()> { member.child("README").touch()?; // Build the member. - uv_snapshot!(&filters, context.build().arg("--package").arg("member").current_dir(&project), @r###" + uv_snapshot!(&filters, context.build().arg("--package").arg("member").current_dir(&project), @r#" success: false exit_code: 2 ----- stdout ----- @@ -1486,7 +1486,7 @@ fn build_non_package() -> Result<()> { requires = ["setuptools"] build-backend = "setuptools.build_meta" ``` - "###); + "#); project .child("dist") @@ -1498,7 +1498,7 @@ fn build_non_package() -> Result<()> { .assert(predicate::path::missing()); // Build all packages. - uv_snapshot!(&filters, context.build().arg("--all").arg("--no-build-logs").current_dir(&project), @r###" + uv_snapshot!(&filters, context.build().arg("--all").arg("--no-build-logs").current_dir(&project), @r#" success: false exit_code: 2 ----- stdout ----- @@ -1510,7 +1510,7 @@ fn build_non_package() -> Result<()> { requires = ["setuptools"] build-backend = "setuptools.build_meta" ``` - "###); + "#); project .child("dist") @@ -1538,7 +1538,7 @@ fn build_fast_path() -> Result<()> { uv_snapshot!(context.build() .arg(&built_by_uv) .arg("--out-dir") - .arg(context.temp_dir.join("output1")), @r" + .arg(context.temp_dir.join("output1")), @" success: true exit_code: 0 ----- stdout ----- @@ -1564,7 +1564,7 @@ fn build_fast_path() -> Result<()> { .arg(&built_by_uv) .arg("--out-dir") .arg(context.temp_dir.join("output2")) - .arg("--sdist"), @r###" + .arg("--sdist"), @" success: true exit_code: 0 ----- stdout ----- @@ -1572,7 +1572,7 @@ fn build_fast_path() -> Result<()> { ----- stderr ----- Building source distribution (uv build backend)... Successfully built output2/built_by_uv-0.1.0.tar.gz - "###); + "); context .temp_dir .child("output2") @@ -1583,7 +1583,7 @@ fn build_fast_path() -> Result<()> { .arg(&built_by_uv) .arg("--out-dir") .arg(context.temp_dir.join("output3")) - .arg("--wheel"), @r" + .arg("--wheel"), @" success: true exit_code: 0 ----- stdout ----- @@ -1603,7 +1603,7 @@ fn build_fast_path() -> Result<()> { .arg("--out-dir") .arg(context.temp_dir.join("output4")) .arg("--sdist") - .arg("--wheel"), @r" + .arg("--wheel"), @" success: true exit_code: 0 ----- stdout ----- @@ -1641,7 +1641,7 @@ fn build_list_files() -> Result<()> { .arg(&built_by_uv) .arg("--out-dir") .arg(context.temp_dir.join("output1")) - .arg("--list"), @r" + .arg("--list"), @" success: true exit_code: 0 ----- stdout ----- @@ -1698,7 +1698,7 @@ fn build_list_files() -> Result<()> { .arg(context.temp_dir.join("output2")) .arg("--list") .arg("--sdist") - .arg("--wheel"), @r" + .arg("--wheel"), @" success: true exit_code: 0 ----- stdout ----- @@ -1765,7 +1765,7 @@ fn build_list_files_errors() -> Result<()> { .arg("--out-dir") .arg(context.temp_dir.join("output1")) .arg("--list") - .arg("--force-pep517"), @r###" + .arg("--force-pep517"), @" success: false exit_code: 2 ----- stdout ----- @@ -1776,7 +1776,7 @@ fn build_list_files_errors() -> Result<()> { Usage: uv build --cache-dir [CACHE_DIR] --out-dir --exclude-newer For more information, try '--help'. - "###); + "); // Not a uv build backend package, we can't list it. let anyio_local = current_dir()?.join("../../test/packages/anyio_local"); @@ -1787,7 +1787,7 @@ fn build_list_files_errors() -> Result<()> { .arg(&anyio_local) .arg("--out-dir") .arg(context.temp_dir.join("output2")) - .arg("--list"), @r###" + .arg("--list"), @" success: false exit_code: 2 ----- stdout ----- @@ -1795,7 +1795,7 @@ fn build_list_files_errors() -> Result<()> { ----- stderr ----- × Failed to build `[WORKSPACE]/test/packages/anyio_local` ╰─▶ Can only use `--list` with the uv backend - "###); + "); Ok(()) } @@ -1820,7 +1820,7 @@ fn build_version_mismatch() -> Result<()> { .arg(wrong_source_dist.path()) .arg("--wheel") .arg("--out-dir") - .arg(context.temp_dir.path()), @r###" + .arg(context.temp_dir.path()), @" success: false exit_code: 2 ----- stdout ----- @@ -1829,7 +1829,7 @@ fn build_version_mismatch() -> Result<()> { Building wheel from source distribution... × Failed to build `[TEMP_DIR]/anyio-1.2.3.tar.gz` ╰─▶ The source distribution declares version 1.2.3, but the wheel declares version 4.3.0+foo - "###); + "); Ok(()) } @@ -1859,7 +1859,7 @@ fn build_with_symlink() -> Result<()> { .child("src/softlinked/__init__.py") .touch()?; fs_err::remove_dir_all(&context.venv)?; - uv_snapshot!(context.filters(), context.build(), @r###" + uv_snapshot!(context.filters(), context.build(), @" success: true exit_code: 0 ----- stdout ----- @@ -1869,7 +1869,7 @@ fn build_with_symlink() -> Result<()> { Building wheel from source distribution... Successfully built dist/softlinked-0.1.0.tar.gz Successfully built dist/softlinked-0.1.0-py3-none-any.whl - "###); + "); Ok(()) } @@ -1898,7 +1898,7 @@ fn build_with_hardlink() -> Result<()> { .child("src/hardlinked/__init__.py") .touch()?; fs_err::remove_dir_all(&context.venv)?; - uv_snapshot!(context.filters(), context.build(), @r###" + uv_snapshot!(context.filters(), context.build(), @" success: true exit_code: 0 ----- stdout ----- @@ -1908,7 +1908,7 @@ fn build_with_hardlink() -> Result<()> { Building wheel from source distribution... Successfully built dist/hardlinked-0.1.0.tar.gz Successfully built dist/hardlinked-0.1.0-py3-none-any.whl - "###); + "); Ok(()) } @@ -1932,7 +1932,7 @@ fn build_unconfigured_setuptools() -> Result<()> { // This is not technically a `uv build` test, we use it to contrast this passing case with the // failing cases later. - uv_snapshot!(context.filters(), context.pip_install().arg("."), @r###" + uv_snapshot!(context.filters(), context.pip_install().arg("."), @" success: true exit_code: 0 ----- stdout ----- @@ -1942,16 +1942,16 @@ fn build_unconfigured_setuptools() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + greet==0.1.0 (from file://[TEMP_DIR]/) - "###); + "); - uv_snapshot!(context.filters(), context.python_command().arg("-c").arg("import greet"), @r###" + uv_snapshot!(context.filters(), context.python_command().arg("-c").arg("import greet"), @" success: true exit_code: 0 ----- stdout ----- Greetings! ----- stderr ----- - "###); + "); Ok(()) } @@ -1968,7 +1968,7 @@ fn build_workspace_virtual_root() -> Result<()> { members = ["packages/*"] "#})?; - uv_snapshot!(context.filters(), context.build().arg("--no-build-logs"), @r" + uv_snapshot!(context.filters(), context.build().arg("--no-build-logs"), @" success: true exit_code: 0 ----- stdout ----- @@ -1997,7 +1997,7 @@ fn build_pyproject_toml_not_a_project() -> Result<()> { line-length = 88 "})?; - uv_snapshot!(context.filters(), context.build().arg("--no-build-logs"), @r" + uv_snapshot!(context.filters(), context.build().arg("--no-build-logs"), @" success: true exit_code: 0 ----- stdout ----- @@ -2046,7 +2046,7 @@ fn build_with_nonnormalized_name() -> Result<()> { project.child("README").touch()?; // Build the specified path. - uv_snapshot!(&filters, context.build().arg("--no-build-logs").current_dir(&project), @r" + uv_snapshot!(&filters, context.build().arg("--no-build-logs").current_dir(&project), @" success: true exit_code: 0 ----- stdout ----- @@ -2094,7 +2094,7 @@ fn force_pep517() -> Result<()> { build-backend = "uv_build" "#})?; - uv_snapshot!(context.filters(), context.build().env(EnvVars::RUST_BACKTRACE, "0"), @r" + uv_snapshot!(context.filters(), context.build().env(EnvVars::RUST_BACKTRACE, "0"), @" success: false exit_code: 2 ----- stdout ----- @@ -2105,7 +2105,7 @@ fn force_pep517() -> Result<()> { ╰─▶ Expected a Python module at: src/does_not_exist/__init__.py "); - uv_snapshot!(context.filters(), context.build().arg("--force-pep517").env(EnvVars::RUST_BACKTRACE, "0"), @r" + uv_snapshot!(context.filters(), context.build().arg("--force-pep517").env(EnvVars::RUST_BACKTRACE, "0"), @" success: false exit_code: 2 ----- stdout ----- @@ -2164,7 +2164,7 @@ fn venv_included_in_sdist() -> Result<()> { context.venv().assert().success(); // context.filters() - uv_snapshot!(context.filters(), context.build(), @r" + uv_snapshot!(context.filters(), context.build(), @" success: false exit_code: 2 ----- stdout ----- @@ -2192,7 +2192,7 @@ fn test_workspace_trailing_slash() { context.init().arg("--lib").assert().success(); context.init().arg("--lib").arg("child").assert().success(); - uv_snapshot!(context.filters(), context.build().arg("child"), @r" + uv_snapshot!(context.filters(), context.build().arg("child"), @" success: true exit_code: 0 ----- stdout ----- @@ -2205,7 +2205,7 @@ fn test_workspace_trailing_slash() { "); // Check that workspace discovery still works. - uv_snapshot!(context.filters(), context.build().arg("child/"), @r" + uv_snapshot!(context.filters(), context.build().arg("child/"), @" success: true exit_code: 0 ----- stdout ----- @@ -2218,7 +2218,7 @@ fn test_workspace_trailing_slash() { "); // Check general normalization too. - uv_snapshot!(context.filters(), context.build().arg("./child/"), @r" + uv_snapshot!(context.filters(), context.build().arg("./child/"), @" success: true exit_code: 0 ----- stdout ----- @@ -2230,7 +2230,7 @@ fn test_workspace_trailing_slash() { Successfully built dist/child-0.1.0-py3-none-any.whl "); - uv_snapshot!(context.filters(), context.build().arg("./child/../child/"), @r" + uv_snapshot!(context.filters(), context.build().arg("./child/../child/"), @" success: true exit_code: 0 ----- stdout ----- @@ -2253,7 +2253,7 @@ fn build_clear() -> Result<()> { context.init().arg(project.path()).assert().success(); // Regular build - uv_snapshot!(&context.filters(), context.build().arg("project").arg("--no-build-logs"), @r###" + uv_snapshot!(&context.filters(), context.build().arg("project").arg("--no-build-logs"), @" success: true exit_code: 0 ----- stdout ----- @@ -2263,7 +2263,7 @@ fn build_clear() -> Result<()> { Building wheel from source distribution... Successfully built project/dist/project-0.1.0.tar.gz Successfully built project/dist/project-0.1.0-py3-none-any.whl - "###); + "); project .child("dist") @@ -2282,7 +2282,7 @@ fn build_clear() -> Result<()> { .assert(predicate::path::is_file()); // Build with `--clear` to remove the marker file - uv_snapshot!(&context.filters(), context.build().arg("project").arg("--clear").arg("--no-build-logs"), @r###" + uv_snapshot!(&context.filters(), context.build().arg("project").arg("--clear").arg("--no-build-logs"), @" success: true exit_code: 0 ----- stdout ----- @@ -2292,7 +2292,7 @@ fn build_clear() -> Result<()> { Building wheel from source distribution... Successfully built project/dist/project-0.1.0.tar.gz Successfully built project/dist/project-0.1.0-py3-none-any.whl - "###); + "); project .child("dist") @@ -2320,7 +2320,7 @@ fn build_no_gitignore() -> Result<()> { context.init().arg(project.path()).assert().success(); // Default build with `.gitignore` - uv_snapshot!(&context.filters(), context.build().arg("project").arg("--no-build-logs"), @r###" + uv_snapshot!(&context.filters(), context.build().arg("project").arg("--no-build-logs"), @" success: true exit_code: 0 ----- stdout ----- @@ -2330,7 +2330,7 @@ fn build_no_gitignore() -> Result<()> { Building wheel from source distribution... Successfully built project/dist/project-0.1.0.tar.gz Successfully built project/dist/project-0.1.0-py3-none-any.whl - "###); + "); project .child("dist") @@ -2340,7 +2340,7 @@ fn build_no_gitignore() -> Result<()> { fs_err::remove_dir_all(project.child("dist"))?; // Build with `--no-create-gitignore` that does not create `.gitignore` - uv_snapshot!(&context.filters(), context.build().arg("project").arg("--no-create-gitignore").arg("--no-build-logs"), @r###" + uv_snapshot!(&context.filters(), context.build().arg("project").arg("--no-create-gitignore").arg("--no-build-logs"), @" success: true exit_code: 0 ----- stdout ----- @@ -2350,7 +2350,7 @@ fn build_no_gitignore() -> Result<()> { Building wheel from source distribution... Successfully built project/dist/project-0.1.0.tar.gz Successfully built project/dist/project-0.1.0-py3-none-any.whl - "###); + "); project .child("dist") diff --git a/crates/uv/tests/it/build_backend.rs b/crates/uv/tests/it/build_backend.rs index 07979f153..c0befe56d 100644 --- a/crates/uv/tests/it/build_backend.rs +++ b/crates/uv/tests/it/build_backend.rs @@ -36,14 +36,14 @@ fn built_by_uv_direct_wheel() -> Result<()> { .build_backend() .arg("build-wheel") .arg(temp_dir.path()) - .current_dir(built_by_uv), @r###" + .current_dir(built_by_uv), @" success: true exit_code: 0 ----- stdout ----- built_by_uv-0.1.0-py3-none-any.whl ----- stderr ----- - "###); + "); context .pip_install() @@ -53,7 +53,7 @@ fn built_by_uv_direct_wheel() -> Result<()> { uv_snapshot!(context.python_command() .arg("-c") - .arg(BUILT_BY_UV_TEST_SCRIPT), @r###" + .arg(BUILT_BY_UV_TEST_SCRIPT), @" success: true exit_code: 0 ----- stdout ----- @@ -61,17 +61,17 @@ fn built_by_uv_direct_wheel() -> Result<()> { Area of a circle with r=2: 12.56636 ----- stderr ----- - "###); + "); uv_snapshot!(Command::new("say-hi") - .env(EnvVars::PATH, venv_bin_path(&context.venv)), @r###" + .env(EnvVars::PATH, venv_bin_path(&context.venv)), @" success: true exit_code: 0 ----- stdout ----- Hi from a script! ----- stderr ----- - "###); + "); Ok(()) } @@ -92,14 +92,14 @@ fn built_by_uv_direct() -> Result<()> { .build_backend() .arg("build-sdist") .arg(sdist_dir.path()) - .current_dir(built_by_uv), @r###" + .current_dir(built_by_uv), @" success: true exit_code: 0 ----- stdout ----- built_by_uv-0.1.0.tar.gz ----- stderr ----- - "###); + "); let sdist_tree = TempDir::new()?; @@ -116,14 +116,14 @@ fn built_by_uv_direct() -> Result<()> { .build_backend() .arg("build-wheel") .arg(wheel_dir.path()) - .current_dir(sdist_tree.path().join("built_by_uv-0.1.0")), @r###" + .current_dir(sdist_tree.path().join("built_by_uv-0.1.0")), @" success: true exit_code: 0 ----- stdout ----- built_by_uv-0.1.0-py3-none-any.whl ----- stderr ----- - "###); + "); drop(sdist_tree); @@ -137,7 +137,7 @@ fn built_by_uv_direct() -> Result<()> { uv_snapshot!(context.python_command() .arg("-c") - .arg(BUILT_BY_UV_TEST_SCRIPT), @r###" + .arg(BUILT_BY_UV_TEST_SCRIPT), @" success: true exit_code: 0 ----- stdout ----- @@ -145,7 +145,7 @@ fn built_by_uv_direct() -> Result<()> { Area of a circle with r=2: 12.56636 ----- stderr ----- - "###); + "); Ok(()) } @@ -177,14 +177,14 @@ fn built_by_uv_editable() -> Result<()> { .build_backend() .arg("build-wheel") .arg(wheel_dir.path()) - .current_dir(built_by_uv), @r###" + .current_dir(built_by_uv), @" success: true exit_code: 0 ----- stdout ----- built_by_uv-0.1.0-py3-none-any.whl ----- stderr ----- - "###); + "); context .pip_install() .arg(wheel_dir.path().join("built_by_uv-0.1.0-py3-none-any.whl")) @@ -200,7 +200,7 @@ fn built_by_uv_editable() -> Result<()> { // Avoid showing absolute paths and column dependent layout .arg("--quiet") .arg("--capture=no") - .current_dir(built_by_uv), @r###" + .current_dir(built_by_uv), @" success: true exit_code: 0 ----- stdout ----- @@ -208,7 +208,7 @@ fn built_by_uv_editable() -> Result<()> { 2 passed in [TIME] ----- stderr ----- - "###); + "); Ok(()) } @@ -263,14 +263,14 @@ fn preserve_executable_bit() -> Result<()> { context.pip_install().arg(wheel).assert().success(); uv_snapshot!(Command::new("greet.sh") - .env(EnvVars::PATH, venv_bin_path(&context.venv)), @r###" + .env(EnvVars::PATH, venv_bin_path(&context.venv)), @" success: true exit_code: 0 ----- stdout ----- Hi from the shell ----- stderr ----- - "###); + "); Ok(()) } @@ -315,14 +315,14 @@ fn rename_module() -> Result<()> { uv_snapshot!(context .build_backend() .arg("build-wheel") - .arg(temp_dir.path()), @r###" + .arg(temp_dir.path()), @" success: true exit_code: 0 ----- stdout ----- foo-1.0.0-py3-none-any.whl ----- stderr ----- - "###); + "); context .pip_install() @@ -333,19 +333,19 @@ fn rename_module() -> Result<()> { // Importing the module with the `module-name` name succeeds. uv_snapshot!(context.python_command() .arg("-c") - .arg("import bar"), @r###" + .arg("import bar"), @" success: true exit_code: 0 ----- stdout ----- Hi from bar ----- stderr ----- - "###); + "); // Importing the package name fails, it was overridden by `module-name`. uv_snapshot!(context.python_command() .arg("-c") - .arg("import foo"), @r###" + .arg("import foo"), @r#" success: false exit_code: 1 ----- stdout ----- @@ -354,7 +354,7 @@ fn rename_module() -> Result<()> { Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'foo' - "###); + "#); Ok(()) } @@ -389,14 +389,14 @@ fn rename_module_editable_build() -> Result<()> { uv_snapshot!(context .build_backend() .arg("build-editable") - .arg(temp_dir.path()), @r###" + .arg(temp_dir.path()), @" success: true exit_code: 0 ----- stdout ----- foo-1.0.0-py3-none-any.whl ----- stderr ----- - "###); + "); context .pip_install() @@ -407,14 +407,14 @@ fn rename_module_editable_build() -> Result<()> { // Importing the module with the `module-name` name succeeds. uv_snapshot!(context.python_command() .arg("-c") - .arg("import bar"), @r###" + .arg("import bar"), @" success: true exit_code: 0 ----- stdout ----- Hi from bar ----- stderr ----- - "###); + "); Ok(()) } @@ -448,7 +448,7 @@ fn build_module_name_normalization() -> Result<()> { uv_snapshot!(context .build_backend() .arg("build-wheel") - .arg(&wheel_dir), @r" + .arg(&wheel_dir), @" success: false exit_code: 2 ----- stdout ----- @@ -462,7 +462,7 @@ fn build_module_name_normalization() -> Result<()> { uv_snapshot!(context .build_backend() .arg("build-wheel") - .arg(&wheel_dir), @r" + .arg(&wheel_dir), @" success: false exit_code: 2 ----- stdout ----- @@ -480,7 +480,7 @@ fn build_module_name_normalization() -> Result<()> { uv_snapshot!(context .build_backend() .arg("build-wheel") - .arg(&wheel_dir), @r" + .arg(&wheel_dir), @" success: true exit_code: 0 ----- stdout ----- @@ -500,7 +500,7 @@ fn build_module_name_normalization() -> Result<()> { uv_snapshot!(context.python_command() .arg("-c") - .arg("import Django_plugin"), @r" + .arg("import Django_plugin"), @" success: true exit_code: 0 ----- stdout ----- @@ -521,7 +521,7 @@ fn build_module_name_normalization() -> Result<()> { uv_snapshot!(context .build_backend() .arg("build-wheel") - .arg(&wheel_dir), @r" + .arg(&wheel_dir), @" success: true exit_code: 0 ----- stdout ----- @@ -565,14 +565,14 @@ fn build_sdist_with_long_path() -> Result<()> { uv_snapshot!(context .build_backend() .arg("build-sdist") - .arg(temp_dir.path()), @r###" + .arg(temp_dir.path()), @" success: true exit_code: 0 ----- stdout ----- foo-1.0.0.tar.gz ----- stderr ----- - "###); + "); Ok(()) } @@ -598,7 +598,7 @@ fn sdist_error_without_module() -> Result<()> { uv_snapshot!(context .build_backend() .arg("build-sdist") - .arg(temp_dir.path()), @r" + .arg(temp_dir.path()), @" success: false exit_code: 2 ----- stdout ----- @@ -612,7 +612,7 @@ fn sdist_error_without_module() -> Result<()> { uv_snapshot!(context .build_backend() .arg("build-sdist") - .arg(temp_dir.path()), @r" + .arg(temp_dir.path()), @" success: false exit_code: 2 ----- stdout ----- @@ -692,7 +692,7 @@ fn complex_namespace_packages() -> Result<()> { .arg("--offline") .arg("--find-links") .arg(dist.path()), - @r" + @" success: true exit_code: 0 ----- stdout ----- @@ -709,7 +709,7 @@ fn complex_namespace_packages() -> Result<()> { uv_snapshot!(context.python_command() .arg("-c") .arg("from complex_project.part_b import two; print(two())"), - @r" + @" success: true exit_code: 0 ----- stdout ----- @@ -729,7 +729,7 @@ fn complex_namespace_packages() -> Result<()> { .arg("-e") .arg("complex-project-part_b") .arg("--offline"), - @r" + @" success: true exit_code: 0 ----- stdout ----- @@ -749,7 +749,7 @@ fn complex_namespace_packages() -> Result<()> { uv_snapshot!(context.python_command() .arg("-c") .arg("from complex_project.part_b import two; print(two())"), - @r" + @" success: true exit_code: 0 ----- stdout ----- @@ -793,7 +793,7 @@ fn license_glob_without_matches_errors() -> Result<()> { .build_backend() .arg("build-wheel") .arg(context.temp_dir.path()) - .current_dir(project.path()), @r" + .current_dir(project.path()), @" success: false exit_code: 2 ----- stdout ----- @@ -836,7 +836,7 @@ fn license_file_must_be_utf8() -> Result<()> { .build_backend() .arg("build-wheel") .arg(context.temp_dir.path()) - .current_dir(project.path()), @r" + .current_dir(project.path()), @" success: false exit_code: 2 ----- stdout ----- @@ -886,7 +886,7 @@ fn symlinked_file() -> Result<()> { .build_backend() .arg("build-sdist") .arg(context.temp_dir.path()) - .current_dir(project.path()), @r" + .current_dir(project.path()), @" success: true exit_code: 0 ----- stdout ----- @@ -899,7 +899,7 @@ fn symlinked_file() -> Result<()> { .build_backend() .arg("build-wheel") .arg(context.temp_dir.path()) - .current_dir(project.path()), @r" + .current_dir(project.path()), @" success: true exit_code: 0 ----- stdout ----- @@ -908,7 +908,7 @@ fn symlinked_file() -> Result<()> { ----- stderr ----- "); - uv_snapshot!(context.filters(), context.pip_install().arg("project-1.0.0-py3-none-any.whl"), @r" + uv_snapshot!(context.filters(), context.pip_install().arg("project-1.0.0-py3-none-any.whl"), @" success: true exit_code: 0 ----- stdout ----- @@ -962,7 +962,7 @@ fn invalid_build_backend_settings_are_ignored() -> Result<()> { // Since we are not building, this must pass without complaining about the error in // `tool.uv.build-backend`. - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -997,7 +997,7 @@ fn error_on_relative_module_root_outside_project_root() -> Result<()> { context.temp_dir.child("__init__.py").touch()?; - uv_snapshot!(context.filters(), context.build(), @r" + uv_snapshot!(context.filters(), context.build(), @" success: false exit_code: 2 ----- stdout ----- @@ -1008,7 +1008,7 @@ fn error_on_relative_module_root_outside_project_root() -> Result<()> { ╰─▶ Module root must be inside the project: .. "); - uv_snapshot!(context.filters(), context.build().arg("--wheel"), @r" + uv_snapshot!(context.filters(), context.build().arg("--wheel"), @" success: false exit_code: 2 ----- stdout ----- @@ -1052,7 +1052,7 @@ fn error_on_relative_data_dir_outside_project_root() -> Result<()> { context.temp_dir.child("headers").create_dir_all()?; - uv_snapshot!(context.filters(), context.build().arg("project"), @r" + uv_snapshot!(context.filters(), context.build().arg("project"), @" success: false exit_code: 2 ----- stdout ----- @@ -1063,7 +1063,7 @@ fn error_on_relative_data_dir_outside_project_root() -> Result<()> { ╰─▶ The path for the data directory headers must be inside the project: ../header "); - uv_snapshot!(context.filters(), context.build().arg("project").arg("--wheel"), @r" + uv_snapshot!(context.filters(), context.build().arg("project").arg("--wheel"), @" success: false exit_code: 2 ----- stdout ----- @@ -1096,7 +1096,7 @@ fn venv_in_source_tree() { .assert() .success(); - uv_snapshot!(context.filters(), context.build(), @r" + uv_snapshot!(context.filters(), context.build(), @" success: false exit_code: 2 ----- stdout ----- @@ -1107,7 +1107,7 @@ fn venv_in_source_tree() { ╰─▶ Virtual environments must not be added to source distributions or wheels, remove the directory or exclude it from the build: src/foo/.venv "); - uv_snapshot!(context.filters(), context.build().arg("--wheel"), @r" + uv_snapshot!(context.filters(), context.build().arg("--wheel"), @" success: false exit_code: 2 ----- stdout ----- @@ -1156,7 +1156,7 @@ fn warn_on_redundant_module_names() -> Result<()> { bar_module.child("__init__.py").touch()?; // Warnings should be printed when invoking `uv build` - uv_snapshot!(context.filters(), context.build(), @r" + uv_snapshot!(context.filters(), context.build(), @" success: true exit_code: 0 ----- stdout ----- @@ -1172,7 +1172,7 @@ fn warn_on_redundant_module_names() -> Result<()> { // But warnings shouldn't be printed in cases when the user might not // control the thing being built. Sources being enabled is a workable proxy // for this. - uv_snapshot!(context.filters(), context.build().arg("--no-sources"), @r" + uv_snapshot!(context.filters(), context.build().arg("--no-sources"), @" success: true exit_code: 0 ----- stdout ----- @@ -1205,7 +1205,7 @@ fn invalid_pyproject_toml() -> Result<()> { build-backend = "uv_build" "#})?; - uv_snapshot!(context.filters(), context.build().arg("child"), @r" + uv_snapshot!(context.filters(), context.build().arg("child"), @" success: false exit_code: 2 ----- stdout ----- @@ -1307,14 +1307,14 @@ fn build_with_all_metadata() -> Result<()> { .arg("build-wheel") .arg("--preview-features") .arg("metadata-json") - .arg(temp_dir.path()), @r###" + .arg(temp_dir.path()), @" success: true exit_code: 0 ----- stdout ----- foo-1.0.0-py3-none-any.whl ----- stderr ----- - "###); + "); context .pip_install() @@ -1328,7 +1328,7 @@ fn build_with_all_metadata() -> Result<()> { .join("foo-1.0.0.dist-info") .join("METADATA"), )?; - assert_snapshot!(metadata, @r" + assert_snapshot!(metadata, @" Metadata-Version: 2.4 Name: foo Version: 1.0.0 @@ -1418,7 +1418,7 @@ fn build_with_all_metadata() -> Result<()> { .join("WHEEL"), )?; let wheel = wheel.replace(uv_version::version(), "[VERSION]"); - assert_snapshot!(wheel, @r" + assert_snapshot!(wheel, @" Wheel-Version: 1.0 Generator: uv [VERSION] Root-Is-Purelib: true diff --git a/crates/uv/tests/it/cache.rs b/crates/uv/tests/it/cache.rs index 14bf972e8..8dba37f0f 100644 --- a/crates/uv/tests/it/cache.rs +++ b/crates/uv/tests/it/cache.rs @@ -56,7 +56,7 @@ fn cache_init_failure() -> Result<()> { context.add_shared_env(&mut command, false); // Running a command should fail with a chained error about cache initialization - uv_snapshot!(&filters, command, @r" + uv_snapshot!(&filters, command, @" success: false exit_code: 2 ----- stdout ----- diff --git a/crates/uv/tests/it/cache_clean.rs b/crates/uv/tests/it/cache_clean.rs index f8a7ce114..eecf5455d 100644 --- a/crates/uv/tests/it/cache_clean.rs +++ b/crates/uv/tests/it/cache_clean.rs @@ -22,7 +22,7 @@ fn clean_all() -> Result<()> { .assert() .success(); - uv_snapshot!(context.with_filtered_counts().filters(), context.clean().arg("--verbose"), @r" + uv_snapshot!(context.with_filtered_counts().filters(), context.clean().arg("--verbose"), @" success: true exit_code: 0 ----- stdout ----- @@ -53,7 +53,7 @@ async fn clean_force() -> Result<()> { .success(); // When unlocked, `--force` should still take a lock - uv_snapshot!(context.filters(), context.clean().arg("--verbose").arg("--force"), @r" + uv_snapshot!(context.filters(), context.clean().arg("--verbose").arg("--force"), @" success: true exit_code: 0 ----- stdout ----- @@ -77,7 +77,7 @@ async fn clean_force() -> Result<()> { let _cache = uv_cache::Cache::from_path(context.cache_dir.path()) .with_exclusive_lock() .await; - uv_snapshot!(context.filters(), context.clean().arg("--verbose").arg("--force"), @r" + uv_snapshot!(context.filters(), context.clean().arg("--verbose").arg("--force"), @" success: true exit_code: 0 ----- stdout ----- @@ -133,7 +133,7 @@ fn clean_package_pypi() -> Result<()> { ]) .collect(); - uv_snapshot!(&filters, context.clean().arg("--verbose").arg("iniconfig"), @r" + uv_snapshot!(&filters, context.clean().arg("--verbose").arg("iniconfig"), @" success: true exit_code: 0 ----- stdout ----- @@ -153,7 +153,7 @@ fn clean_package_pypi() -> Result<()> { ); // Running `uv cache prune` should have no effect. - uv_snapshot!(&filters, context.prune().arg("--verbose"), @r" + uv_snapshot!(&filters, context.prune().arg("--verbose"), @" success: true exit_code: 0 ----- stdout ----- @@ -212,7 +212,7 @@ fn clean_package_index() -> Result<()> { ]) .collect(); - uv_snapshot!(&filters, context.clean().arg("--verbose").arg("iniconfig"), @r" + uv_snapshot!(&filters, context.clean().arg("--verbose").arg("iniconfig"), @" success: true exit_code: 0 ----- stdout ----- @@ -243,7 +243,7 @@ async fn cache_timeout() { .with_exclusive_lock() .await; - uv_snapshot!(context.filters(), context.clean().env(EnvVars::UV_LOCK_TIMEOUT, "1"), @r" + uv_snapshot!(context.filters(), context.clean().env(EnvVars::UV_LOCK_TIMEOUT, "1"), @" success: false exit_code: 2 ----- stdout ----- diff --git a/crates/uv/tests/it/cache_prune.rs b/crates/uv/tests/it/cache_prune.rs index 5a2000393..63b19dccf 100644 --- a/crates/uv/tests/it/cache_prune.rs +++ b/crates/uv/tests/it/cache_prune.rs @@ -29,7 +29,7 @@ fn prune_no_op() -> Result<()> { .chain(std::iter::once((r"Removed \d+ files", "Removed [N] files"))) .collect(); - uv_snapshot!(&filters, context.prune().arg("--verbose"), @r" + uv_snapshot!(&filters, context.prune().arg("--verbose"), @" success: true exit_code: 0 ----- stdout ----- @@ -70,7 +70,7 @@ fn prune_stale_directory() -> Result<()> { .chain(std::iter::once((r"Removed \d+ files", "Removed [N] files"))) .collect(); - uv_snapshot!(&filters, context.prune().arg("--verbose"), @r" + uv_snapshot!(&filters, context.prune().arg("--verbose"), @" success: true exit_code: 0 ----- stdout ----- @@ -104,7 +104,7 @@ fn prune_cached_env() { .arg("pytest@8.0.0") .arg("--version") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -118,7 +118,7 @@ fn prune_cached_env() { + packaging==24.0 + pluggy==1.4.0 + pytest==8.0.0 - "###); + "); let filters: Vec<_> = context .filters() @@ -132,7 +132,7 @@ fn prune_cached_env() { ]) .collect(); - uv_snapshot!(filters, context.prune().arg("--verbose"), @r" + uv_snapshot!(filters, context.prune().arg("--verbose"), @" success: true exit_code: 0 ----- stdout ----- @@ -179,7 +179,7 @@ fn prune_stale_symlink() -> Result<()> { ]) .collect(); - uv_snapshot!(filters, context.prune().arg("--verbose"), @r" + uv_snapshot!(filters, context.prune().arg("--verbose"), @" success: true exit_code: 0 ----- stdout ----- @@ -211,7 +211,7 @@ async fn prune_force() -> Result<()> { .success(); // When unlocked, `--force` should still take a lock - uv_snapshot!(context.filters(), context.prune().arg("--verbose").arg("--force"), @r" + uv_snapshot!(context.filters(), context.prune().arg("--verbose").arg("--force"), @" success: true exit_code: 0 ----- stdout ----- @@ -232,7 +232,7 @@ async fn prune_force() -> Result<()> { let _cache = uv_cache::Cache::from_path(context.cache_dir.path()) .with_exclusive_lock() .await; - uv_snapshot!(context.filters(), context.prune().arg("--verbose").arg("--force"), @r" + uv_snapshot!(context.filters(), context.prune().arg("--verbose").arg("--force"), @" success: true exit_code: 0 ----- stdout ----- @@ -265,7 +265,7 @@ fn prune_unzipped() -> Result<()> { .collect(); // Install a requirement, to populate the cache. - uv_snapshot!(&filters, context.pip_install().arg("-r").arg("requirements.txt").arg("--reinstall"), @r###" + uv_snapshot!(&filters, context.pip_install().arg("-r").arg("requirements.txt").arg("--reinstall"), @" success: true exit_code: 0 ----- stdout ----- @@ -276,9 +276,9 @@ fn prune_unzipped() -> Result<()> { Installed 2 packages in [TIME] + iniconfig==2.0.0 + source-distribution==0.0.1 - "###); + "); - uv_snapshot!(&filters, context.prune().arg("--ci"), @r###" + uv_snapshot!(&filters, context.prune().arg("--ci"), @" success: true exit_code: 0 ----- stdout ----- @@ -286,7 +286,7 @@ fn prune_unzipped() -> Result<()> { ----- stderr ----- Pruning cache at: [CACHE_DIR]/ Removed [N] files ([SIZE]) - "###); + "); context.venv().arg("--clear").assert().success(); @@ -295,7 +295,7 @@ fn prune_unzipped() -> Result<()> { requirements_txt.write_str(indoc! { r" source-distribution==0.0.1 " })?; - uv_snapshot!(&filters, context.pip_install().arg("-r").arg("requirements.txt").arg("--offline"), @r###" + uv_snapshot!(&filters, context.pip_install().arg("-r").arg("requirements.txt").arg("--offline"), @" success: true exit_code: 0 ----- stdout ----- @@ -305,13 +305,13 @@ fn prune_unzipped() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + source-distribution==0.0.1 - "###); + "); // But reinstalling the other package should require a download, since we pruned the wheel. requirements_txt.write_str(indoc! { r" iniconfig " })?; - uv_snapshot!(&filters, context.pip_install().arg("-r").arg("requirements.txt").arg("--offline"), @r" + uv_snapshot!(&filters, context.pip_install().arg("-r").arg("requirements.txt").arg("--offline"), @" success: false exit_code: 1 ----- stdout ----- @@ -361,7 +361,7 @@ fn prune_stale_revision() -> Result<()> { uv_snapshot!(&filters, context .pip_install() .arg(".") - .arg("--reinstall"), @r###" + .arg("--reinstall"), @" success: true exit_code: 0 ----- stdout ----- @@ -371,12 +371,12 @@ fn prune_stale_revision() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + project==0.1.0 (from file://[TEMP_DIR]/) - "###); + "); uv_snapshot!(&filters, context .pip_install() .arg(".") - .arg("--reinstall"), @r###" + .arg("--reinstall"), @" success: true exit_code: 0 ----- stdout ----- @@ -387,7 +387,7 @@ fn prune_stale_revision() -> Result<()> { Uninstalled 1 package in [TIME] Installed 1 package in [TIME] ~ project==0.1.0 (from file://[TEMP_DIR]/) - "###); + "); let filters: Vec<_> = filters .into_iter() @@ -401,7 +401,7 @@ fn prune_stale_revision() -> Result<()> { .collect(); // Pruning should remove the unused revision. - uv_snapshot!(&filters, context.prune().arg("--verbose"), @r" + uv_snapshot!(&filters, context.prune().arg("--verbose"), @" success: true exit_code: 0 ----- stdout ----- @@ -419,7 +419,7 @@ fn prune_stale_revision() -> Result<()> { // Uninstall and reinstall the package. We should use the cached version. uv_snapshot!(&filters, context .pip_uninstall() - .arg("."), @r###" + .arg("."), @" success: true exit_code: 0 ----- stdout ----- @@ -427,11 +427,11 @@ fn prune_stale_revision() -> Result<()> { ----- stderr ----- Uninstalled 1 package in [TIME] - project==0.1.0 (from file://[TEMP_DIR]/) - "###); + "); uv_snapshot!(&filters, context .pip_install() - .arg("."), @r###" + .arg("."), @" success: true exit_code: 0 ----- stdout ----- @@ -441,7 +441,7 @@ fn prune_stale_revision() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + project==0.1.0 (from file://[TEMP_DIR]/) - "###); + "); Ok(()) } diff --git a/crates/uv/tests/it/cache_size.rs b/crates/uv/tests/it/cache_size.rs index 7fbfde3c8..355e07100 100644 --- a/crates/uv/tests/it/cache_size.rs +++ b/crates/uv/tests/it/cache_size.rs @@ -10,7 +10,7 @@ fn cache_size_empty_raw() { // Clean cache first to ensure truly empty state context.clean().assert().success(); - uv_snapshot!(context.cache_size().arg("--preview"), @r" + uv_snapshot!(context.cache_size().arg("--preview"), @" success: true exit_code: 0 ----- stdout ----- @@ -29,7 +29,7 @@ fn cache_size_with_packages_raw() { context.pip_install().arg("iniconfig").assert().success(); // Check cache size is now positive (raw bytes). - uv_snapshot!(context.with_filtered_cache_size().filters(), context.cache_size().arg("--preview"), @r" + uv_snapshot!(context.with_filtered_cache_size().filters(), context.cache_size().arg("--preview"), @" success: true exit_code: 0 ----- stdout ----- @@ -48,7 +48,7 @@ fn cache_size_with_packages_human() { context.pip_install().arg("iniconfig").assert().success(); // Check cache size with --human flag - uv_snapshot!(context.with_filtered_cache_size().filters(), context.cache_size().arg("--preview").arg("--human"), @r" + uv_snapshot!(context.with_filtered_cache_size().filters(), context.cache_size().arg("--preview").arg("--human"), @" success: true exit_code: 0 ----- stdout ----- diff --git a/crates/uv/tests/it/edit.rs b/crates/uv/tests/it/edit.rs index 0e1635c0f..5999e1b7b 100644 --- a/crates/uv/tests/it/edit.rs +++ b/crates/uv/tests/it/edit.rs @@ -38,7 +38,7 @@ fn add_registry() -> Result<()> { dependencies = [] "#})?; - uv_snapshot!(context.filters(), context.add().arg("anyio==3.7.0"), @r" + uv_snapshot!(context.filters(), context.add().arg("anyio==3.7.0"), @" success: true exit_code: 0 ----- stdout ----- @@ -58,7 +58,7 @@ fn add_registry() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -66,7 +66,7 @@ fn add_registry() -> Result<()> { dependencies = [ "anyio==3.7.0", ] - "### + "# ); }); @@ -130,7 +130,7 @@ fn add_registry() -> Result<()> { }); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -157,16 +157,16 @@ fn add_git() -> Result<()> { dependencies = ["anyio==3.7.0"] "#})?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -180,7 +180,7 @@ fn add_git() -> Result<()> { "); // Adding with an ambiguous Git reference should treat it as a revision. - uv_snapshot!(context.filters(), context.add().arg("uv-public-pypackage @ git+https://github.com/astral-test/uv-public-pypackage@0.0.1"), @r" + uv_snapshot!(context.filters(), context.add().arg("uv-public-pypackage @ git+https://github.com/astral-test/uv-public-pypackage@0.0.1"), @" success: true exit_code: 0 ----- stdout ----- @@ -192,7 +192,7 @@ fn add_git() -> Result<()> { + uv-public-pypackage==0.1.0 (from git+https://github.com/astral-test/uv-public-pypackage@0dacfd662c64cb4ceb16e6cf65a157a8b715b979) "); - uv_snapshot!(context.filters(), context.add().arg("uv-public-pypackage @ git+https://github.com/astral-test/uv-public-pypackage").arg("--tag=0.0.1"), @r" + uv_snapshot!(context.filters(), context.add().arg("uv-public-pypackage @ git+https://github.com/astral-test/uv-public-pypackage").arg("--tag=0.0.1"), @" success: true exit_code: 0 ----- stdout ----- @@ -208,7 +208,7 @@ fn add_git() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -220,7 +220,7 @@ fn add_git() -> Result<()> { [tool.uv.sources] uv-public-pypackage = { git = "https://github.com/astral-test/uv-public-pypackage", tag = "0.0.1" } - "### + "# ); }); @@ -293,7 +293,7 @@ fn add_git() -> Result<()> { }); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -322,7 +322,7 @@ fn add_git_private_source() -> Result<()> { dependencies = [] "#})?; - uv_snapshot!(context.filters(), context.add().arg(format!("uv-private-pypackage @ git+https://{token}@github.com/astral-test/uv-private-pypackage")), @r" + uv_snapshot!(context.filters(), context.add().arg(format!("uv-private-pypackage @ git+https://{token}@github.com/astral-test/uv-private-pypackage")), @" success: true exit_code: 0 ----- stdout ----- @@ -340,7 +340,7 @@ fn add_git_private_source() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -351,7 +351,7 @@ fn add_git_private_source() -> Result<()> { [tool.uv.sources] uv-private-pypackage = { git = "https://github.com/astral-test/uv-private-pypackage" } - "### + "# ); }); @@ -389,7 +389,7 @@ fn add_git_private_source() -> Result<()> { }); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -420,7 +420,7 @@ fn add_git_private_raw() -> Result<()> { dependencies = [] "#})?; - uv_snapshot!(filters, context.add().arg(format!("uv-private-pypackage @ git+https://{token}@github.com/astral-test/uv-private-pypackage")).arg("--raw-sources"), @r" + uv_snapshot!(filters, context.add().arg(format!("uv-private-pypackage @ git+https://{token}@github.com/astral-test/uv-private-pypackage")).arg("--raw-sources"), @" success: true exit_code: 0 ----- stdout ----- @@ -484,7 +484,7 @@ fn add_git_private_raw() -> Result<()> { }); // Install from the lockfile. - uv_snapshot!(filters, context.sync().arg("--frozen"), @r" + uv_snapshot!(filters, context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -521,7 +521,7 @@ async fn add_git_private_rate_limited_by_github_rest_api_403_response() -> Resul uv_snapshot!(context.filters(), context .add() .arg(format!("uv-private-pypackage @ git+https://{token}@github.com/astral-test/uv-private-pypackage")) - .env(EnvVars::UV_GITHUB_FAST_PATH_URL, server.uri()), @r" + .env(EnvVars::UV_GITHUB_FAST_PATH_URL, server.uri()), @" success: true exit_code: 0 ----- stdout ----- @@ -565,7 +565,7 @@ async fn add_git_private_rate_limited_by_github_rest_api_429_response() -> Resul .arg(format!("uv-private-pypackage @ git+https://{token}@github.com/astral-test/uv-private-pypackage")) .env(EnvVars::UV_GITHUB_FAST_PATH_URL, server.uri()) .env(EnvVars::UV_TEST_NO_HTTP_RETRY_DELAY, "true") - .env_remove(EnvVars::UV_HTTP_RETRIES), @r" + .env_remove(EnvVars::UV_HTTP_RETRIES), @" success: true exit_code: 0 ----- stdout ----- @@ -594,16 +594,16 @@ fn add_git_error() -> Result<()> { dependencies = [] "#})?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 1 package in [TIME] - "###); + "); - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -613,24 +613,24 @@ fn add_git_error() -> Result<()> { "); // Provide a tag without a Git source. - uv_snapshot!(context.filters(), context.add().arg("flask").arg("--tag").arg("0.0.1"), @r###" + uv_snapshot!(context.filters(), context.add().arg("flask").arg("--tag").arg("0.0.1"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: `flask` did not resolve to a Git repository, but a Git reference (`--tag 0.0.1`) was provided. - "###); + "); // Provide a tag with a non-Git source. - uv_snapshot!(context.filters(), context.add().arg("flask @ https://files.pythonhosted.org/packages/61/80/ffe1da13ad9300f87c93af113edd0638c75138c42a0994becfacac078c06/flask-3.0.3-py3-none-any.whl").arg("--branch").arg("0.0.1"), @r###" + uv_snapshot!(context.filters(), context.add().arg("flask @ https://files.pythonhosted.org/packages/61/80/ffe1da13ad9300f87c93af113edd0638c75138c42a0994becfacac078c06/flask-3.0.3-py3-none-any.whl").arg("--branch").arg("0.0.1"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: `flask` did not resolve to a Git repository, but a Git reference (`--branch 0.0.1`) was provided. - "###); + "); Ok(()) } @@ -649,7 +649,7 @@ fn add_git_branch() -> Result<()> { dependencies = [] "#})?; - uv_snapshot!(context.filters(), context.add().arg("uv-public-pypackage @ git+https://github.com/astral-test/uv-public-pypackage").arg("--branch").arg("test-branch"), @r" + uv_snapshot!(context.filters(), context.add().arg("uv-public-pypackage @ git+https://github.com/astral-test/uv-public-pypackage").arg("--branch").arg("test-branch"), @" success: true exit_code: 0 ----- stdout ----- @@ -696,7 +696,7 @@ fn add_git_lfs() -> Result<()> { .arg("--no-cache") .arg("test-lfs-repo @ git+https://github.com/astral-sh/test-lfs-repo") .arg("--rev").arg("657500f0703dc173ac5d68dfa1d7e8c985c84424") - .arg("--lfs"), @r" + .arg("--lfs"), @" success: true exit_code: 0 ----- stdout ----- @@ -767,7 +767,7 @@ fn add_git_lfs() -> Result<()> { .arg("--no-cache") .arg("git+https://github.com/astral-sh/test-lfs-repo") .arg("--rev").arg("4e82e85f6a8b8825d614ea23c550af55b2b7738c") - .arg("--lfs"), @r" + .arg("--lfs"), @" success: true exit_code: 0 ----- stdout ----- @@ -799,7 +799,7 @@ fn add_git_lfs() -> Result<()> { .env(EnvVars::UV_INTERNAL__TEST_LFS_DISABLED, "1") .arg("git+https://github.com/astral-sh/test-lfs-repo") .arg("--rev").arg("657500f0703dc173ac5d68dfa1d7e8c985c84424") - .arg("--lfs"), @r" + .arg("--lfs"), @" success: false exit_code: [ERROR_CODE] ----- stdout ----- @@ -815,7 +815,7 @@ fn add_git_lfs() -> Result<()> { uv_snapshot!(context.filters(), context.add() .arg("git+https://github.com/astral-sh/test-lfs-repo") .arg("--rev").arg("657500f0703dc173ac5d68dfa1d7e8c985c84424") - .arg("--lfs"), @r" + .arg("--lfs"), @" success: true exit_code: 0 ----- stdout ----- @@ -832,13 +832,13 @@ fn add_git_lfs() -> Result<()> { // Verify that we can import the module and access LFS content uv_snapshot!(context.filters(), context.python_command() .arg("-c") - .arg("import test_lfs_repo.lfs_module"), @r#" + .arg("import test_lfs_repo.lfs_module"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- - "#); + "); // Now let's delete some of the LFS entries from our db... fs_err::remove_file(&ok_checkout_file)?; @@ -849,7 +849,7 @@ fn add_git_lfs() -> Result<()> { .arg("git+https://github.com/astral-sh/test-lfs-repo") .arg("--rev").arg("657500f0703dc173ac5d68dfa1d7e8c985c84424") .arg("--reinstall") - .arg("--lfs"), @r" + .arg("--lfs"), @" success: true exit_code: 0 ----- stdout ----- @@ -865,13 +865,13 @@ fn add_git_lfs() -> Result<()> { // Verify that we can import the module and access LFS content uv_snapshot!(context.filters(), context.python_command() .arg("-c") - .arg("import test_lfs_repo.lfs_module"), @r#" + .arg("import test_lfs_repo.lfs_module"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- - "#); + "); // Verify our db and checkout recovered assert!(ok_checkout_file.exists()); @@ -881,7 +881,7 @@ fn add_git_lfs() -> Result<()> { uv_snapshot!(context.filters(), context.add() .arg("git+https://github.com/astral-sh/test-lfs-repo") .arg("--rev").arg("657500f0703dc173ac5d68dfa1d7e8c985c84424") - .arg("--lfs"), @r" + .arg("--lfs"), @" success: true exit_code: 0 ----- stdout ----- @@ -909,16 +909,16 @@ fn add_git_raw() -> Result<()> { dependencies = ["anyio==3.7.0"] "#})?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -932,7 +932,7 @@ fn add_git_raw() -> Result<()> { "); // Use an ambiguous tag reference, which would otherwise not resolve. - uv_snapshot!(context.filters(), context.add().arg("uv-public-pypackage @ git+https://github.com/astral-test/uv-public-pypackage@0.0.1").arg("--raw-sources"), @r" + uv_snapshot!(context.filters(), context.add().arg("uv-public-pypackage @ git+https://github.com/astral-test/uv-public-pypackage@0.0.1").arg("--raw-sources"), @" success: true exit_code: 0 ----- stdout ----- @@ -950,7 +950,7 @@ fn add_git_raw() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -959,7 +959,7 @@ fn add_git_raw() -> Result<()> { "anyio==3.7.0", "uv-public-pypackage @ git+https://github.com/astral-test/uv-public-pypackage@0.0.1", ] - "### + "# ); }); @@ -1032,7 +1032,7 @@ fn add_git_raw() -> Result<()> { }); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -1059,16 +1059,16 @@ fn add_git_implicit() -> Result<()> { dependencies = ["anyio==3.7.0"] "#})?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -1082,7 +1082,7 @@ fn add_git_implicit() -> Result<()> { "); // Omit the `git+` prefix. - uv_snapshot!(context.filters(), context.add().arg("uv-public-pypackage @ https://github.com/astral-test/uv-public-pypackage.git"), @r" + uv_snapshot!(context.filters(), context.add().arg("uv-public-pypackage @ https://github.com/astral-test/uv-public-pypackage.git"), @" success: true exit_code: 0 ----- stdout ----- @@ -1113,7 +1113,7 @@ fn add_raw_error() -> Result<()> { "#})?; // Provide a tag without a Git source. - uv_snapshot!(context.filters(), context.add().arg("uv-public-pypackage @ git+https://github.com/astral-test/uv-public-pypackage").arg("--tag").arg("0.0.1").arg("--raw-sources"), @r" + uv_snapshot!(context.filters(), context.add().arg("uv-public-pypackage @ git+https://github.com/astral-test/uv-public-pypackage").arg("--tag").arg("0.0.1").arg("--raw-sources"), @" success: false exit_code: 2 ----- stdout ----- @@ -1151,7 +1151,7 @@ fn reinstall_local_source_trees() -> Result<()> { dependencies = [] "#})?; - uv_snapshot!(context.filters(), context.add().current_dir(&project_1).arg("../project2").arg("--editable"), @r" + uv_snapshot!(context.filters(), context.add().current_dir(&project_1).arg("../project2").arg("--editable"), @" success: true exit_code: 0 ----- stdout ----- @@ -1166,7 +1166,7 @@ fn reinstall_local_source_trees() -> Result<()> { "); // Running `uv add` should reinstall the project. - uv_snapshot!(context.filters(), context.add().current_dir(&project_1).arg("../project2").arg("--editable"), @r" + uv_snapshot!(context.filters(), context.add().current_dir(&project_1).arg("../project2").arg("--editable"), @" success: true exit_code: 0 ----- stdout ----- @@ -1197,14 +1197,14 @@ fn add_editable_error() -> Result<()> { "#})?; // Provide `--editable` with a non-source tree. - uv_snapshot!(context.filters(), context.add().arg("flask @ https://files.pythonhosted.org/packages/61/80/ffe1da13ad9300f87c93af113edd0638c75138c42a0994becfacac078c06/flask-3.0.3-py3-none-any.whl").arg("--editable"), @r###" + uv_snapshot!(context.filters(), context.add().arg("flask @ https://files.pythonhosted.org/packages/61/80/ffe1da13ad9300f87c93af113edd0638c75138c42a0994becfacac078c06/flask-3.0.3-py3-none-any.whl").arg("--editable"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: `flask` did not resolve to a local directory, but the `--editable` flag was provided. Editable installs are only supported for local directories. - "###); + "); Ok(()) } @@ -1224,7 +1224,7 @@ fn add_unnamed() -> Result<()> { dependencies = [] "#})?; - uv_snapshot!(context.filters(), context.add().arg("git+https://github.com/astral-test/uv-public-pypackage").arg("--tag=0.0.1"), @r" + uv_snapshot!(context.filters(), context.add().arg("git+https://github.com/astral-test/uv-public-pypackage").arg("--tag=0.0.1"), @" success: true exit_code: 0 ----- stdout ----- @@ -1242,7 +1242,7 @@ fn add_unnamed() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -1253,7 +1253,7 @@ fn add_unnamed() -> Result<()> { [tool.uv.sources] uv-public-pypackage = { git = "https://github.com/astral-test/uv-public-pypackage", tag = "0.0.1" } - "### + "# ); }); @@ -1291,7 +1291,7 @@ fn add_unnamed() -> Result<()> { }); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -1317,7 +1317,7 @@ fn add_remove_dev() -> Result<()> { dependencies = [] "#})?; - uv_snapshot!(context.filters(), context.add().arg("anyio==3.7.0").arg("--dev"), @r" + uv_snapshot!(context.filters(), context.add().arg("anyio==3.7.0").arg("--dev"), @" success: true exit_code: 0 ----- stdout ----- @@ -1337,7 +1337,7 @@ fn add_remove_dev() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -1348,7 +1348,7 @@ fn add_remove_dev() -> Result<()> { dev = [ "anyio==3.7.0", ] - "### + "# ); }); @@ -1417,7 +1417,7 @@ fn add_remove_dev() -> Result<()> { }); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -1427,7 +1427,7 @@ fn add_remove_dev() -> Result<()> { "); // This should fail without --dev. - uv_snapshot!(context.filters(), context.remove().arg("anyio"), @r###" + uv_snapshot!(context.filters(), context.remove().arg("anyio"), @" success: false exit_code: 2 ----- stdout ----- @@ -1435,10 +1435,10 @@ fn add_remove_dev() -> Result<()> { ----- stderr ----- hint: `anyio` is in the `dev` group (try: `uv remove anyio --group dev`) error: The dependency `anyio` could not be found in `project.dependencies` - "###); + "); // Remove the dependency. - uv_snapshot!(context.filters(), context.remove().arg("anyio").arg("--dev"), @r" + uv_snapshot!(context.filters(), context.remove().arg("anyio").arg("--dev"), @" success: true exit_code: 0 ----- stdout ----- @@ -1457,7 +1457,7 @@ fn add_remove_dev() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -1466,7 +1466,7 @@ fn add_remove_dev() -> Result<()> { [dependency-groups] dev = [] - "### + "# ); }); @@ -1498,7 +1498,7 @@ fn add_remove_dev() -> Result<()> { }); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -1524,7 +1524,7 @@ fn add_remove_optional() -> Result<()> { dependencies = [] "#})?; - uv_snapshot!(context.filters(), context.add().arg("anyio==3.7.0").arg("--optional=io"), @r" + uv_snapshot!(context.filters(), context.add().arg("anyio==3.7.0").arg("--optional=io"), @" success: true exit_code: 0 ----- stdout ----- @@ -1544,7 +1544,7 @@ fn add_remove_optional() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -1555,7 +1555,7 @@ fn add_remove_optional() -> Result<()> { io = [ "anyio==3.7.0", ] - "### + "# ); }); @@ -1624,7 +1624,7 @@ fn add_remove_optional() -> Result<()> { // Install from the lockfile. At present, this will _uninstall_ the packages since `sync` does // not include extras by default. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -1634,10 +1634,10 @@ fn add_remove_optional() -> Result<()> { - anyio==3.7.0 - idna==3.6 - sniffio==1.3.1 - "###); + "); // This should fail without --optional. - uv_snapshot!(context.filters(), context.remove().arg("anyio"), @r###" + uv_snapshot!(context.filters(), context.remove().arg("anyio"), @" success: false exit_code: 2 ----- stdout ----- @@ -1645,10 +1645,10 @@ fn add_remove_optional() -> Result<()> { ----- stderr ----- hint: `anyio` is an optional dependency (try: `uv remove anyio --optional io`) error: The dependency `anyio` could not be found in `project.dependencies` - "###); + "); // Remove the dependency. - uv_snapshot!(context.filters(), context.remove().arg("anyio").arg("--optional=io"), @r" + uv_snapshot!(context.filters(), context.remove().arg("anyio").arg("--optional=io"), @" success: true exit_code: 0 ----- stdout ----- @@ -1664,7 +1664,7 @@ fn add_remove_optional() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -1673,7 +1673,7 @@ fn add_remove_optional() -> Result<()> { [project.optional-dependencies] io = [] - "### + "# ); }); @@ -1703,7 +1703,7 @@ fn add_remove_optional() -> Result<()> { }); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -1731,7 +1731,7 @@ fn add_remove_inline_optional() -> Result<()> { ] } "#})?; - uv_snapshot!(context.filters(), context.add().arg("typing-extensions").arg("--optional=types"), @r" + uv_snapshot!(context.filters(), context.add().arg("typing-extensions").arg("--optional=types"), @" success: true exit_code: 0 ----- stdout ----- @@ -1749,7 +1749,7 @@ fn add_remove_inline_optional() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -1760,11 +1760,11 @@ fn add_remove_inline_optional() -> Result<()> { ], types = [ "typing-extensions>=4.10.0", ] } - "### + "# ); }); - uv_snapshot!(context.filters(), context.remove().arg("typing-extensions").arg("--optional=types"), @r" + uv_snapshot!(context.filters(), context.remove().arg("typing-extensions").arg("--optional=types"), @" success: true exit_code: 0 ----- stdout ----- @@ -1781,7 +1781,7 @@ fn add_remove_inline_optional() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -1790,7 +1790,7 @@ fn add_remove_inline_optional() -> Result<()> { optional-dependencies = { io = [ "anyio==3.7.0", ], types = [] } - "### + "# ); }); @@ -1856,14 +1856,14 @@ fn add_remove_workspace() -> Result<()> { .arg("child1") .current_dir(&context.temp_dir); - uv_snapshot!(context.filters(), add_cmd, @r###" + uv_snapshot!(context.filters(), add_cmd, @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: Workspace dependency `child2` must refer to local directory, not a Git repository - "###); + "); // Workspace packages should be detected automatically. let child1 = context.temp_dir.join("child1"); @@ -1874,7 +1874,7 @@ fn add_remove_workspace() -> Result<()> { .arg("child1") .current_dir(&context.temp_dir); - uv_snapshot!(context.filters(), add_cmd, @r" + uv_snapshot!(context.filters(), add_cmd, @" success: true exit_code: 0 ----- stdout ----- @@ -1953,7 +1953,7 @@ fn add_remove_workspace() -> Result<()> { }); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen").current_dir(&child1), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen").current_dir(&child1), @" success: true exit_code: 0 ----- stdout ----- @@ -1963,7 +1963,7 @@ fn add_remove_workspace() -> Result<()> { "); // Remove the dependency. - uv_snapshot!(context.filters(), context.remove().arg("child2").current_dir(&child1), @r###" + uv_snapshot!(context.filters(), context.remove().arg("child2").current_dir(&child1), @" success: true exit_code: 0 ----- stdout ----- @@ -1975,7 +1975,7 @@ fn add_remove_workspace() -> Result<()> { Installed 1 package in [TIME] ~ child1==0.1.0 (from file://[TEMP_DIR]/child1) - child2==0.1.0 (from file://[TEMP_DIR]/child2) - "###); + "); let pyproject_toml = fs_err::read_to_string(child1.join("pyproject.toml"))?; @@ -1983,7 +1983,7 @@ fn add_remove_workspace() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "child1" version = "0.1.0" @@ -1993,7 +1993,7 @@ fn add_remove_workspace() -> Result<()> { [build-system] requires = ["hatchling"] build-backend = "hatchling.build" - "### + "# ); }); @@ -2031,14 +2031,14 @@ fn add_remove_workspace() -> Result<()> { }); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen").current_dir(&child1), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen").current_dir(&child1), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Audited 1 package in [TIME] - "###); + "); Ok(()) } @@ -2064,7 +2064,7 @@ fn update_existing_dev() -> Result<()> { dev = [] "#})?; - uv_snapshot!(context.filters(), context.add().arg("anyio==3.7.0").arg("--dev"), @r" + uv_snapshot!(context.filters(), context.add().arg("anyio==3.7.0").arg("--dev"), @" success: true exit_code: 0 ----- stdout ----- @@ -2085,7 +2085,7 @@ fn update_existing_dev() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -2099,7 +2099,7 @@ fn update_existing_dev() -> Result<()> { [dependency-groups] dev = [] - "### + "# ); }); @@ -2124,7 +2124,7 @@ fn add_existing_dev() -> Result<()> { dev-dependencies = [] "#})?; - uv_snapshot!(context.filters(), context.add().arg("anyio==3.7.0").arg("--dev"), @r" + uv_snapshot!(context.filters(), context.add().arg("anyio==3.7.0").arg("--dev"), @" success: true exit_code: 0 ----- stdout ----- @@ -2145,7 +2145,7 @@ fn add_existing_dev() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -2156,7 +2156,7 @@ fn add_existing_dev() -> Result<()> { dev-dependencies = [ "anyio==3.7.0", ] - "### + "# ); }); @@ -2181,7 +2181,7 @@ fn update_existing_dev_group() -> Result<()> { dev-dependencies = ["anyio"] "#})?; - uv_snapshot!(context.filters(), context.add().arg("anyio==3.7.0").arg("--group").arg("dev"), @r" + uv_snapshot!(context.filters(), context.add().arg("anyio==3.7.0").arg("--group").arg("dev"), @" success: true exit_code: 0 ----- stdout ----- @@ -2202,7 +2202,7 @@ fn update_existing_dev_group() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -2213,7 +2213,7 @@ fn update_existing_dev_group() -> Result<()> { dev-dependencies = [ "anyio==3.7.0", ] - "### + "# ); }); @@ -2237,7 +2237,7 @@ fn add_existing_dev_group() -> Result<()> { dev-dependencies = [] "#})?; - uv_snapshot!(context.filters(), context.add().arg("anyio==3.7.0").arg("--group").arg("dev"), @r" + uv_snapshot!(context.filters(), context.add().arg("anyio==3.7.0").arg("--group").arg("dev"), @" success: true exit_code: 0 ----- stdout ----- @@ -2258,7 +2258,7 @@ fn add_existing_dev_group() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -2272,7 +2272,7 @@ fn add_existing_dev_group() -> Result<()> { dev = [ "anyio==3.7.0", ] - "### + "# ); }); @@ -2299,7 +2299,7 @@ fn remove_both_dev() -> Result<()> { dev = ["anyio>=3.7.0"] "#})?; - uv_snapshot!(context.filters(), context.remove().arg("anyio").arg("--dev"), @r" + uv_snapshot!(context.filters(), context.remove().arg("anyio").arg("--dev"), @" success: true exit_code: 0 ----- stdout ----- @@ -2316,7 +2316,7 @@ fn remove_both_dev() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -2328,7 +2328,7 @@ fn remove_both_dev() -> Result<()> { [dependency-groups] dev = [] - "### + "# ); }); @@ -2355,7 +2355,7 @@ fn disallow_group_script_add() -> Result<()> { .arg("dev") .arg("anyio==3.7.0") .arg("--script") - .arg("main.py"), @r###" + .arg("main.py"), @" success: false exit_code: 2 ----- stdout ----- @@ -2366,7 +2366,7 @@ fn disallow_group_script_add() -> Result<()> { Usage: uv add --cache-dir [CACHE_DIR] --group --exclude-newer > For more information, try '--help'. - "###); + "); Ok(()) } @@ -2391,7 +2391,7 @@ fn remove_both_dev_group() -> Result<()> { dev = ["anyio>=3.7.0"] "#})?; - uv_snapshot!(context.filters(), context.remove().arg("anyio").arg("--group").arg("dev"), @r" + uv_snapshot!(context.filters(), context.remove().arg("anyio").arg("--group").arg("dev"), @" success: true exit_code: 0 ----- stdout ----- @@ -2408,7 +2408,7 @@ fn remove_both_dev_group() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -2420,7 +2420,7 @@ fn remove_both_dev_group() -> Result<()> { [dependency-groups] dev = [] - "### + "# ); }); @@ -2493,7 +2493,7 @@ fn add_workspace_editable() -> Result<()> { .arg("--no-editable") .current_dir(&child1); - uv_snapshot!(context.filters(), add_cmd, @r" + uv_snapshot!(context.filters(), add_cmd, @" success: true exit_code: 0 ----- stdout ----- @@ -2535,7 +2535,7 @@ fn add_workspace_editable() -> Result<()> { let mut add_cmd = context.add(); add_cmd.arg("child2").arg("--editable").current_dir(&child1); - uv_snapshot!(context.filters(), add_cmd, @r" + uv_snapshot!(context.filters(), add_cmd, @" success: true exit_code: 0 ----- stdout ----- @@ -2621,7 +2621,7 @@ fn add_workspace_editable() -> Result<()> { }); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen").current_dir(&child1), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen").current_dir(&child1), @" success: true exit_code: 0 ----- stdout ----- @@ -2670,7 +2670,7 @@ fn add_workspace_path() -> Result<()> { .child("__init__.py") .touch()?; - uv_snapshot!(context.filters(), context.add().arg("./child"), @r" + uv_snapshot!(context.filters(), context.add().arg("./child"), @" success: true exit_code: 0 ----- stdout ----- @@ -2688,7 +2688,7 @@ fn add_workspace_path() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "parent" version = "0.1.0" @@ -2702,7 +2702,7 @@ fn add_workspace_path() -> Result<()> { [tool.uv.sources] child = { workspace = true } - "### + "# ); }); @@ -2747,7 +2747,7 @@ fn add_workspace_path() -> Result<()> { }); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -2793,7 +2793,7 @@ fn add_path_implicit_workspace() -> Result<()> { .child("__init__.py") .touch()?; - uv_snapshot!(context.filters(), context.add().arg(Path::new("packages").join("child")).current_dir(workspace.path()), @r" + uv_snapshot!(context.filters(), context.add().arg(Path::new("packages").join("child")).current_dir(workspace.path()), @" success: true exit_code: 0 ----- stdout ----- @@ -2875,7 +2875,7 @@ fn add_path_implicit_workspace() -> Result<()> { }); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen").current_dir(workspace.path()), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen").current_dir(workspace.path()), @" success: true exit_code: 0 ----- stdout ----- @@ -2921,7 +2921,7 @@ fn add_path_no_workspace() -> Result<()> { .child("__init__.py") .touch()?; - uv_snapshot!(context.filters(), context.add().arg(Path::new("packages").join("child")).current_dir(workspace.path()).arg("--no-workspace"), @r" + uv_snapshot!(context.filters(), context.add().arg(Path::new("packages").join("child")).current_dir(workspace.path()).arg("--no-workspace"), @" success: true exit_code: 0 ----- stdout ----- @@ -2991,7 +2991,7 @@ fn add_path_no_workspace() -> Result<()> { }); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen").current_dir(workspace.path()), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen").current_dir(workspace.path()), @" success: true exit_code: 0 ----- stdout ----- @@ -3035,7 +3035,7 @@ fn add_path_adjacent_directory() -> Result<()> { .child("__init__.py") .touch()?; - uv_snapshot!(context.filters(), context.add().arg(dependency.path()).current_dir(project.path()), @r" + uv_snapshot!(context.filters(), context.add().arg(dependency.path()).current_dir(project.path()), @" success: true exit_code: 0 ----- stdout ----- @@ -3122,16 +3122,16 @@ fn update() -> Result<()> { dependencies = ["requests==2.31.0"] "#})?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 6 packages in [TIME] - "###); + "); - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -3147,7 +3147,7 @@ fn update() -> Result<()> { "); // Enable an extra (note the version specifier should be preserved). - uv_snapshot!(context.filters(), context.add().arg("requests[security]"), @r" + uv_snapshot!(context.filters(), context.add().arg("requests[security]"), @" success: true exit_code: 0 ----- stdout ----- @@ -3163,7 +3163,7 @@ fn update() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -3171,12 +3171,12 @@ fn update() -> Result<()> { dependencies = [ "requests[security]==2.31.0", ] - "### + "# ); }); // Enable extras using the CLI flag and add a marker. - uv_snapshot!(context.filters(), context.add().arg("requests; python_version > '3.7'").args(["--extra=use_chardet_on_py3", "--extra=socks"]), @r" + uv_snapshot!(context.filters(), context.add().arg("requests; python_version > '3.7'").args(["--extra=use_chardet_on_py3", "--extra=socks"]), @" success: true exit_code: 0 ----- stdout ----- @@ -3195,7 +3195,7 @@ fn update() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -3204,13 +3204,13 @@ fn update() -> Result<()> { "requests[security]==2.31.0", "requests[socks,use-chardet-on-py3]>=2.31.0 ; python_full_version >= '3.8'", ] - "### + "# ); }); // Change the source by specifying a version (note the extras, markers, and version should be // preserved). - uv_snapshot!(context.filters(), context.add().arg("requests @ git+https://github.com/psf/requests").arg("--tag=v2.32.3"), @r" + uv_snapshot!(context.filters(), context.add().arg("requests @ git+https://github.com/psf/requests").arg("--tag=v2.32.3"), @" success: true exit_code: 0 ----- stdout ----- @@ -3230,7 +3230,7 @@ fn update() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -3242,7 +3242,7 @@ fn update() -> Result<()> { [tool.uv.sources] requests = { git = "https://github.com/psf/requests", tag = "v2.32.3" } - "### + "# ); }); @@ -3366,7 +3366,7 @@ fn update() -> Result<()> { }); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -3391,16 +3391,16 @@ fn add_update_marker() -> Result<()> { requires-python = ">=3.8" dependencies = ["requests>=2.30; python_version >= '3.11'"] "#})?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 6 packages in [TIME] - "###); + "); - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -3416,7 +3416,7 @@ fn add_update_marker() -> Result<()> { "); // Restrict the `requests` version for Python <3.11 - uv_snapshot!(context.filters(), context.add().arg("requests>=2.0,<2.29; python_version < '3.11'"), @r" + uv_snapshot!(context.filters(), context.add().arg("requests>=2.0,<2.29; python_version < '3.11'"), @" success: true exit_code: 0 ----- stdout ----- @@ -3433,7 +3433,7 @@ fn add_update_marker() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -3442,12 +3442,12 @@ fn add_update_marker() -> Result<()> { "requests>=2.0,<2.29 ; python_full_version < '3.11'", "requests>=2.30; python_version >= '3.11'", ] - "### + "# ); }); // Change the restricted `requests` version for Python <3.11 - uv_snapshot!(context.filters(), context.add().arg("requests>=2.0,<2.20; python_version < '3.11'"), @r" + uv_snapshot!(context.filters(), context.add().arg("requests>=2.0,<2.20; python_version < '3.11'"), @" success: true exit_code: 0 ----- stdout ----- @@ -3464,7 +3464,7 @@ fn add_update_marker() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -3473,12 +3473,12 @@ fn add_update_marker() -> Result<()> { "requests>=2.0,<2.20 ; python_full_version < '3.11'", "requests>=2.30; python_version >= '3.11'", ] - "### + "# ); }); // Restrict the `requests` version on Windows and Python >3.11 - uv_snapshot!(context.filters(), context.add().arg("requests>=2.31 ; sys_platform == 'win32' and python_version > '3.11'"), @r" + uv_snapshot!(context.filters(), context.add().arg("requests>=2.31 ; sys_platform == 'win32' and python_version > '3.11'"), @" success: true exit_code: 0 ----- stdout ----- @@ -3495,7 +3495,7 @@ fn add_update_marker() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -3505,12 +3505,12 @@ fn add_update_marker() -> Result<()> { "requests>=2.30; python_version >= '3.11'", "requests>=2.31 ; python_full_version >= '3.12' and sys_platform == 'win32'", ] - "### + "# ); }); // Restrict the `requests` version on Windows - uv_snapshot!(context.filters(), context.add().arg("requests>=2.10 ; sys_platform == 'win32'"), @r" + uv_snapshot!(context.filters(), context.add().arg("requests>=2.10 ; sys_platform == 'win32'"), @" success: true exit_code: 0 ----- stdout ----- @@ -3528,7 +3528,7 @@ fn add_update_marker() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -3539,12 +3539,12 @@ fn add_update_marker() -> Result<()> { "requests>=2.30; python_version >= '3.11'", "requests>=2.31 ; python_full_version >= '3.12' and sys_platform == 'win32'", ] - "### + "# ); }); // Remove `requests` - uv_snapshot!(context.filters(), context.remove().arg("requests"), @r" + uv_snapshot!(context.filters(), context.remove().arg("requests"), @" success: true exit_code: 0 ----- stdout ----- @@ -3566,13 +3566,13 @@ fn add_update_marker() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" requires-python = ">=3.8" dependencies = [] - "### + "# ); }); @@ -3596,7 +3596,7 @@ fn update_source_replace_url() -> Result<()> { "#})?; // Change the source. The existing URL should be removed. - uv_snapshot!(context.filters(), context.add().arg("requests @ git+https://github.com/psf/requests").arg("--tag=v2.32.3"), @r" + uv_snapshot!(context.filters(), context.add().arg("requests @ git+https://github.com/psf/requests").arg("--tag=v2.32.3"), @" success: true exit_code: 0 ----- stdout ----- @@ -3618,7 +3618,7 @@ fn update_source_replace_url() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -3629,12 +3629,12 @@ fn update_source_replace_url() -> Result<()> { [tool.uv.sources] requests = { git = "https://github.com/psf/requests", tag = "v2.32.3" } - "### + "# ); }); // Change the source again. The existing source should be replaced. - uv_snapshot!(context.filters(), context.add().arg("requests @ git+https://github.com/psf/requests").arg("--tag=v2.32.2"), @r" + uv_snapshot!(context.filters(), context.add().arg("requests @ git+https://github.com/psf/requests").arg("--tag=v2.32.2"), @" success: true exit_code: 0 ----- stdout ----- @@ -3654,7 +3654,7 @@ fn update_source_replace_url() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -3665,7 +3665,7 @@ fn update_source_replace_url() -> Result<()> { [tool.uv.sources] requests = { git = "https://github.com/psf/requests", tag = "v2.32.2" } - "### + "# ); }); @@ -3693,7 +3693,7 @@ fn add_non_normalized_source() -> Result<()> { uv_public_pypackage = { git = "https://github.com/astral-test/uv-public-pypackage", tag = "0.0.1" } "#})?; - uv_snapshot!(context.filters(), context.add().arg("uv-public-pypackage @ git+https://github.com/astral-test/uv-public-pypackage@0.0.1"), @r" + uv_snapshot!(context.filters(), context.add().arg("uv-public-pypackage @ git+https://github.com/astral-test/uv-public-pypackage@0.0.1"), @" success: true exit_code: 0 ----- stdout ----- @@ -3711,7 +3711,7 @@ fn add_non_normalized_source() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -3722,7 +3722,7 @@ fn add_non_normalized_source() -> Result<()> { [tool.uv.sources] uv-public-pypackage = { git = "https://github.com/astral-test/uv-public-pypackage", rev = "0.0.1" } - "### + "# ); }); @@ -3745,7 +3745,7 @@ fn add_update_git_reference_project() -> Result<()> { dependencies = [] "#})?; - uv_snapshot!(context.filters(), context.add().arg("https://github.com/astral-test/uv-public-pypackage.git"), @r" + uv_snapshot!(context.filters(), context.add().arg("https://github.com/astral-test/uv-public-pypackage.git"), @" success: true exit_code: 0 ----- stdout ----- @@ -3757,7 +3757,7 @@ fn add_update_git_reference_project() -> Result<()> { + uv-public-pypackage==0.1.0 (from git+https://github.com/astral-test/uv-public-pypackage.git@b270df1a2fb5d012294e9aaf05e7e0bab1e6a389) "); - uv_snapshot!(context.filters(), context.add().arg("uv-public-pypackage").arg("--tag=0.0.1"), @r" + uv_snapshot!(context.filters(), context.add().arg("uv-public-pypackage").arg("--tag=0.0.1"), @" success: true exit_code: 0 ----- stdout ----- @@ -3771,7 +3771,7 @@ fn add_update_git_reference_project() -> Result<()> { + uv-public-pypackage==0.1.0 (from git+https://github.com/astral-test/uv-public-pypackage.git@0dacfd662c64cb4ceb16e6cf65a157a8b715b979) "); - uv_snapshot!(context.filters(), context.add().arg("uv-public-pypackage").arg("--branch=main"), @r" + uv_snapshot!(context.filters(), context.add().arg("uv-public-pypackage").arg("--branch=main"), @" success: true exit_code: 0 ----- stdout ----- @@ -3784,7 +3784,7 @@ fn add_update_git_reference_project() -> Result<()> { + uv-public-pypackage==0.1.0 (from git+https://github.com/astral-test/uv-public-pypackage.git@b270df1a2fb5d012294e9aaf05e7e0bab1e6a389) "); - uv_snapshot!(context.filters(), context.add().arg("uv-public-pypackage").arg("--rev=2005223fcad0e2c06daf2e14b93b790604868e1e"), @r" + uv_snapshot!(context.filters(), context.add().arg("uv-public-pypackage").arg("--rev=2005223fcad0e2c06daf2e14b93b790604868e1e"), @" success: true exit_code: 0 ----- stdout ----- @@ -3821,7 +3821,7 @@ fn add_update_git_reference_script() -> Result<()> { })?; uv_snapshot!(context.filters(), context.add().arg("--script=script.py").arg("https://github.com/astral-test/uv-public-pypackage.git"), - @r" + @" success: true exit_code: 0 ----- stdout ----- @@ -3836,7 +3836,7 @@ fn add_update_git_reference_script() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - script_content, @r##" + script_content, @r#" # /// script # requires-python = ">=3.11" # dependencies = [ @@ -3849,12 +3849,12 @@ fn add_update_git_reference_script() -> Result<()> { import time time.sleep(5) - "## + "# ); }); uv_snapshot!(context.filters(), context.add().arg("--script=script.py").arg("uv-public-pypackage").arg("--branch=test-branch"), - @r" + @" success: true exit_code: 0 ----- stdout ----- @@ -3869,7 +3869,7 @@ fn add_update_git_reference_script() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - script_content, @r##" + script_content, @r#" # /// script # requires-python = ">=3.11" # dependencies = [ @@ -3882,7 +3882,7 @@ fn add_update_git_reference_script() -> Result<()> { import time time.sleep(5) - "## + "# ); }); @@ -3910,7 +3910,7 @@ fn remove_non_normalized_source() -> Result<()> { uv_public_pypackage = { git = "https://github.com/astral-test/uv-public-pypackage", tag = "0.0.1" } "#})?; - uv_snapshot!(context.filters(), context.remove().arg("uv-public-pypackage"), @r" + uv_snapshot!(context.filters(), context.remove().arg("uv-public-pypackage"), @" success: true exit_code: 0 ----- stdout ----- @@ -3926,13 +3926,13 @@ fn remove_non_normalized_source() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" requires-python = ">=3.12" dependencies = [] - "### + "# ); }); @@ -3953,16 +3953,16 @@ fn add_inexact() -> Result<()> { dependencies = ["anyio == 3.7.0"] "#})?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -3984,7 +3984,7 @@ fn add_inexact() -> Result<()> { dependencies = [] "#})?; - uv_snapshot!(context.filters(), context.add().arg("iniconfig==2.0.0"), @r" + uv_snapshot!(context.filters(), context.add().arg("iniconfig==2.0.0"), @" success: true exit_code: 0 ----- stdout ----- @@ -4002,7 +4002,7 @@ fn add_inexact() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -4010,7 +4010,7 @@ fn add_inexact() -> Result<()> { dependencies = [ "iniconfig==2.0.0", ] - "### + "# ); }); @@ -4052,7 +4052,7 @@ fn add_inexact() -> Result<()> { }); // Install from the lockfile without removing extraneous packages from the environment. - uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--inexact"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--inexact"), @" success: true exit_code: 0 ----- stdout ----- @@ -4062,7 +4062,7 @@ fn add_inexact() -> Result<()> { "); // Install from the lockfile, performing an exact sync. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -4072,7 +4072,7 @@ fn add_inexact() -> Result<()> { - anyio==3.7.0 - idna==3.6 - sniffio==1.3.1 - "###); + "); Ok(()) } @@ -4091,16 +4091,16 @@ fn remove_registry() -> Result<()> { dependencies = ["anyio==3.7.0"] "#})?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -4113,7 +4113,7 @@ fn remove_registry() -> Result<()> { + sniffio==1.3.1 "); - uv_snapshot!(context.filters(), context.remove().arg("anyio"), @r" + uv_snapshot!(context.filters(), context.remove().arg("anyio"), @" success: true exit_code: 0 ----- stdout ----- @@ -4132,13 +4132,13 @@ fn remove_registry() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" requires-python = ">=3.12" dependencies = [] - "### + "# ); }); @@ -4165,7 +4165,7 @@ fn remove_registry() -> Result<()> { }); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -4190,7 +4190,7 @@ fn add_preserves_indentation_in_pyproject_toml() -> Result<()> { dependencies = ["anyio==3.7.0"] "#})?; - uv_snapshot!(context.filters(), context.add().arg("requests==2.31.0"), @r" + uv_snapshot!(context.filters(), context.add().arg("requests==2.31.0"), @" success: true exit_code: 0 ----- stdout ----- @@ -4214,7 +4214,7 @@ fn add_preserves_indentation_in_pyproject_toml() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -4223,7 +4223,7 @@ fn add_preserves_indentation_in_pyproject_toml() -> Result<()> { "anyio==3.7.0", "requests==2.31.0", ] - "### + "# ); }); Ok(()) @@ -4242,7 +4242,7 @@ fn add_puts_default_indentation_in_pyproject_toml_if_not_observed() -> Result<() dependencies = ["anyio==3.7.0"] "#})?; - uv_snapshot!(context.filters(), context.add().arg("requests==2.31.0"), @r" + uv_snapshot!(context.filters(), context.add().arg("requests==2.31.0"), @" success: true exit_code: 0 ----- stdout ----- @@ -4266,7 +4266,7 @@ fn add_puts_default_indentation_in_pyproject_toml_if_not_observed() -> Result<() filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -4275,7 +4275,7 @@ fn add_puts_default_indentation_in_pyproject_toml_if_not_observed() -> Result<() "anyio==3.7.0", "requests==2.31.0", ] - "### + "# ); }); Ok(()) @@ -4298,14 +4298,14 @@ fn add_frozen() -> Result<()> { dependencies = [] "#})?; - uv_snapshot!(context.filters(), context.add().arg("anyio==3.7.0").arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.add().arg("anyio==3.7.0").arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Using CPython 3.12.[X] interpreter at: [PYTHON-3.12] - "###); + "); let pyproject_toml = context.read("pyproject.toml"); @@ -4313,7 +4313,7 @@ fn add_frozen() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -4321,7 +4321,7 @@ fn add_frozen() -> Result<()> { dependencies = [ "anyio==3.7.0", ] - "### + "# ); }); @@ -4348,7 +4348,7 @@ fn add_no_sync() -> Result<()> { dependencies = [] "#})?; - uv_snapshot!(context.filters(), context.add().arg("anyio==3.7.0").arg("--no-sync"), @r###" + uv_snapshot!(context.filters(), context.add().arg("anyio==3.7.0").arg("--no-sync"), @" success: true exit_code: 0 ----- stdout ----- @@ -4356,7 +4356,7 @@ fn add_no_sync() -> Result<()> { ----- stderr ----- Using CPython 3.12.[X] interpreter at: [PYTHON-3.12] Resolved 4 packages in [TIME] - "###); + "); let pyproject_toml = context.read("pyproject.toml"); @@ -4364,7 +4364,7 @@ fn add_no_sync() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -4372,7 +4372,7 @@ fn add_no_sync() -> Result<()> { dependencies = [ "anyio==3.7.0", ] - "### + "# ); }); @@ -4393,7 +4393,7 @@ fn add_reject_multiple_git_ref_flags() { .arg("--tag") .arg("0.0.1") .arg("--branch") - .arg("test"), @r###" + .arg("test"), @" success: false exit_code: 2 ----- stdout ----- @@ -4404,7 +4404,7 @@ fn add_reject_multiple_git_ref_flags() { Usage: uv add --cache-dir [CACHE_DIR] --tag --exclude-newer > For more information, try '--help'. - "### + " ); // --tag and --rev @@ -4414,7 +4414,7 @@ fn add_reject_multiple_git_ref_flags() { .arg("--tag") .arg("0.0.1") .arg("--rev") - .arg("326b943"), @r###" + .arg("326b943"), @" success: false exit_code: 2 ----- stdout ----- @@ -4425,7 +4425,7 @@ fn add_reject_multiple_git_ref_flags() { Usage: uv add --cache-dir [CACHE_DIR] --tag --exclude-newer > For more information, try '--help'. - "### + " ); // --tag and --tag @@ -4435,7 +4435,7 @@ fn add_reject_multiple_git_ref_flags() { .arg("--tag") .arg("0.0.1") .arg("--tag") - .arg("0.0.2"), @r###" + .arg("0.0.2"), @" success: false exit_code: 2 ----- stdout ----- @@ -4446,7 +4446,7 @@ fn add_reject_multiple_git_ref_flags() { Usage: uv add [OPTIONS] > For more information, try '--help'. - "### + " ); } @@ -4464,7 +4464,7 @@ fn add_error() -> Result<()> { dependencies = [] "#})?; - uv_snapshot!(context.filters(), context.add().arg("xyz"), @r###" + uv_snapshot!(context.filters(), context.add().arg("xyz"), @" success: false exit_code: 1 ----- stdout ----- @@ -4473,15 +4473,15 @@ fn add_error() -> Result<()> { × No solution found when resolving dependencies: ╰─▶ Because there are no versions of xyz and your project depends on xyz, we can conclude that your project's requirements are unsatisfiable. help: If you want to add the package regardless of the failed resolution, provide the `--frozen` flag to skip locking and syncing. - "###); + "); - uv_snapshot!(context.filters(), context.add().arg("xyz").arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.add().arg("xyz").arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- - "###); + "); let lock = context.temp_dir.join("uv.lock"); assert!(!lock.exists()); @@ -4512,7 +4512,7 @@ fn add_environment_yml_error() -> Result<()> { - python>=3.12 "})?; - uv_snapshot!(context.filters(), context.add().arg("-r").arg("environment.yml"), @r" + uv_snapshot!(context.filters(), context.add().arg("-r").arg("environment.yml"), @" success: false exit_code: 2 ----- stdout ----- @@ -4539,7 +4539,7 @@ fn add_lower_bound() -> Result<()> { "#})?; // Adding `anyio` should include a lower-bound. - uv_snapshot!(context.filters(), context.add().arg("anyio"), @r" + uv_snapshot!(context.filters(), context.add().arg("anyio"), @" success: true exit_code: 0 ----- stdout ----- @@ -4559,7 +4559,7 @@ fn add_lower_bound() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -4567,7 +4567,7 @@ fn add_lower_bound() -> Result<()> { dependencies = [ "anyio>=4.3.0", ] - "### + "# ); }); @@ -4590,7 +4590,7 @@ fn add_lower_bound_existing() -> Result<()> { // Adding `anyio` should _not_ set a lower-bound, since it's already present (even if // unconstrained). - uv_snapshot!(context.filters(), context.add().arg("anyio"), @r" + uv_snapshot!(context.filters(), context.add().arg("anyio"), @" success: true exit_code: 0 ----- stdout ----- @@ -4610,7 +4610,7 @@ fn add_lower_bound_existing() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -4618,7 +4618,7 @@ fn add_lower_bound_existing() -> Result<()> { dependencies = [ "anyio", ] - "### + "# ); }); @@ -4640,7 +4640,7 @@ fn add_lower_bound_raw() -> Result<()> { "#})?; // Adding `anyio` should _not_ set a lower-bound when using `--raw`. - uv_snapshot!(context.filters(), context.add().arg("anyio").arg("--raw"), @r" + uv_snapshot!(context.filters(), context.add().arg("anyio").arg("--raw"), @" success: true exit_code: 0 ----- stdout ----- @@ -4660,7 +4660,7 @@ fn add_lower_bound_raw() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -4668,7 +4668,7 @@ fn add_lower_bound_raw() -> Result<()> { dependencies = [ "anyio", ] - "### + "# ); }); @@ -4690,7 +4690,7 @@ fn add_lower_bound_dev() -> Result<()> { "#})?; // Adding `anyio` should include a lower-bound. - uv_snapshot!(context.filters(), context.add().arg("anyio").arg("--dev"), @r" + uv_snapshot!(context.filters(), context.add().arg("anyio").arg("--dev"), @" success: true exit_code: 0 ----- stdout ----- @@ -4710,7 +4710,7 @@ fn add_lower_bound_dev() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -4721,7 +4721,7 @@ fn add_lower_bound_dev() -> Result<()> { dev = [ "anyio>=4.3.0", ] - "### + "# ); }); @@ -4743,7 +4743,7 @@ fn add_lower_bound_optional() -> Result<()> { "#})?; // Adding `anyio` should include a lower-bound. - uv_snapshot!(context.filters(), context.add().arg("anyio").arg("--optional=io"), @r" + uv_snapshot!(context.filters(), context.add().arg("anyio").arg("--optional=io"), @" success: true exit_code: 0 ----- stdout ----- @@ -4763,7 +4763,7 @@ fn add_lower_bound_optional() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -4774,7 +4774,7 @@ fn add_lower_bound_optional() -> Result<()> { io = [ "anyio>=4.3.0", ] - "### + "# ); }); @@ -4858,7 +4858,7 @@ fn add_lower_bound_local() -> Result<()> { "#})?; // Adding `torch` should include a lower-bound, but no local segment. - uv_snapshot!(context.filters(), context.add().arg("local-simple-a").arg("--index").arg(packse_index_url()).env_remove(EnvVars::UV_EXCLUDE_NEWER), @r" + uv_snapshot!(context.filters(), context.add().arg("local-simple-a").arg("--index").arg(packse_index_url()).env_remove(EnvVars::UV_EXCLUDE_NEWER), @" success: true exit_code: 0 ----- stdout ----- @@ -4876,7 +4876,7 @@ fn add_lower_bound_local() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -4887,7 +4887,7 @@ fn add_lower_bound_local() -> Result<()> { [[tool.uv.index]] url = "https://astral-sh.github.io/packse/PACKSE_VERSION/simple-html/" - "### + "# ); }); @@ -4941,28 +4941,28 @@ fn add_non_project() -> Result<()> { // Adding `iniconfig` should fail, since virtual workspace roots don't support production // dependencies. - uv_snapshot!(context.filters(), context.add().arg("iniconfig"), @r###" + uv_snapshot!(context.filters(), context.add().arg("iniconfig"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: Project is missing a `[project]` table; add a `[project]` table to use production dependencies, or run `uv add --dev` instead - "###); + "); // Adding `iniconfig` as optional should fail, since virtual workspace roots don't support // optional dependencies. - uv_snapshot!(context.filters(), context.add().arg("iniconfig").arg("--optional").arg("async"), @r###" + uv_snapshot!(context.filters(), context.add().arg("iniconfig").arg("--optional").arg("async"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: Project is missing a `[project]` table; add a `[project]` table to use optional dependencies, or run `uv add --dev` instead - "###); + "); // Adding `iniconfig` as a dev dependency should succeed. - uv_snapshot!(context.filters(), context.add().arg("iniconfig").arg("--dev"), @r###" + uv_snapshot!(context.filters(), context.add().arg("iniconfig").arg("--dev"), @" success: true exit_code: 0 ----- stdout ----- @@ -4973,7 +4973,7 @@ fn add_non_project() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + iniconfig==2.0.0 - "###); + "); let pyproject_toml = context.read("pyproject.toml"); @@ -4981,7 +4981,7 @@ fn add_non_project() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [tool.uv.workspace] members = [] @@ -4989,7 +4989,7 @@ fn add_non_project() -> Result<()> { dev = [ "iniconfig>=2.0.0", ] - "### + "# ); }); @@ -5040,7 +5040,7 @@ fn add_virtual_empty() -> Result<()> { // Add normal dep (doesn't make sense) uv_snapshot!(context.filters(), context.add() - .arg("sortedcontainers"), @r" + .arg("sortedcontainers"), @" success: false exit_code: 2 ----- stdout ----- @@ -5065,7 +5065,7 @@ fn add_virtual_empty() -> Result<()> { // Add dependency-group (can make sense!) uv_snapshot!(context.filters(), context.add() .arg("sortedcontainers") - .arg("--group").arg("dev"), @r" + .arg("--group").arg("dev"), @" success: true exit_code: 0 ----- stdout ----- @@ -5116,7 +5116,7 @@ fn add_virtual_dependency_group() -> Result<()> { // Add to existing group uv_snapshot!(context.filters(), context.add() .arg("sortedcontainers") - .arg("--group").arg("dev"), @r" + .arg("--group").arg("dev"), @" success: true exit_code: 0 ----- stdout ----- @@ -5151,7 +5151,7 @@ fn add_virtual_dependency_group() -> Result<()> { // Add to new group uv_snapshot!(context.filters(), context.add() .arg("sortedcontainers") - .arg("--group").arg("baz"), @r" + .arg("--group").arg("baz"), @" success: true exit_code: 0 ----- stdout ----- @@ -5206,7 +5206,7 @@ fn add_empty_requirements_group() -> Result<()> { uv_snapshot!(context.filters(), context.add() .arg("-r").arg("requirements.txt") - .arg("--group").arg("user"), @r" + .arg("--group").arg("user"), @" success: true exit_code: 0 ----- stdout ----- @@ -5223,7 +5223,7 @@ fn add_empty_requirements_group() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -5232,7 +5232,7 @@ fn add_empty_requirements_group() -> Result<()> { [dependency-groups] user = [] - "### + "# ); }); @@ -5259,7 +5259,7 @@ fn add_empty_requirements_optional() -> Result<()> { uv_snapshot!(context.filters(), context.add() .arg("-r").arg("requirements.txt") - .arg("--optional").arg("extra"), @r" + .arg("--optional").arg("extra"), @" success: true exit_code: 0 ----- stdout ----- @@ -5276,7 +5276,7 @@ fn add_empty_requirements_optional() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -5285,7 +5285,7 @@ fn add_empty_requirements_optional() -> Result<()> { [project.optional-dependencies] extra = [] - "### + "# ); }); @@ -5308,7 +5308,7 @@ fn remove_virtual_empty() -> Result<()> { // Remove normal dep (doesn't make sense) uv_snapshot!(context.filters(), context.remove() - .arg("sortedcontainers"), @r" + .arg("sortedcontainers"), @" success: false exit_code: 2 ----- stdout ----- @@ -5324,6 +5324,7 @@ fn remove_virtual_empty() -> Result<()> { }, { assert_snapshot!( pyproject_toml, @r#" + [tool.mycooltool] wow = "someconfig" "# @@ -5333,7 +5334,7 @@ fn remove_virtual_empty() -> Result<()> { // Remove dependency-group (can make sense, but nothing there!) uv_snapshot!(context.filters(), context.remove() .arg("sortedcontainers") - .arg("--group").arg("dev"), @r" + .arg("--group").arg("dev"), @" success: false exit_code: 2 ----- stdout ----- @@ -5349,6 +5350,7 @@ fn remove_virtual_empty() -> Result<()> { }, { assert_snapshot!( pyproject_toml, @r#" + [tool.mycooltool] wow = "someconfig" "# @@ -5375,7 +5377,7 @@ fn remove_virtual_dependency_group() -> Result<()> { // Remove from group uv_snapshot!(context.filters(), context.remove() .arg("sortedcontainers") - .arg("--group").arg("foo"), @r" + .arg("--group").arg("foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -5406,7 +5408,7 @@ fn remove_virtual_dependency_group() -> Result<()> { // Remove from non-existent group uv_snapshot!(context.filters(), context.remove() .arg("sortedcontainers") - .arg("--group").arg("baz"), @r" + .arg("--group").arg("baz"), @" success: false exit_code: 2 ----- stdout ----- @@ -5447,7 +5449,7 @@ fn add_repeat() -> Result<()> { dependencies = [] "#})?; - uv_snapshot!(context.filters(), context.add().arg("anyio"), @r" + uv_snapshot!(context.filters(), context.add().arg("anyio"), @" success: true exit_code: 0 ----- stdout ----- @@ -5467,7 +5469,7 @@ fn add_repeat() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -5475,11 +5477,11 @@ fn add_repeat() -> Result<()> { dependencies = [ "anyio>=4.3.0", ] - "### + "# ); }); - uv_snapshot!(context.filters(), context.add().arg("anyio"), @r" + uv_snapshot!(context.filters(), context.add().arg("anyio"), @" success: true exit_code: 0 ----- stdout ----- @@ -5495,7 +5497,7 @@ fn add_repeat() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -5503,7 +5505,7 @@ fn add_repeat() -> Result<()> { dependencies = [ "anyio>=4.3.0", ] - "### + "# ); }); @@ -5529,7 +5531,7 @@ fn add_requirements_file() -> Result<()> { requirements_txt .write_str("Flask==2.3.2\nanyio @ git+https://github.com/agronholm/anyio.git@4.4.0")?; - uv_snapshot!(context.filters(), context.add().arg("-r").arg("requirements.txt"), @r" + uv_snapshot!(context.filters(), context.add().arg("-r").arg("requirements.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -5556,7 +5558,7 @@ fn add_requirements_file() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -5568,12 +5570,12 @@ fn add_requirements_file() -> Result<()> { [tool.uv.sources] anyio = { git = "https://github.com/agronholm/anyio.git", rev = "4.4.0" } - "### + "# ); }); // Passing stdin should succeed - uv_snapshot!(context.filters(), context.add().arg("-r").arg("-").stdin(std::fs::File::open(requirements_txt)?), @r###" + uv_snapshot!(context.filters(), context.add().arg("-r").arg("-").stdin(std::fs::File::open(requirements_txt)?), @" success: true exit_code: 0 ----- stdout ----- @@ -5581,20 +5583,20 @@ fn add_requirements_file() -> Result<()> { ----- stderr ----- Resolved [N] packages in [TIME] Audited [N] packages in [TIME] - "###); + "); // Passing a `setup.py` should fail. - uv_snapshot!(context.filters(), context.add().arg("-r").arg("setup.py"), @r###" + uv_snapshot!(context.filters(), context.add().arg("-r").arg("setup.py"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: Adding requirements from a `setup.py` is not supported in `uv add` - "###); + "); // Passing nothing should fail. - uv_snapshot!(context.filters(), context.add(), @r###" + uv_snapshot!(context.filters(), context.add(), @" success: false exit_code: 2 ----- stdout ----- @@ -5606,7 +5608,7 @@ fn add_requirements_file() -> Result<()> { Usage: uv add --cache-dir [CACHE_DIR] --exclude-newer > For more information, try '--help'. - "###); + "); Ok(()) } @@ -5647,7 +5649,7 @@ fn add_requirements_file_non_editable() -> Result<()> { let requirements_txt = context.temp_dir.child("requirements.txt"); requirements_txt.write_str("./packages/child")?; - uv_snapshot!(context.filters(), context.add().arg("-r").arg("requirements.txt").arg("--no-workspace"), @r" + uv_snapshot!(context.filters(), context.add().arg("-r").arg("requirements.txt").arg("--no-workspace"), @" success: true exit_code: 0 ----- stdout ----- @@ -5719,7 +5721,7 @@ fn add_requirements_file_editable() -> Result<()> { let requirements_txt = context.temp_dir.child("requirements.txt"); requirements_txt.write_str("-e ./packages/child")?; - uv_snapshot!(context.filters(), context.add().arg("-r").arg("requirements.txt").arg("--no-workspace"), @r" + uv_snapshot!(context.filters(), context.add().arg("-r").arg("requirements.txt").arg("--no-workspace"), @" success: true exit_code: 0 ----- stdout ----- @@ -5792,7 +5794,7 @@ fn add_requirements_file_editable_override() -> Result<()> { let requirements_txt = context.temp_dir.child("requirements.txt"); requirements_txt.write_str("-e ./packages/child")?; - uv_snapshot!(context.filters(), context.add().arg("-r").arg("requirements.txt").arg("--no-workspace").arg("--no-editable"), @r" + uv_snapshot!(context.filters(), context.add().arg("-r").arg("requirements.txt").arg("--no-workspace").arg("--no-editable"), @" success: true exit_code: 0 ----- stdout ----- @@ -5852,7 +5854,7 @@ fn add_requirements_file_with_marker_flag() -> Result<()> { pyproject_toml.write_str(base_pyproject_toml)?; // Add dependencies with a marker that does not apply for the current target. - uv_snapshot!(context.filters(), context.add().arg("-r").arg("requirements.win.txt").arg("-m").arg("python_version == '3.11'"), @r" + uv_snapshot!(context.filters(), context.add().arg("-r").arg("requirements.win.txt").arg("-m").arg("python_version == '3.11'"), @" success: true exit_code: 0 ----- stdout ----- @@ -5884,7 +5886,7 @@ fn add_requirements_file_with_marker_flag() -> Result<()> { fs_err::remove_file(context.temp_dir.join("uv.lock"))?; // Add dependencies with a marker that applies for the current target. - uv_snapshot!(context.filters(), context.add().arg("-r").arg("requirements.win.txt").arg("-m").arg("python_version == '3.12'"), @r" + uv_snapshot!(context.filters(), context.add().arg("-r").arg("requirements.win.txt").arg("-m").arg("python_version == '3.12'"), @" success: true exit_code: 0 ----- stdout ----- @@ -5975,7 +5977,7 @@ fn add_requirements_file_constraints() -> Result<()> { "})?; // Pass the input requirements as constraints. - uv_snapshot!(context.filters(), context.add().arg("-r").arg("requirements.in").arg("-c").arg("requirements.txt"), @r" + uv_snapshot!(context.filters(), context.add().arg("-r").arg("requirements.in").arg("-c").arg("requirements.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -6150,7 +6152,7 @@ fn add_requirements_file_constraints() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- @@ -6176,7 +6178,7 @@ fn add_group() -> Result<()> { dependencies = [] "#})?; - uv_snapshot!(context.filters(), context.add().arg("anyio==3.7.0").arg("--group").arg("test"), @r###" + uv_snapshot!(context.filters(), context.add().arg("anyio==3.7.0").arg("--group").arg("test"), @" success: true exit_code: 0 ----- stdout ----- @@ -6188,25 +6190,25 @@ fn add_group() -> Result<()> { + anyio==3.7.0 + idna==3.6 + sniffio==1.3.1 - "###); + "); let pyproject_toml = context.read("pyproject.toml"); - assert_snapshot!(pyproject_toml, @r###" - [project] - name = "project" - version = "0.1.0" - requires-python = ">=3.12" - dependencies = [] + assert_snapshot!(pyproject_toml, @r#" + [project] + name = "project" + version = "0.1.0" + requires-python = ">=3.12" + dependencies = [] - [dependency-groups] - test = [ - "anyio==3.7.0", - ] - "### + [dependency-groups] + test = [ + "anyio==3.7.0", + ] + "# ); - uv_snapshot!(context.filters(), context.add().arg("requests").arg("--group").arg("test"), @r###" + uv_snapshot!(context.filters(), context.add().arg("requests").arg("--group").arg("test"), @" success: true exit_code: 0 ----- stdout ----- @@ -6219,26 +6221,26 @@ fn add_group() -> Result<()> { + charset-normalizer==3.3.2 + requests==2.31.0 + urllib3==2.2.1 - "###); + "); let pyproject_toml = context.read("pyproject.toml"); - assert_snapshot!(pyproject_toml, @r###" - [project] - name = "project" - version = "0.1.0" - requires-python = ">=3.12" - dependencies = [] + assert_snapshot!(pyproject_toml, @r#" + [project] + name = "project" + version = "0.1.0" + requires-python = ">=3.12" + dependencies = [] - [dependency-groups] - test = [ - "anyio==3.7.0", - "requests>=2.31.0", - ] - "### + [dependency-groups] + test = [ + "anyio==3.7.0", + "requests>=2.31.0", + ] + "# ); - uv_snapshot!(context.filters(), context.add().arg("anyio==3.7.0").arg("--group").arg("second"), @r###" + uv_snapshot!(context.filters(), context.add().arg("anyio==3.7.0").arg("--group").arg("second"), @" success: true exit_code: 0 ----- stdout ----- @@ -6246,29 +6248,29 @@ fn add_group() -> Result<()> { ----- stderr ----- Resolved 8 packages in [TIME] Audited 3 packages in [TIME] - "###); + "); let pyproject_toml = context.read("pyproject.toml"); assert_snapshot!(pyproject_toml, @r#" - [project] - name = "project" - version = "0.1.0" - requires-python = ">=3.12" - dependencies = [] + [project] + name = "project" + version = "0.1.0" + requires-python = ">=3.12" + dependencies = [] - [dependency-groups] - second = [ - "anyio==3.7.0", - ] - test = [ - "anyio==3.7.0", - "requests>=2.31.0", - ] - "# + [dependency-groups] + second = [ + "anyio==3.7.0", + ] + test = [ + "anyio==3.7.0", + "requests>=2.31.0", + ] + "# ); - uv_snapshot!(context.filters(), context.add().arg("anyio==3.7.0").arg("--group").arg("alpha"), @r###" + uv_snapshot!(context.filters(), context.add().arg("anyio==3.7.0").arg("--group").arg("alpha"), @" success: true exit_code: 0 ----- stdout ----- @@ -6276,29 +6278,29 @@ fn add_group() -> Result<()> { ----- stderr ----- Resolved 8 packages in [TIME] Audited 3 packages in [TIME] - "###); + "); let pyproject_toml = context.read("pyproject.toml"); assert_snapshot!(pyproject_toml, @r#" - [project] - name = "project" - version = "0.1.0" - requires-python = ">=3.12" - dependencies = [] + [project] + name = "project" + version = "0.1.0" + requires-python = ">=3.12" + dependencies = [] - [dependency-groups] - alpha = [ - "anyio==3.7.0", - ] - second = [ - "anyio==3.7.0", - ] - test = [ - "anyio==3.7.0", - "requests>=2.31.0", - ] - "# + [dependency-groups] + alpha = [ + "anyio==3.7.0", + ] + second = [ + "anyio==3.7.0", + ] + test = [ + "anyio==3.7.0", + "requests>=2.31.0", + ] + "# ); assert!(context.temp_dir.join("uv.lock").exists()); @@ -6326,7 +6328,7 @@ fn add_group_normalize() -> Result<()> { "#})?; // Add with a non-normalized group name. - uv_snapshot!(context.filters(), context.add().arg("iniconfig").arg("--group").arg("cloud_export_to_parquet"), @r" + uv_snapshot!(context.filters(), context.add().arg("iniconfig").arg("--group").arg("cloud_export_to_parquet"), @" success: true exit_code: 0 ----- stdout ----- @@ -6359,7 +6361,7 @@ fn add_group_normalize() -> Result<()> { ); // Add with a normalized group name (which doesn't match the `pyproject.toml`). - uv_snapshot!(context.filters(), context.add().arg("typing-extensions").arg("--group").arg("cloud-export-to-parquet"), @r" + uv_snapshot!(context.filters(), context.add().arg("typing-extensions").arg("--group").arg("cloud-export-to-parquet"), @" success: true exit_code: 0 ----- stdout ----- @@ -6390,7 +6392,7 @@ fn add_group_normalize() -> Result<()> { ); // Remove with a non-normalized group name. - uv_snapshot!(context.filters(), context.remove().arg("iniconfig").arg("--group").arg("cloud_export_to_parquet"), @r" + uv_snapshot!(context.filters(), context.remove().arg("iniconfig").arg("--group").arg("cloud_export_to_parquet"), @" success: true exit_code: 0 ----- stdout ----- @@ -6423,7 +6425,7 @@ fn add_group_normalize() -> Result<()> { ); // Remove with a normalized group name (which doesn't match the `pyproject.toml`). - uv_snapshot!(context.filters(), context.remove().arg("typing-extensions").arg("--group").arg("cloud-export-to-parquet"), @r" + uv_snapshot!(context.filters(), context.remove().arg("typing-extensions").arg("--group").arg("cloud-export-to-parquet"), @" success: true exit_code: 0 ----- stdout ----- @@ -6477,7 +6479,7 @@ fn add_group_before_commented_groups() -> Result<()> { ] "#})?; - uv_snapshot!(context.filters(), context.add().arg("anyio==3.7.0").arg("--group").arg("alpha"), @r" + uv_snapshot!(context.filters(), context.add().arg("anyio==3.7.0").arg("--group").arg("alpha"), @" success: true exit_code: 0 ----- stdout ----- @@ -6496,26 +6498,26 @@ fn add_group_before_commented_groups() -> Result<()> { assert!(context.temp_dir.join("uv.lock").exists()); assert_snapshot!(pyproject_toml, @r#" - [project] - name = "project" - version = "0.1.0" - requires-python = ">=3.12" - dependencies = [] + [project] + name = "project" + version = "0.1.0" + requires-python = ">=3.12" + dependencies = [] - [dependency-groups] - alpha = [ - "anyio==3.7.0", - ] - # This is our dev group - dev = [ - "anyio==3.7.0", - ] - # This is our test group - test = [ - "anyio==3.7.0", - "requests>=2.31.0", - ] - "# + [dependency-groups] + alpha = [ + "anyio==3.7.0", + ] + # This is our dev group + dev = [ + "anyio==3.7.0", + ] + # This is our test group + test = [ + "anyio==3.7.0", + "requests>=2.31.0", + ] + "# ); Ok(()) @@ -6546,7 +6548,7 @@ fn add_group_between_commented_groups() -> Result<()> { ] "#})?; - uv_snapshot!(context.filters(), context.add().arg("anyio==3.7.0").arg("--group").arg("eta"), @r" + uv_snapshot!(context.filters(), context.add().arg("anyio==3.7.0").arg("--group").arg("eta"), @" success: true exit_code: 0 ----- stdout ----- @@ -6565,26 +6567,26 @@ fn add_group_between_commented_groups() -> Result<()> { assert!(context.temp_dir.join("uv.lock").exists()); assert_snapshot!(pyproject_toml, @r#" - [project] - name = "project" - version = "0.1.0" - requires-python = ">=3.12" - dependencies = [] + [project] + name = "project" + version = "0.1.0" + requires-python = ">=3.12" + dependencies = [] - [dependency-groups] - # This is our dev group - dev = [ - "anyio==3.7.0", - ] - eta = [ - "anyio==3.7.0", - ] - # This is our test group - test = [ - "anyio==3.7.0", - "requests>=2.31.0", - ] - "# + [dependency-groups] + # This is our dev group + dev = [ + "anyio==3.7.0", + ] + eta = [ + "anyio==3.7.0", + ] + # This is our test group + test = [ + "anyio==3.7.0", + "requests>=2.31.0", + ] + "# ); Ok(()) @@ -6614,7 +6616,7 @@ fn add_group_to_unsorted() -> Result<()> { ] "#})?; - uv_snapshot!(context.filters(), context.add().arg("anyio==3.7.0").arg("--group").arg("alpha"), @r###" + uv_snapshot!(context.filters(), context.add().arg("anyio==3.7.0").arg("--group").arg("alpha"), @" success: true exit_code: 0 ----- stdout ----- @@ -6626,29 +6628,29 @@ fn add_group_to_unsorted() -> Result<()> { + anyio==3.7.0 + idna==3.6 + sniffio==1.3.1 - "###); + "); let pyproject_toml = context.read("pyproject.toml"); - assert_snapshot!(pyproject_toml, @r###" - [project] - name = "project" - version = "0.1.0" - requires-python = ">=3.12" - dependencies = [] + assert_snapshot!(pyproject_toml, @r#" + [project] + name = "project" + version = "0.1.0" + requires-python = ">=3.12" + dependencies = [] - [dependency-groups] - test = [ - "anyio==3.7.0", - "requests>=2.31.0", - ] - second = [ - "anyio==3.7.0", - ] - alpha = [ - "anyio==3.7.0", - ] - "### + [dependency-groups] + test = [ + "anyio==3.7.0", + "requests>=2.31.0", + ] + second = [ + "anyio==3.7.0", + ] + alpha = [ + "anyio==3.7.0", + ] + "# ); assert!(context.temp_dir.join("uv.lock").exists()); @@ -6675,7 +6677,7 @@ fn remove_group() -> Result<()> { ] "#})?; - uv_snapshot!(context.filters(), context.remove().arg("anyio").arg("--group").arg("test"), @r###" + uv_snapshot!(context.filters(), context.remove().arg("anyio").arg("--group").arg("test"), @" success: true exit_code: 0 ----- stdout ----- @@ -6683,7 +6685,7 @@ fn remove_group() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] Audited in [TIME] - "###); + "); let pyproject_toml = context.read("pyproject.toml"); @@ -6691,7 +6693,7 @@ fn remove_group() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -6700,18 +6702,18 @@ fn remove_group() -> Result<()> { [dependency-groups] test = [] - "### + "# ); }); - uv_snapshot!(context.filters(), context.remove().arg("anyio").arg("--group").arg("test"), @r###" + uv_snapshot!(context.filters(), context.remove().arg("anyio").arg("--group").arg("test"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: The dependency `anyio` could not be found in `dependency-groups.test` - "###); + "); let pyproject_toml = context.read("pyproject.toml"); @@ -6719,7 +6721,7 @@ fn remove_group() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -6728,18 +6730,18 @@ fn remove_group() -> Result<()> { [dependency-groups] test = [] - "### + "# ); }); - uv_snapshot!(context.filters(), context.remove().arg("anyio").arg("--group").arg("test"), @r###" + uv_snapshot!(context.filters(), context.remove().arg("anyio").arg("--group").arg("test"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: The dependency `anyio` could not be found in `dependency-groups.test` - "###); + "); let pyproject_toml = context.temp_dir.child("pyproject.toml"); pyproject_toml.write_str(indoc! {r#" @@ -6750,7 +6752,7 @@ fn remove_group() -> Result<()> { dependencies = ["anyio"] "#})?; - uv_snapshot!(context.filters(), context.remove().arg("anyio").arg("--group").arg("test"), @r###" + uv_snapshot!(context.filters(), context.remove().arg("anyio").arg("--group").arg("test"), @" success: false exit_code: 2 ----- stdout ----- @@ -6758,7 +6760,7 @@ fn remove_group() -> Result<()> { ----- stderr ----- hint: `anyio` is a production dependency error: The dependency `anyio` could not be found in `dependency-groups.test` - "###); + "); Ok(()) } @@ -6786,7 +6788,7 @@ fn add_script() -> Result<()> { pprint([(k, v["title"]) for k, v in data.items()][:10]) "#})?; - uv_snapshot!(context.filters(), context.add().arg("anyio").arg("--script").arg("script.py"), @r" + uv_snapshot!(context.filters(), context.add().arg("anyio").arg("--script").arg("script.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -6838,7 +6840,7 @@ fn add_script_bounds() -> Result<()> { "#})?; // Add `anyio` with `--bounds minor` to the script. - uv_snapshot!(context.filters(), context.add().arg("anyio").arg("--bounds").arg("minor").arg("--script").arg("script.py"), @r" + uv_snapshot!(context.filters(), context.add().arg("anyio").arg("--bounds").arg("minor").arg("--script").arg("script.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -6855,7 +6857,7 @@ fn add_script_bounds() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - script_content, @r###" + script_content, @r#" # /// script # requires-python = ">=3.12" # dependencies = [ @@ -6863,7 +6865,7 @@ fn add_script_bounds() -> Result<()> { # ] # /// print("Hello, world!") - "### + "# ); }); @@ -6891,7 +6893,7 @@ fn add_script_relative_path() -> Result<()> { print("Hello, world!") "#})?; - uv_snapshot!(context.filters(), context.add().arg("./project").arg("--editable").arg("--script").arg("script.py"), @r" + uv_snapshot!(context.filters(), context.add().arg("./project").arg("--editable").arg("--script").arg("script.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -6906,7 +6908,7 @@ fn add_script_relative_path() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - script_content, @r###" + script_content, @r#" # /// script # requires-python = ">=3.12" # dependencies = [ @@ -6917,7 +6919,7 @@ fn add_script_relative_path() -> Result<()> { # project = { path = "project", editable = true } # /// print("Hello, world!") - "### + "# ); }); Ok(()) @@ -6950,24 +6952,24 @@ fn add_script_settings() -> Result<()> { "#})?; // Lock the script. - uv_snapshot!(context.filters(), context.lock().arg("--script").arg("script.py"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--script").arg("script.py"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); // Add `anyio` to the script. - uv_snapshot!(context.filters(), context.add().arg("anyio>=3").arg("--script").arg("script.py"), @r###" + uv_snapshot!(context.filters(), context.add().arg("anyio>=3").arg("--script").arg("script.py"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 7 packages in [TIME] - "###); + "); let script_content = context.read("script.py"); @@ -6975,7 +6977,7 @@ fn add_script_settings() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - script_content, @r###" + script_content, @r#" # /// script # requires-python = ">=3.11" # dependencies = [ @@ -6994,7 +6996,7 @@ fn add_script_settings() -> Result<()> { resp = requests.get("https://peps.python.org/api/peps.json") data = resp.json() pprint([(k, v["title"]) for k, v in data.items()][:10]) - "### + "# ); }); @@ -7121,7 +7123,7 @@ fn add_script_trailing_comment_lines() -> Result<()> { pprint([(k, v["title"]) for k, v in data.items()][:10]) "#})?; - uv_snapshot!(context.filters(), context.add().arg("anyio").arg("--script").arg("script.py"), @r" + uv_snapshot!(context.filters(), context.add().arg("anyio").arg("--script").arg("script.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -7179,7 +7181,7 @@ fn add_script_without_metadata_table() -> Result<()> { pprint([(k, v["title"]) for k, v in data.items()][:10]) "#})?; - uv_snapshot!(context.filters(), context.add().args(["rich", "requests<3"]).arg("--script").arg("script.py"), @r" + uv_snapshot!(context.filters(), context.add().args(["rich", "requests<3"]).arg("--script").arg("script.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -7230,7 +7232,7 @@ fn add_script_without_metadata_table_with_shebang() -> Result<()> { pprint([(k, v["title"]) for k, v in data.items()][:10]) "#})?; - uv_snapshot!(context.filters(), context.add().args(["rich", "requests<3"]).arg("--script").arg("script.py"), @r" + uv_snapshot!(context.filters(), context.add().args(["rich", "requests<3"]).arg("--script").arg("script.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -7286,7 +7288,7 @@ fn add_script_with_metadata_table_and_shebang() -> Result<()> { pprint([(k, v["title"]) for k, v in data.items()][:10]) "#})?; - uv_snapshot!(context.filters(), context.add().args(["rich", "requests<3"]).arg("--script").arg("script.py"), @r" + uv_snapshot!(context.filters(), context.add().args(["rich", "requests<3"]).arg("--script").arg("script.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -7338,7 +7340,7 @@ fn add_script_without_metadata_table_with_docstring() -> Result<()> { pprint([(k, v["title"]) for k, v in data.items()][:10]) "#})?; - uv_snapshot!(context.filters(), context.add().args(["rich", "requests<3"]).arg("--script").arg("script.py"), @r" + uv_snapshot!(context.filters(), context.add().args(["rich", "requests<3"]).arg("--script").arg("script.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -7394,7 +7396,7 @@ fn add_extensionless_script() -> Result<()> { pprint([(k, v["title"]) for k, v in data.items()][:10]) "#})?; - uv_snapshot!(context.filters(), context.add().args(["rich", "requests<3"]).arg("--script").arg("script"), @r" + uv_snapshot!(context.filters(), context.add().args(["rich", "requests<3"]).arg("--script").arg("script"), @" success: true exit_code: 0 ----- stdout ----- @@ -7467,7 +7469,7 @@ async fn add_requirements_from_remote_script() -> Result<()> { let script_url = format!("{}/script", server.uri()); - uv_snapshot!(context.filters(), context.add().arg("-r").arg(&script_url), @r###" + uv_snapshot!(context.filters(), context.add().arg("-r").arg(&script_url), @" success: true exit_code: 0 ----- stdout ----- @@ -7483,7 +7485,7 @@ async fn add_requirements_from_remote_script() -> Result<()> { + pygments==2.17.2 + rich==13.7.1 + sniffio==1.3.1 - "###); + "); let pyproject_toml_content = context.read("pyproject.toml"); @@ -7491,7 +7493,7 @@ async fn add_requirements_from_remote_script() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml_content, @r###" + pyproject_toml_content, @r#" [project] name = "project" version = "0.1.0" @@ -7500,7 +7502,7 @@ async fn add_requirements_from_remote_script() -> Result<()> { "anyio>=4", "rich>=13.7.1", ] - "### + "# ); }); @@ -7534,7 +7536,7 @@ fn remove_repeated() -> Result<()> { anyio_local = anyio_local.portable_display(), })?; - uv_snapshot!(context.filters(), context.remove().arg("anyio"), @r" + uv_snapshot!(context.filters(), context.remove().arg("anyio"), @" success: true exit_code: 0 ----- stdout ----- @@ -7553,7 +7555,7 @@ fn remove_repeated() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -7568,11 +7570,11 @@ fn remove_repeated() -> Result<()> { [tool.uv.sources] anyio = { path = "[WORKSPACE]/test/packages/anyio_local" } - "### + "# ); }); - uv_snapshot!(context.filters(), context.remove().arg("anyio").arg("--optional").arg("foo"), @r" + uv_snapshot!(context.filters(), context.remove().arg("anyio").arg("--optional").arg("foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -7589,7 +7591,7 @@ fn remove_repeated() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -7604,11 +7606,11 @@ fn remove_repeated() -> Result<()> { [tool.uv.sources] anyio = { path = "[WORKSPACE]/test/packages/anyio_local" } - "### + "# ); }); - uv_snapshot!(context.filters(), context.remove().arg("anyio").arg("--dev"), @r" + uv_snapshot!(context.filters(), context.remove().arg("anyio").arg("--dev"), @" success: true exit_code: 0 ----- stdout ----- @@ -7626,7 +7628,7 @@ fn remove_repeated() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -7638,7 +7640,7 @@ fn remove_repeated() -> Result<()> { [tool.uv] dev-dependencies = [] - "### + "# ); }); Ok(()) @@ -7668,7 +7670,7 @@ fn add_remove_script_lock() -> Result<()> { "#})?; // Explicitly lock the script. - uv_snapshot!(context.filters(), context.lock().arg("--script").arg("script.py"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--script").arg("script.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -7825,14 +7827,14 @@ fn add_remove_script_lock() -> Result<()> { }); // Adding to a locked script should update the lockfile. - uv_snapshot!(context.filters(), context.add().arg("anyio").arg("--script").arg("script.py"), @r###" + uv_snapshot!(context.filters(), context.add().arg("anyio").arg("--script").arg("script.py"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 11 packages in [TIME] - "###); + "); let script_content = context.read("script.py"); @@ -7840,7 +7842,7 @@ fn add_remove_script_lock() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - script_content, @r###" + script_content, @r#" # /// script # requires-python = ">=3.11" # dependencies = [ @@ -7856,7 +7858,7 @@ fn add_remove_script_lock() -> Result<()> { resp = requests.get("https://peps.python.org/api/peps.json") data = resp.json() pprint([(k, v["title"]) for k, v in data.items()][:10]) - "### + "# ); }); @@ -8031,14 +8033,14 @@ fn add_remove_script_lock() -> Result<()> { }); // Removing from a locked script should update the lockfile. - uv_snapshot!(context.filters(), context.remove().arg("anyio").arg("--script").arg("script.py"), @r###" + uv_snapshot!(context.filters(), context.remove().arg("anyio").arg("--script").arg("script.py"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 9 packages in [TIME] - "###); + "); let script_content = context.read("script.py"); @@ -8046,7 +8048,7 @@ fn add_remove_script_lock() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - script_content, @r###" + script_content, @r#" # /// script # requires-python = ">=3.11" # dependencies = [ @@ -8061,7 +8063,7 @@ fn add_remove_script_lock() -> Result<()> { resp = requests.get("https://peps.python.org/api/peps.json") data = resp.json() pprint([(k, v["title"]) for k, v in data.items()][:10]) - "### + "# ); }); @@ -8239,14 +8241,14 @@ fn remove_script() -> Result<()> { pprint([(k, v["title"]) for k, v in data.items()][:10]) "#})?; - uv_snapshot!(context.filters(), context.remove().arg("anyio").arg("--script").arg("script.py"), @r###" + uv_snapshot!(context.filters(), context.remove().arg("anyio").arg("--script").arg("script.py"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Updated `script.py` - "###); + "); let script_content = context.read("script.py"); @@ -8254,7 +8256,7 @@ fn remove_script() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - script_content, @r###" + script_content, @r#" # /// script # requires-python = ">=3.11" # dependencies = [ @@ -8269,7 +8271,7 @@ fn remove_script() -> Result<()> { resp = requests.get("https://peps.python.org/api/peps.json") data = resp.json() pprint([(k, v["title"]) for k, v in data.items()][:10]) - "### + "# ); }); Ok(()) @@ -8297,14 +8299,14 @@ fn remove_last_dep_script() -> Result<()> { pprint([(k, v["title"]) for k, v in data.items()][:10]) "#})?; - uv_snapshot!(context.filters(), context.remove().arg("rich").arg("--script").arg("script.py"), @r###" + uv_snapshot!(context.filters(), context.remove().arg("rich").arg("--script").arg("script.py"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Updated `script.py` - "###); + "); let script_content = context.read("script.py"); @@ -8312,7 +8314,7 @@ fn remove_last_dep_script() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - script_content, @r###" + script_content, @r#" # /// script # requires-python = ">=3.11" # dependencies = [] @@ -8324,7 +8326,7 @@ fn remove_last_dep_script() -> Result<()> { resp = requests.get("https://peps.python.org/api/peps.json") data = resp.json() pprint([(k, v["title"]) for k, v in data.items()][:10]) - "### + "# ); }); Ok(()) @@ -8354,7 +8356,7 @@ fn add_git_to_script() -> Result<()> { .arg("uv-public-pypackage @ git+https://github.com/astral-test/uv-public-pypackage") .arg("--tag=0.0.1") .arg("--script") - .arg("script.py"), @r" + .arg("script.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -8369,7 +8371,7 @@ fn add_git_to_script() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - script_content, @r###" + script_content, @r#" # /// script # requires-python = ">=3.11" # dependencies = [ @@ -8383,7 +8385,7 @@ fn add_git_to_script() -> Result<()> { import anyio import uv_public_pypackage - "### + "# ); }); @@ -8415,7 +8417,7 @@ fn add_include_default_groups() -> Result<()> { "#})?; // add should install default groups. - uv_snapshot!(context.filters(), context.add().arg("typing-extensions"), @r" + uv_snapshot!(context.filters(), context.add().arg("typing-extensions"), @" success: true exit_code: 0 ----- stdout ----- @@ -8480,7 +8482,7 @@ fn remove_include_default_groups() -> Result<()> { "#})?; // remove should install default groups. - uv_snapshot!(context.filters(), context.remove().arg("typing-extensions"), @r" + uv_snapshot!(context.filters(), context.remove().arg("typing-extensions"), @" success: true exit_code: 0 ----- stdout ----- @@ -8588,13 +8590,13 @@ fn fail_to_add_revert_project() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "parent" version = "0.1.0" requires-python = ">=3.12" dependencies = [] - "### + "# ); }); @@ -8622,7 +8624,7 @@ fn fail_to_edit_revert_project() -> Result<()> { dependencies = [] "#})?; - uv_snapshot!(context.filters(), context.add().arg("iniconfig"), @r###" + uv_snapshot!(context.filters(), context.add().arg("iniconfig"), @" success: true exit_code: 0 ----- stdout ----- @@ -8632,7 +8634,7 @@ fn fail_to_edit_revert_project() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + iniconfig==2.0.0 - "###); + "); let before = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?; @@ -8690,7 +8692,7 @@ fn fail_to_edit_revert_project() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "parent" version = "0.1.0" @@ -8698,7 +8700,7 @@ fn fail_to_edit_revert_project() -> Result<()> { dependencies = [ "iniconfig>=2.0.0", ] - "### + "# ); }); @@ -8977,7 +8979,7 @@ fn sorted_dependencies() -> Result<()> { ] "#})?; - uv_snapshot!(context.filters(), context.add().args(["typing-extensions", "anyio"]), @r###" + uv_snapshot!(context.filters(), context.add().args(["typing-extensions", "anyio"]), @" success: true exit_code: 0 ----- stdout ----- @@ -8998,7 +9000,7 @@ fn sorted_dependencies() -> Result<()> { + sniffio==1.3.1 + typing-extensions==4.10.0 + urllib3==2.2.1 - "###); + "); let pyproject_toml = context.read("pyproject.toml"); @@ -9006,7 +9008,7 @@ fn sorted_dependencies() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -9017,7 +9019,7 @@ fn sorted_dependencies() -> Result<()> { "iniconfig", "typing-extensions>=4.10.0", ] - "### + "# ); }); Ok(()) @@ -9041,7 +9043,7 @@ fn naive_sorted_dependencies() -> Result<()> { ] "#})?; - uv_snapshot!(context.filters(), context.add().args(["pytest-randomly"]), @r" + uv_snapshot!(context.filters(), context.add().args(["pytest-randomly"]), @" success: true exit_code: 0 ----- stdout ----- @@ -9064,7 +9066,7 @@ fn naive_sorted_dependencies() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -9074,7 +9076,7 @@ fn naive_sorted_dependencies() -> Result<()> { "pytest-randomly>=3.15.0", "pytest>=8.1.1", ] - "### + "# ); }); Ok(()) @@ -9099,7 +9101,7 @@ fn case_sensitive_sorted_dependencies() -> Result<()> { ] "#})?; - uv_snapshot!(context.filters(), context.add().args(["typing-extensions", "anyio"]), @r###" + uv_snapshot!(context.filters(), context.add().args(["typing-extensions", "anyio"]), @" success: true exit_code: 0 ----- stdout ----- @@ -9121,7 +9123,7 @@ fn case_sensitive_sorted_dependencies() -> Result<()> { + sniffio==1.3.1 + typing-extensions==4.10.0 + urllib3==2.2.1 - "###); + "); let pyproject_toml = context.read("pyproject.toml"); @@ -9129,7 +9131,7 @@ fn case_sensitive_sorted_dependencies() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -9141,7 +9143,7 @@ fn case_sensitive_sorted_dependencies() -> Result<()> { "iniconfig", "typing-extensions>=4.10.0", ] - "### + "# ); }); Ok(()) @@ -9166,7 +9168,7 @@ fn case_sensitive_naive_sorted_dependencies() -> Result<()> { ] "#})?; - uv_snapshot!(context.filters(), context.add().args(["pytest-randomly"]), @r" + uv_snapshot!(context.filters(), context.add().args(["pytest-randomly"]), @" success: true exit_code: 0 ----- stdout ----- @@ -9190,7 +9192,7 @@ fn case_sensitive_naive_sorted_dependencies() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -9201,7 +9203,7 @@ fn case_sensitive_naive_sorted_dependencies() -> Result<()> { "pytest-randomly>=3.15.0", "pytest>=8.1.1", ] - "### + "# ); }); Ok(()) @@ -9224,7 +9226,7 @@ fn sorted_dependencies_name_specifiers() -> Result<()> { ] "#})?; - uv_snapshot!(context.filters(), universal_windows_filters=true, context.add().args(["pytest-mock"]), @r###" + uv_snapshot!(context.filters(), universal_windows_filters=true, context.add().args(["pytest-mock"]), @" success: true exit_code: 0 ----- stdout ----- @@ -9239,7 +9241,7 @@ fn sorted_dependencies_name_specifiers() -> Result<()> { + pytest==8.1.1 + pytest-mock==3.14.0 + typing-extensions==4.10.0 - "###); + "); let pyproject_toml = context.read("pyproject.toml"); @@ -9247,7 +9249,7 @@ fn sorted_dependencies_name_specifiers() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -9257,11 +9259,11 @@ fn sorted_dependencies_name_specifiers() -> Result<()> { "pytest-mock>=3.14.0", "typing-extensions>=4.10.0", ] - "### + "# ); }); - uv_snapshot!(context.filters(), universal_windows_filters=true, context.add().args(["pytest-randomly"]), @r###" + uv_snapshot!(context.filters(), universal_windows_filters=true, context.add().args(["pytest-randomly"]), @" success: true exit_code: 0 ----- stdout ----- @@ -9271,7 +9273,7 @@ fn sorted_dependencies_name_specifiers() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + pytest-randomly==3.15.0 - "###); + "); let pyproject_toml = context.read("pyproject.toml"); @@ -9279,7 +9281,7 @@ fn sorted_dependencies_name_specifiers() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -9290,7 +9292,7 @@ fn sorted_dependencies_name_specifiers() -> Result<()> { "pytest-randomly>=3.15.0", "typing-extensions>=4.10.0", ] - "### + "# ); }); @@ -9319,7 +9321,7 @@ fn sorted_dependencies_with_include_group() -> Result<()> { ] "#})?; - uv_snapshot!(context.filters(), context.add().args(["--dev", "pytest-randomly"]), @r" + uv_snapshot!(context.filters(), context.add().args(["--dev", "pytest-randomly"]), @" success: true exit_code: 0 ----- stdout ----- @@ -9385,7 +9387,7 @@ fn sorted_dependencies_new_dependency_after_include_group() -> Result<()> { ] "#})?; - uv_snapshot!(context.filters(), context.add().args(["--dev", "pytest"]), @r" + uv_snapshot!(context.filters(), context.add().args(["--dev", "pytest"]), @" success: true exit_code: 0 ----- stdout ----- @@ -9448,7 +9450,7 @@ fn sorted_dependencies_include_group_kept_at_bottom() -> Result<()> { ] "#})?; - uv_snapshot!(context.filters(), context.add().args(["--dev", "pytest-randomly"]), @r" + uv_snapshot!(context.filters(), context.add().args(["--dev", "pytest-randomly"]), @" success: true exit_code: 0 ----- stdout ----- @@ -9513,13 +9515,13 @@ fn custom_dependencies() -> Result<()> { ] "#})?; - uv_snapshot!(context.filters(), context.add().arg("pydantic").arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.add().arg("pydantic").arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- - "###); + "); let pyproject_toml = context.read("pyproject.toml"); @@ -9527,7 +9529,7 @@ fn custom_dependencies() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -9540,7 +9542,7 @@ fn custom_dependencies() -> Result<()> { "sentry-sdk", "pydantic", ] - "### + "# ); }); Ok(()) @@ -9562,7 +9564,7 @@ fn update_offset() -> Result<()> { ] "#})?; - uv_snapshot!(context.filters(), context.add().args(["typing-extensions", "iniconfig"]), @r###" + uv_snapshot!(context.filters(), context.add().args(["typing-extensions", "iniconfig"]), @" success: true exit_code: 0 ----- stdout ----- @@ -9573,7 +9575,7 @@ fn update_offset() -> Result<()> { Installed 2 packages in [TIME] + iniconfig==2.0.0 + typing-extensions==4.10.0 - "###); + "); let pyproject_toml = context.read("pyproject.toml"); @@ -9581,7 +9583,7 @@ fn update_offset() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -9590,7 +9592,7 @@ fn update_offset() -> Result<()> { "iniconfig", "typing-extensions>=4.10.0", ] - "### + "# ); }); @@ -9613,7 +9615,7 @@ fn add_shadowed_name() -> Result<()> { "#})?; // Pinned constrained, check for a direct dependency loop. - uv_snapshot!(context.filters(), context.add().arg("dagster-webserver==1.6.13"), @r###" + uv_snapshot!(context.filters(), context.add().arg("dagster-webserver==1.6.13"), @" success: false exit_code: 1 ----- stdout ----- @@ -9624,10 +9626,10 @@ fn add_shadowed_name() -> Result<()> { hint: The package `dagster-webserver` depends on the package `dagster` but the name is shadowed by your project. Consider changing the name of the project. help: If you want to add the package regardless of the failed resolution, provide the `--frozen` flag to skip locking and syncing. - "###); + "); // Constraint with several available versions, check for an indirect dependency loop. - uv_snapshot!(context.filters(), context.add().arg("dagster-webserver>=1.6.11,<1.7.0"), @r" + uv_snapshot!(context.filters(), context.add().arg("dagster-webserver>=1.6.11,<1.7.0"), @" success: false exit_code: 1 ----- stdout ----- @@ -9663,7 +9665,7 @@ fn add_warn_index_url() -> Result<()> { dependencies = [] "#})?; - uv_snapshot!(context.filters(), context.add().arg("idna").arg("--index-url").arg("https://pypi.org/simple"), @r" + uv_snapshot!(context.filters(), context.add().arg("idna").arg("--index-url").arg("https://pypi.org/simple"), @" success: true exit_code: 0 ----- stdout ----- @@ -9682,7 +9684,7 @@ fn add_warn_index_url() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -9690,7 +9692,7 @@ fn add_warn_index_url() -> Result<()> { dependencies = [ "idna>=3.6", ] - "### + "# ); }); @@ -9731,7 +9733,7 @@ fn add_warn_index_url() -> Result<()> { ); }); - uv_snapshot!(context.filters(), context.add().arg("iniconfig").arg("--extra-index-url").arg("https://test.pypi.org/simple"), @r" + uv_snapshot!(context.filters(), context.add().arg("iniconfig").arg("--extra-index-url").arg("https://test.pypi.org/simple"), @" success: false exit_code: 1 ----- stdout ----- @@ -9764,7 +9766,7 @@ fn add_no_warn_index_url() -> Result<()> { index-url = "https://test.pypi.org/simple" "#})?; - uv_snapshot!(context.filters(), context.add().arg("iniconfig"), @r###" + uv_snapshot!(context.filters(), context.add().arg("iniconfig"), @" success: true exit_code: 0 ----- stdout ----- @@ -9774,7 +9776,7 @@ fn add_no_warn_index_url() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + iniconfig==2.0.0 - "###); + "); let pyproject_toml = fs_err::read_to_string(context.temp_dir.join("pyproject.toml"))?; @@ -9782,7 +9784,7 @@ fn add_no_warn_index_url() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -9792,7 +9794,7 @@ fn add_no_warn_index_url() -> Result<()> { ] [tool.uv] index-url = "https://test.pypi.org/simple" - "### + "# ); }); @@ -9853,7 +9855,7 @@ fn add_index() -> Result<()> { constraint-dependencies = ["markupsafe<3"] "#})?; - uv_snapshot!(context.filters(), context.add().arg("iniconfig==2.0.0").arg("--index").arg("https://pypi.org/simple"), @r###" + uv_snapshot!(context.filters(), context.add().arg("iniconfig==2.0.0").arg("--index").arg("https://pypi.org/simple"), @" success: true exit_code: 0 ----- stdout ----- @@ -9863,7 +9865,7 @@ fn add_index() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + iniconfig==2.0.0 - "###); + "); let pyproject_toml = fs_err::read_to_string(context.temp_dir.join("pyproject.toml"))?; @@ -9871,7 +9873,7 @@ fn add_index() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -9885,7 +9887,7 @@ fn add_index() -> Result<()> { [[tool.uv.index]] url = "https://pypi.org/simple" - "### + "# ); }); @@ -9930,7 +9932,7 @@ fn add_index() -> Result<()> { }); // Adding a subsequent index should put it _above_ the existing index. - uv_snapshot!(context.filters(), context.add().arg("jinja2").arg("--index").arg("pytorch=https://astral-sh.github.io/pytorch-mirror/whl/cu121"), @r###" + uv_snapshot!(context.filters(), context.add().arg("jinja2").arg("--index").arg("pytorch=https://astral-sh.github.io/pytorch-mirror/whl/cu121"), @" success: true exit_code: 0 ----- stdout ----- @@ -9941,7 +9943,7 @@ fn add_index() -> Result<()> { Installed 2 packages in [TIME] + jinja2==3.1.4 + markupsafe==2.1.5 - "###); + "); let pyproject_toml = fs_err::read_to_string(context.temp_dir.join("pyproject.toml"))?; @@ -9949,7 +9951,7 @@ fn add_index() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -9971,7 +9973,7 @@ fn add_index() -> Result<()> { [[tool.uv.index]] url = "https://pypi.org/simple" - "### + "# ); }); @@ -10045,7 +10047,7 @@ fn add_index() -> Result<()> { }); // Adding a subsequent index with the same name should replace it. - uv_snapshot!(context.filters(), context.add().arg("jinja2").arg("--index").arg("pytorch=https://test.pypi.org/simple"), @r###" + uv_snapshot!(context.filters(), context.add().arg("jinja2").arg("--index").arg("pytorch=https://test.pypi.org/simple"), @" success: true exit_code: 0 ----- stdout ----- @@ -10053,7 +10055,7 @@ fn add_index() -> Result<()> { ----- stderr ----- Resolved 4 packages in [TIME] Audited 3 packages in [TIME] - "###); + "); let pyproject_toml = fs_err::read_to_string(context.temp_dir.join("pyproject.toml"))?; @@ -10061,7 +10063,7 @@ fn add_index() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -10083,7 +10085,7 @@ fn add_index() -> Result<()> { [[tool.uv.index]] url = "https://pypi.org/simple" - "### + "# ); }); @@ -10162,7 +10164,7 @@ fn add_index() -> Result<()> { }); // Adding a subsequent index with the same URL should bump it to the top. - uv_snapshot!(context.filters(), context.add().arg("typing-extensions").arg("--index").arg("https://pypi.org/simple"), @r###" + uv_snapshot!(context.filters(), context.add().arg("typing-extensions").arg("--index").arg("https://pypi.org/simple"), @" success: true exit_code: 0 ----- stdout ----- @@ -10172,7 +10174,7 @@ fn add_index() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + typing-extensions==4.12.2 - "###); + "); let pyproject_toml = fs_err::read_to_string(context.temp_dir.join("pyproject.toml"))?; @@ -10180,7 +10182,7 @@ fn add_index() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -10203,7 +10205,7 @@ fn add_index() -> Result<()> { [[tool.uv.index]] name = "pytorch" url = "https://test.pypi.org/simple" - "### + "# ); }); @@ -10293,7 +10295,7 @@ fn add_index() -> Result<()> { }); // Adding a subsequent index with the same URL should bump it to the top, but retain the name. - uv_snapshot!(context.filters(), context.add().arg("typing-extensions").arg("--index").arg("https://test.pypi.org/simple"), @r###" + uv_snapshot!(context.filters(), context.add().arg("typing-extensions").arg("--index").arg("https://test.pypi.org/simple"), @" success: true exit_code: 0 ----- stdout ----- @@ -10301,7 +10303,7 @@ fn add_index() -> Result<()> { ----- stderr ----- Resolved 5 packages in [TIME] Audited 4 packages in [TIME] - "###); + "); let pyproject_toml = fs_err::read_to_string(context.temp_dir.join("pyproject.toml"))?; @@ -10309,7 +10311,7 @@ fn add_index() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -10332,7 +10334,7 @@ fn add_index() -> Result<()> { [[tool.uv.index]] url = "https://pypi.org/simple" - "### + "# ); }); @@ -10438,7 +10440,7 @@ fn add_default_index_url() -> Result<()> { dependencies = [] "#})?; - uv_snapshot!(context.filters(), context.add().arg("iniconfig").arg("--default-index").arg("https://test.pypi.org/simple"), @r###" + uv_snapshot!(context.filters(), context.add().arg("iniconfig").arg("--default-index").arg("https://test.pypi.org/simple"), @" success: true exit_code: 0 ----- stdout ----- @@ -10448,7 +10450,7 @@ fn add_default_index_url() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + iniconfig==2.0.0 - "###); + "); let pyproject_toml = fs_err::read_to_string(context.temp_dir.join("pyproject.toml"))?; @@ -10456,7 +10458,7 @@ fn add_default_index_url() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -10468,7 +10470,7 @@ fn add_default_index_url() -> Result<()> { [[tool.uv.index]] url = "https://test.pypi.org/simple" default = true - "### + "# ); }); @@ -10510,7 +10512,7 @@ fn add_default_index_url() -> Result<()> { }); // Adding another `--default-index` replaces the current default. - uv_snapshot!(context.filters(), context.add().arg("typing-extensions").arg("--default-index").arg("https://pypi.org/simple"), @r###" + uv_snapshot!(context.filters(), context.add().arg("typing-extensions").arg("--default-index").arg("https://pypi.org/simple"), @" success: true exit_code: 0 ----- stdout ----- @@ -10520,7 +10522,7 @@ fn add_default_index_url() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + typing-extensions==4.10.0 - "###); + "); let pyproject_toml = fs_err::read_to_string(context.temp_dir.join("pyproject.toml"))?; @@ -10528,7 +10530,7 @@ fn add_default_index_url() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -10541,7 +10543,7 @@ fn add_default_index_url() -> Result<()> { [[tool.uv.index]] url = "https://pypi.org/simple" default = true - "### + "# ); }); @@ -10612,7 +10614,7 @@ fn add_index_credentials() -> Result<()> { "#})?; // Provide credentials for the index via the environment variable. - uv_snapshot!(context.filters(), context.add().arg("iniconfig==2.0.0").env(EnvVars::UV_DEFAULT_INDEX, "https://public:heron@pypi-proxy.fly.dev/basic-auth/simple"), @r###" + uv_snapshot!(context.filters(), context.add().arg("iniconfig==2.0.0").env(EnvVars::UV_DEFAULT_INDEX, "https://public:heron@pypi-proxy.fly.dev/basic-auth/simple"), @" success: true exit_code: 0 ----- stdout ----- @@ -10622,7 +10624,7 @@ fn add_index_credentials() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + iniconfig==2.0.0 - "###); + "); let pyproject_toml = fs_err::read_to_string(context.temp_dir.join("pyproject.toml"))?; @@ -10630,7 +10632,7 @@ fn add_index_credentials() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -10642,7 +10644,7 @@ fn add_index_credentials() -> Result<()> { [[tool.uv.index]] url = "https://pypi-proxy.fly.dev/basic-auth/simple" default = true - "### + "# ); }); @@ -10706,7 +10708,7 @@ fn existing_index_credentials() -> Result<()> { "#})?; // Provide credentials for the index via the environment variable. - uv_snapshot!(context.filters(), context.add().arg("iniconfig==2.0.0").env(EnvVars::UV_DEFAULT_INDEX, "https://public:heron@pypi-proxy.fly.dev/basic-auth/simple"), @r###" + uv_snapshot!(context.filters(), context.add().arg("iniconfig==2.0.0").env(EnvVars::UV_DEFAULT_INDEX, "https://public:heron@pypi-proxy.fly.dev/basic-auth/simple"), @" success: true exit_code: 0 ----- stdout ----- @@ -10716,7 +10718,7 @@ fn existing_index_credentials() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + iniconfig==2.0.0 - "###); + "); let pyproject_toml = fs_err::read_to_string(context.temp_dir.join("pyproject.toml"))?; @@ -10724,7 +10726,7 @@ fn existing_index_credentials() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -10738,7 +10740,7 @@ fn existing_index_credentials() -> Result<()> { name = "internal" url = "https://pypi-proxy.fly.dev/basic-auth/simple" default = true - "### + "# ); }); @@ -10799,7 +10801,7 @@ fn add_index_with_trailing_slash() -> Result<()> { constraint-dependencies = ["markupsafe<3"] "#})?; - uv_snapshot!(context.filters(), context.add().arg("iniconfig==2.0.0").arg("--index").arg("https://pypi.org/simple/"), @r###" + uv_snapshot!(context.filters(), context.add().arg("iniconfig==2.0.0").arg("--index").arg("https://pypi.org/simple/"), @" success: true exit_code: 0 ----- stdout ----- @@ -10809,7 +10811,7 @@ fn add_index_with_trailing_slash() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + iniconfig==2.0.0 - "###); + "); let pyproject_toml = fs_err::read_to_string(context.temp_dir.join("pyproject.toml"))?; @@ -10817,7 +10819,7 @@ fn add_index_with_trailing_slash() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -10831,7 +10833,7 @@ fn add_index_with_trailing_slash() -> Result<()> { [[tool.uv.index]] url = "https://pypi.org/simple/" - "### + "# ); }); @@ -10895,7 +10897,7 @@ fn add_index_without_trailing_slash() -> Result<()> { constraint-dependencies = ["markupsafe<3"] "#})?; - uv_snapshot!(context.filters(), context.add().arg("iniconfig==2.0.0").arg("--index").arg("https://pypi.org/simple"), @r###" + uv_snapshot!(context.filters(), context.add().arg("iniconfig==2.0.0").arg("--index").arg("https://pypi.org/simple"), @" success: true exit_code: 0 ----- stdout ----- @@ -10905,7 +10907,7 @@ fn add_index_without_trailing_slash() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + iniconfig==2.0.0 - "###); + "); let pyproject_toml = fs_err::read_to_string(context.temp_dir.join("pyproject.toml"))?; @@ -10913,7 +10915,7 @@ fn add_index_without_trailing_slash() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -10927,7 +10929,7 @@ fn add_index_without_trailing_slash() -> Result<()> { [[tool.uv.index]] url = "https://pypi.org/simple" - "### + "# ); }); @@ -10998,7 +11000,7 @@ fn add_index_with_existing_relative_path_index() -> Result<()> { let wheel_dst = packages.child("ok-1.0.0-py3-none-any.whl"); fs_err::copy(&wheel_src, &wheel_dst)?; - uv_snapshot!(context.filters(), context.add().arg("iniconfig").arg("--index").arg("./test-index"), @r" + uv_snapshot!(context.filters(), context.add().arg("iniconfig").arg("--index").arg("./test-index"), @" success: true exit_code: 0 ----- stdout ----- @@ -11027,7 +11029,7 @@ fn add_index_with_non_existent_relative_path() -> Result<()> { dependencies = [] "#})?; - uv_snapshot!(context.filters(), context.add().arg("iniconfig").arg("--index").arg("./test-index"), @r" + uv_snapshot!(context.filters(), context.add().arg("iniconfig").arg("--index").arg("./test-index"), @" success: false exit_code: 2 ----- stdout ----- @@ -11057,7 +11059,7 @@ fn add_index_with_non_existent_relative_path_with_same_name_as_index() -> Result url = "https://pypi-proxy.fly.dev/simple" "#})?; - uv_snapshot!(context.filters(), context.add().arg("iniconfig").arg("--index").arg("./test-index"), @r" + uv_snapshot!(context.filters(), context.add().arg("iniconfig").arg("--index").arg("./test-index"), @" success: false exit_code: 2 ----- stdout ----- @@ -11089,7 +11091,7 @@ fn add_index_empty_directory() -> Result<()> { let packages = context.temp_dir.child("test-index"); packages.create_dir_all()?; - uv_snapshot!(context.filters(), context.add().arg("iniconfig").arg("--index").arg("./test-index"), @r" + uv_snapshot!(context.filters(), context.add().arg("iniconfig").arg("--index").arg("./test-index"), @" success: true exit_code: 0 ----- stdout ----- @@ -11121,7 +11123,7 @@ fn add_index_with_ambiguous_relative_path() -> Result<()> { "#})?; #[cfg(unix)] - uv_snapshot!(filters, context.add().arg("iniconfig").arg("--index").arg("test-index"), @r" + uv_snapshot!(filters, context.add().arg("iniconfig").arg("--index").arg("test-index"), @" success: false exit_code: 2 ----- stdout ----- @@ -11168,7 +11170,7 @@ fn add_group_comment() -> Result<()> { ] "#})?; - uv_snapshot!(context.filters(), context.add().arg("--group").arg("dev").arg("sniffio"), @r###" + uv_snapshot!(context.filters(), context.add().arg("--group").arg("dev").arg("sniffio"), @" success: true exit_code: 0 ----- stdout ----- @@ -11179,7 +11181,7 @@ fn add_group_comment() -> Result<()> { Installed 2 packages in [TIME] + sniffio==1.3.1 + typing-extensions==4.10.0 - "###); + "); let pyproject_toml = context.read("pyproject.toml"); @@ -11187,7 +11189,7 @@ fn add_group_comment() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "myproject" version = "0.1.0" @@ -11203,7 +11205,7 @@ fn add_group_comment() -> Result<()> { test = [ "iniconfig" ] - "### + "# ); }); @@ -11275,14 +11277,14 @@ fn add_group_comment() -> Result<()> { }); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Audited 2 packages in [TIME] - "###); + "); Ok(()) } @@ -11306,7 +11308,7 @@ fn add_index_comments() -> Result<()> { "#})?; // Preserve the comment on the index URL, despite replacing it. - uv_snapshot!(context.filters(), context.add().arg("iniconfig==2.0.0").env(EnvVars::UV_DEFAULT_INDEX, "https://pypi.org/simple"), @r###" + uv_snapshot!(context.filters(), context.add().arg("iniconfig==2.0.0").env(EnvVars::UV_DEFAULT_INDEX, "https://pypi.org/simple"), @" success: true exit_code: 0 ----- stdout ----- @@ -11316,7 +11318,7 @@ fn add_index_comments() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + iniconfig==2.0.0 - "###); + "); let pyproject_toml = fs_err::read_to_string(context.temp_dir.join("pyproject.toml"))?; @@ -11324,7 +11326,7 @@ fn add_index_comments() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -11337,7 +11339,7 @@ fn add_index_comments() -> Result<()> { name = "internal" url = "https://pypi.org/simple" # This is a test index. default = true - "### + "# ); }); @@ -11395,14 +11397,14 @@ fn add_self() -> Result<()> { dependencies = [] "#})?; - uv_snapshot!(context.filters(), context.add().arg("anyio==3.7.0"), @r###" + uv_snapshot!(context.filters(), context.add().arg("anyio==3.7.0"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: Requirement name `anyio` matches project name `anyio`, but self-dependencies are not permitted without the `--dev` or `--optional` flags. If your project name (`anyio`) is shadowing that of a third-party dependency, consider renaming the project. - "###); + "); let pyproject_toml = context.temp_dir.child("pyproject.toml"); pyproject_toml.write_str(indoc! {r#" @@ -11417,7 +11419,7 @@ fn add_self() -> Result<()> { "#})?; // However, recursive extras are fine. - uv_snapshot!(context.filters(), context.add().arg("anyio[types]").arg("--optional").arg("all"), @r" + uv_snapshot!(context.filters(), context.add().arg("anyio[types]").arg("--optional").arg("all"), @" success: true exit_code: 0 ----- stdout ----- @@ -11455,7 +11457,7 @@ fn add_self() -> Result<()> { }); // And recursive development dependencies - uv_snapshot!(context.filters(), context.add().arg("anyio[types]").arg("--dev"), @r" + uv_snapshot!(context.filters(), context.add().arg("anyio[types]").arg("--dev"), @" success: true exit_code: 0 ----- stdout ----- @@ -11515,7 +11517,7 @@ fn add_preserves_end_of_line_comments() -> Result<()> { ] "#})?; - uv_snapshot!(context.filters(), context.add().arg("requests==2.31.0"), @r" + uv_snapshot!(context.filters(), context.add().arg("requests==2.31.0"), @" success: true exit_code: 0 ----- stdout ----- @@ -11539,7 +11541,7 @@ fn add_preserves_end_of_line_comments() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -11550,7 +11552,7 @@ fn add_preserves_end_of_line_comments() -> Result<()> { # comment 2 "requests==2.31.0", ] - "### + "# ); }); Ok(()) @@ -11572,7 +11574,7 @@ fn add_preserves_end_of_line_comment_on_non_last_deps() -> Result<()> { ] "#})?; - uv_snapshot!(context.filters(), context.add().arg("requests==2.31.0"), @r" + uv_snapshot!(context.filters(), context.add().arg("requests==2.31.0"), @" success: true exit_code: 0 ----- stdout ----- @@ -11596,7 +11598,7 @@ fn add_preserves_end_of_line_comment_on_non_last_deps() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -11606,7 +11608,7 @@ fn add_preserves_end_of_line_comment_on_non_last_deps() -> Result<()> { "requests==2.31.0", "sniffio==1.3.1", ] - "### + "# ); }); Ok(()) @@ -11625,7 +11627,7 @@ fn add_direct_url_subdirectory() -> Result<()> { dependencies = [] "#})?; - uv_snapshot!(context.filters(), context.add().arg("root @ https://github.com/user-attachments/files/18216295/subdirectory-test.tar.gz#subdirectory=packages/root"), @r" + uv_snapshot!(context.filters(), context.add().arg("root @ https://github.com/user-attachments/files/18216295/subdirectory-test.tar.gz#subdirectory=packages/root"), @" success: true exit_code: 0 ----- stdout ----- @@ -11646,7 +11648,7 @@ fn add_direct_url_subdirectory() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -11657,7 +11659,7 @@ fn add_direct_url_subdirectory() -> Result<()> { [tool.uv.sources] root = { url = "https://github.com/user-attachments/files/18216295/subdirectory-test.tar.gz", subdirectory = "packages/root" } - "### + "# ); }); @@ -11733,7 +11735,7 @@ fn add_direct_url_subdirectory() -> Result<()> { }); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -11758,7 +11760,7 @@ fn add_direct_url_subdirectory_raw() -> Result<()> { dependencies = [] "#})?; - uv_snapshot!(context.filters(), context.add().arg("root @ https://github.com/user-attachments/files/18216295/subdirectory-test.tar.gz#subdirectory=packages/root").arg("--raw-sources"), @r" + uv_snapshot!(context.filters(), context.add().arg("root @ https://github.com/user-attachments/files/18216295/subdirectory-test.tar.gz#subdirectory=packages/root").arg("--raw-sources"), @" success: true exit_code: 0 ----- stdout ----- @@ -11779,7 +11781,7 @@ fn add_direct_url_subdirectory_raw() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -11787,7 +11789,7 @@ fn add_direct_url_subdirectory_raw() -> Result<()> { dependencies = [ "root @ https://github.com/user-attachments/files/18216295/subdirectory-test.tar.gz#subdirectory=packages/root", ] - "### + "# ); }); @@ -11863,7 +11865,7 @@ fn add_direct_url_subdirectory_raw() -> Result<()> { }); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -11892,7 +11894,7 @@ fn add_preserves_open_bracket_comment() -> Result<()> { ] "#})?; - uv_snapshot!(context.filters(), context.add().arg("requests==2.31.0"), @r" + uv_snapshot!(context.filters(), context.add().arg("requests==2.31.0"), @" success: true exit_code: 0 ----- stdout ----- @@ -11916,7 +11918,7 @@ fn add_preserves_open_bracket_comment() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -11927,7 +11929,7 @@ fn add_preserves_open_bracket_comment() -> Result<()> { # comment 3 "requests==2.31.0", ] - "### + "# ); }); Ok(()) @@ -11949,7 +11951,7 @@ fn add_preserves_empty_comment() -> Result<()> { ] "#})?; - uv_snapshot!(context.filters(), context.add().arg("anyio==3.7.0"), @r" + uv_snapshot!(context.filters(), context.add().arg("anyio==3.7.0"), @" success: true exit_code: 0 ----- stdout ----- @@ -12004,7 +12006,7 @@ fn add_preserves_trailing_comment() -> Result<()> { ] "#})?; - uv_snapshot!(context.filters(), context.add().arg("anyio==3.7.0"), @r" + uv_snapshot!(context.filters(), context.add().arg("anyio==3.7.0"), @" success: true exit_code: 0 ----- stdout ----- @@ -12025,7 +12027,7 @@ fn add_preserves_trailing_comment() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -12037,11 +12039,11 @@ fn add_preserves_trailing_comment() -> Result<()> { # First line. # Second line. ] - "### + "# ); }); - uv_snapshot!(context.filters(), context.add().arg("typing-extensions"), @r" + uv_snapshot!(context.filters(), context.add().arg("typing-extensions"), @" success: true exit_code: 0 ----- stdout ----- @@ -12059,7 +12061,7 @@ fn add_preserves_trailing_comment() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -12072,7 +12074,7 @@ fn add_preserves_trailing_comment() -> Result<()> { # Second line. "typing-extensions>=4.10.0", ] - "### + "# ); }); @@ -12097,7 +12099,7 @@ fn add_preserves_trailing_depth() -> Result<()> { ] "#})?; - uv_snapshot!(context.filters(), context.add().arg("anyio==3.7.0"), @r" + uv_snapshot!(context.filters(), context.add().arg("anyio==3.7.0"), @" success: true exit_code: 0 ----- stdout ----- @@ -12118,7 +12120,7 @@ fn add_preserves_trailing_depth() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -12130,7 +12132,7 @@ fn add_preserves_trailing_depth() -> Result<()> { # First line. # Second line. ] - "### + "# ); }); @@ -12153,7 +12155,7 @@ fn add_preserves_first_own_line_comment() -> Result<()> { ] "#})?; - uv_snapshot!(context.filters(), context.add().arg("charset-normalizer"), @r###" + uv_snapshot!(context.filters(), context.add().arg("charset-normalizer"), @" success: true exit_code: 0 ----- stdout ----- @@ -12164,7 +12166,7 @@ fn add_preserves_first_own_line_comment() -> Result<()> { Installed 2 packages in [TIME] + charset-normalizer==3.3.2 + sniffio==1.3.1 - "###); + "); let pyproject_toml = context.read("pyproject.toml"); @@ -12172,7 +12174,7 @@ fn add_preserves_first_own_line_comment() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -12182,7 +12184,7 @@ fn add_preserves_first_own_line_comment() -> Result<()> { # comment "sniffio==1.3.1", ] - "### + "# ); }); Ok(()) @@ -12203,7 +12205,7 @@ fn add_preserves_first_line_bracket_comment() -> Result<()> { ] "#})?; - uv_snapshot!(context.filters(), context.add().arg("charset-normalizer"), @r###" + uv_snapshot!(context.filters(), context.add().arg("charset-normalizer"), @" success: true exit_code: 0 ----- stdout ----- @@ -12214,7 +12216,7 @@ fn add_preserves_first_line_bracket_comment() -> Result<()> { Installed 2 packages in [TIME] + charset-normalizer==3.3.2 + sniffio==1.3.1 - "###); + "); let pyproject_toml = context.read("pyproject.toml"); @@ -12222,7 +12224,7 @@ fn add_preserves_first_line_bracket_comment() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -12231,7 +12233,7 @@ fn add_preserves_first_line_bracket_comment() -> Result<()> { "charset-normalizer>=3.3.2", "sniffio==1.3.1", ] - "### + "# ); }); Ok(()) @@ -12252,7 +12254,7 @@ fn add_no_indent() -> Result<()> { ] "#})?; - uv_snapshot!(context.filters(), context.add().arg("charset-normalizer"), @r###" + uv_snapshot!(context.filters(), context.add().arg("charset-normalizer"), @" success: true exit_code: 0 ----- stdout ----- @@ -12263,7 +12265,7 @@ fn add_no_indent() -> Result<()> { Installed 2 packages in [TIME] + charset-normalizer==3.3.2 + sniffio==1.3.1 - "###); + "); let pyproject_toml = context.read("pyproject.toml"); @@ -12271,7 +12273,7 @@ fn add_no_indent() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -12280,7 +12282,7 @@ fn add_no_indent() -> Result<()> { "charset-normalizer>=3.3.2", "sniffio==1.3.1", ] - "### + "# ); }); Ok(()) @@ -12300,7 +12302,7 @@ fn remove_requirement() -> Result<()> { dependencies = ["flask"] "#})?; - uv_snapshot!(context.filters(), context.remove().arg("flask[dotenv]"), @r" + uv_snapshot!(context.filters(), context.remove().arg("flask[dotenv]"), @" success: true exit_code: 0 ----- stdout ----- @@ -12316,13 +12318,13 @@ fn remove_requirement() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" requires-python = ">=3.12" dependencies = [] - "### + "# ); }); @@ -12348,7 +12350,7 @@ fn remove_all_with_comments() -> Result<()> { ] "#})?; - uv_snapshot!(context.filters(), context.remove().arg("duct").arg("minilog"), @r" + uv_snapshot!(context.filters(), context.remove().arg("duct").arg("minilog"), @" success: true exit_code: 0 ----- stdout ----- @@ -12364,7 +12366,7 @@ fn remove_all_with_comments() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -12373,7 +12375,7 @@ fn remove_all_with_comments() -> Result<()> { # foo # bar ] - "### + "# ); }); @@ -12403,7 +12405,7 @@ fn multiple_index_cli() -> Result<()> { .arg("--index") .arg("https://test.pypi.org/simple") .arg("--index") - .arg("https://pypi.org/simple"), @r" + .arg("https://pypi.org/simple"), @" success: true exit_code: 0 ----- stdout ----- @@ -12477,14 +12479,14 @@ fn multiple_index_cli() -> Result<()> { }); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Audited 1 package in [TIME] - "###); + "); Ok(()) } @@ -12516,7 +12518,7 @@ fn repeated_index_cli_environment_variable() -> Result<()> { .arg("--index") .arg("https://test.pypi.org/simple") // With a trailing slash. - .env(EnvVars::UV_DEFAULT_INDEX, "https://test.pypi.org/simple/"), @r###" + .env(EnvVars::UV_DEFAULT_INDEX, "https://test.pypi.org/simple/"), @" success: true exit_code: 0 ----- stdout ----- @@ -12526,7 +12528,7 @@ fn repeated_index_cli_environment_variable() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + iniconfig==2.0.0 - "###); + "); let pyproject_toml = context.read("pyproject.toml"); @@ -12534,7 +12536,7 @@ fn repeated_index_cli_environment_variable() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -12546,7 +12548,7 @@ fn repeated_index_cli_environment_variable() -> Result<()> { [[tool.uv.index]] url = "https://test.pypi.org/simple" default = true - "### + "# ); }); @@ -12588,14 +12590,14 @@ fn repeated_index_cli_environment_variable() -> Result<()> { }); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Audited 1 package in [TIME] - "###); + "); Ok(()) } @@ -12623,7 +12625,7 @@ fn repeated_index_cli_environment_variable_newline() -> Result<()> { uv_snapshot!(context.filters(), context .add() .env(EnvVars::UV_INDEX, "https://test.pypi.org/simple\nhttps://test.pypi.org/simple/") - .arg("iniconfig"), @r###" + .arg("iniconfig"), @" success: true exit_code: 0 ----- stdout ----- @@ -12633,7 +12635,7 @@ fn repeated_index_cli_environment_variable_newline() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + iniconfig==2.0.0 - "###); + "); let pyproject_toml = context.read("pyproject.toml"); @@ -12641,7 +12643,7 @@ fn repeated_index_cli_environment_variable_newline() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -12652,7 +12654,7 @@ fn repeated_index_cli_environment_variable_newline() -> Result<()> { [[tool.uv.index]] url = "https://test.pypi.org/simple" - "### + "# ); }); @@ -12694,14 +12696,14 @@ fn repeated_index_cli_environment_variable_newline() -> Result<()> { }); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Audited 1 package in [TIME] - "###); + "); Ok(()) } @@ -12733,7 +12735,7 @@ fn repeated_index_cli() -> Result<()> { .arg("https://test.pypi.org/simple") // With a trailing slash. .arg("--index") - .arg("https://test.pypi.org/simple/"), @r###" + .arg("https://test.pypi.org/simple/"), @" success: true exit_code: 0 ----- stdout ----- @@ -12743,7 +12745,7 @@ fn repeated_index_cli() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + iniconfig==2.0.0 - "###); + "); let pyproject_toml = context.read("pyproject.toml"); @@ -12751,7 +12753,7 @@ fn repeated_index_cli() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -12762,7 +12764,7 @@ fn repeated_index_cli() -> Result<()> { [[tool.uv.index]] url = "https://test.pypi.org/simple" - "### + "# ); }); @@ -12804,14 +12806,14 @@ fn repeated_index_cli() -> Result<()> { }); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Audited 1 package in [TIME] - "###); + "); Ok(()) } @@ -12843,7 +12845,7 @@ fn repeated_index_cli_reversed() -> Result<()> { .arg("https://test.pypi.org/simple/") // Without a trailing slash. .arg("--index") - .arg("https://test.pypi.org/simple"), @r###" + .arg("https://test.pypi.org/simple"), @" success: true exit_code: 0 ----- stdout ----- @@ -12853,7 +12855,7 @@ fn repeated_index_cli_reversed() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + iniconfig==2.0.0 - "###); + "); let pyproject_toml = context.read("pyproject.toml"); @@ -12861,7 +12863,7 @@ fn repeated_index_cli_reversed() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "project" version = "0.1.0" @@ -12872,7 +12874,7 @@ fn repeated_index_cli_reversed() -> Result<()> { [[tool.uv.index]] url = "https://test.pypi.org/simple/" - "### + "# ); }); @@ -12914,14 +12916,14 @@ fn repeated_index_cli_reversed() -> Result<()> { }); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Audited 1 package in [TIME] - "###); + "); Ok(()) } @@ -12942,7 +12944,7 @@ fn add_with_build_constraints() -> Result<()> { build-constraint-dependencies = ["setuptools==1"] "#})?; - uv_snapshot!(context.filters(), context.add().arg("requests==1.2"), @r###" + uv_snapshot!(context.filters(), context.add().arg("requests==1.2"), @" success: false exit_code: 1 ----- stdout ----- @@ -12953,7 +12955,7 @@ fn add_with_build_constraints() -> Result<()> { ├─▶ No solution found when resolving: `setuptools>=40.8.0` ╰─▶ Because you require setuptools>=40.8.0 and setuptools==1, we can conclude that your requirements are unsatisfiable. help: If you want to add the package regardless of the failed resolution, provide the `--frozen` flag to skip locking and syncing. - "###); + "); let pyproject_toml = context.temp_dir.child("pyproject.toml"); pyproject_toml.write_str(indoc! {r#" @@ -12967,7 +12969,7 @@ fn add_with_build_constraints() -> Result<()> { build-constraint-dependencies = ["setuptools>=40"] "#})?; - uv_snapshot!(context.filters(), context.add().arg("requests==1.2"), @r###" + uv_snapshot!(context.filters(), context.add().arg("requests==1.2"), @" success: true exit_code: 0 ----- stdout ----- @@ -12977,7 +12979,7 @@ fn add_with_build_constraints() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + requests==1.2.0 - "###); + "); Ok(()) } @@ -12989,7 +12991,7 @@ fn add_unsupported_git_scheme() { context.init().arg(".").assert().success(); - uv_snapshot!(context.filters(), context.add().arg("git+fantasy://ferris/dreams/of/urls@7701ffcbae245819b828dc5f885a5201158897ef"), @r###" + uv_snapshot!(context.filters(), context.add().arg("git+fantasy://ferris/dreams/of/urls@7701ffcbae245819b828dc5f885a5201158897ef"), @" success: false exit_code: 2 ----- stdout ----- @@ -12999,7 +13001,7 @@ fn add_unsupported_git_scheme() { Caused by: Unsupported Git URL scheme `fantasy:` in `fantasy://ferris/dreams/of/urls` (expected one of `https:`, `ssh:`, or `file:`) git+fantasy://ferris/dreams/of/urls@7701ffcbae245819b828dc5f885a5201158897ef ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - "###); + "); } #[test] @@ -13040,7 +13042,7 @@ fn add_index_url_in_keyring() -> Result<()> { uv_snapshot!(context.add().arg("anyio") .env(EnvVars::index_username("PROXY"), "public") .env(EnvVars::KEYRING_TEST_CREDENTIALS, r#"{"https://pypi-proxy.fly.dev/basic-auth/simple": {"public": "heron"}}"#) - .env(EnvVars::PATH, venv_bin_path(&keyring_context.venv)), @r" + .env(EnvVars::PATH, venv_bin_path(&keyring_context.venv)), @" success: true exit_code: 0 ----- stdout ----- @@ -13098,7 +13100,7 @@ fn add_full_url_in_keyring() -> Result<()> { uv_snapshot!(context.add().arg("anyio") .env(EnvVars::index_username("PROXY"), "public") .env(EnvVars::KEYRING_TEST_CREDENTIALS, r#"{"https://pypi-proxy.fly.dev/basic-auth/simple/anyio": {"public": "heron"}}"#) - .env(EnvVars::PATH, venv_bin_path(&keyring_context.venv)), @r" + .env(EnvVars::PATH, venv_bin_path(&keyring_context.venv)), @" success: false exit_code: 1 ----- stdout ----- @@ -13135,7 +13137,7 @@ fn add_stop_index_search_early_on_auth_failure() -> Result<()> { "# })?; - uv_snapshot!(context.add().arg("anyio"), @r" + uv_snapshot!(context.add().arg("anyio"), @" success: false exit_code: 1 ----- stdout ----- @@ -13171,7 +13173,7 @@ fn add_ignore_error_codes() -> Result<()> { "# })?; - uv_snapshot!(context.add().arg("anyio"), @r" + uv_snapshot!(context.add().arg("anyio"), @" success: true exit_code: 0 ----- stdout ----- @@ -13216,7 +13218,7 @@ fn add_empty_ignore_error_codes() -> Result<()> { // The default behavior of ignoring pytorch 403s has been overridden // by the empty ignore-error-codes list. - uv_snapshot!(context.add().arg("flask"), @r" + uv_snapshot!(context.add().arg("flask"), @" success: false exit_code: 1 ----- stdout ----- @@ -13255,7 +13257,7 @@ fn add_missing_package_on_pytorch() -> Result<()> { "# })?; - uv_snapshot!(context.add().arg("fakepkg"), @r" + uv_snapshot!(context.add().arg("fakepkg"), @" success: false exit_code: 1 ----- stdout ----- @@ -13293,7 +13295,7 @@ async fn add_unexpected_error_code() -> Result<()> { uv_snapshot!(context.filters(), context.add().arg("anyio").arg("--index").arg(server.uri()) .env_remove(EnvVars::UV_HTTP_RETRIES) - .env(EnvVars::UV_TEST_NO_HTTP_RETRY_DELAY, "true"), @r" + .env(EnvVars::UV_TEST_NO_HTTP_RETRY_DELAY, "true"), @" success: false exit_code: 2 ----- stdout ----- @@ -13327,7 +13329,7 @@ fn add_invalid_ignore_error_code() -> Result<()> { "# })?; - uv_snapshot!(context.add().arg("anyio"), @r" + uv_snapshot!(context.add().arg("anyio"), @" success: false exit_code: 2 ----- stdout ----- @@ -13410,7 +13412,7 @@ fn add_auth_policy_always_with_credentials() -> Result<()> { uv_snapshot!(context.add().arg("anyio") .env(EnvVars::UV_INDEX_MY_INDEX_USERNAME, "public") - .env(EnvVars::UV_INDEX_MY_INDEX_PASSWORD, "heron"), @r" + .env(EnvVars::UV_INDEX_MY_INDEX_PASSWORD, "heron"), @" success: true exit_code: 0 ----- stdout ----- @@ -13451,7 +13453,7 @@ fn add_auth_policy_always_without_credentials() -> Result<()> { "# })?; - uv_snapshot!(context.add().arg("anyio"), @r" + uv_snapshot!(context.add().arg("anyio"), @" success: false exit_code: 2 ----- stdout ----- @@ -13462,7 +13464,7 @@ fn add_auth_policy_always_without_credentials() -> Result<()> { " ); - uv_snapshot!(context.pip_install().arg("black"), @r" + uv_snapshot!(context.pip_install().arg("black"), @" success: false exit_code: 2 ----- stdout ----- @@ -13497,7 +13499,7 @@ fn add_auth_policy_always_with_username_no_password() -> Result<()> { "# })?; - uv_snapshot!(context.add().arg("anyio"), @r" + uv_snapshot!(context.add().arg("anyio"), @" success: false exit_code: 2 ----- stdout ----- @@ -13532,7 +13534,7 @@ fn add_auth_policy_never_with_url_credentials() -> Result<()> { "# })?; - uv_snapshot!(context.add().arg("anyio"), @r" + uv_snapshot!(context.add().arg("anyio"), @" success: false exit_code: 2 ----- stdout ----- @@ -13570,7 +13572,7 @@ fn add_auth_policy_never_with_env_var_credentials() -> Result<()> { uv_snapshot!(context.add().arg("anyio") .env(EnvVars::UV_INDEX_MY_INDEX_USERNAME, "public") - .env(EnvVars::UV_INDEX_MY_INDEX_PASSWORD, "heron"), @r" + .env(EnvVars::UV_INDEX_MY_INDEX_PASSWORD, "heron"), @" success: false exit_code: 1 ----- stdout ----- @@ -13609,7 +13611,7 @@ fn add_auth_policy_never_without_credentials() -> Result<()> { "# })?; - uv_snapshot!(context.add().arg("anyio"), @r" + uv_snapshot!(context.add().arg("anyio"), @" success: true exit_code: 0 ----- stdout ----- @@ -13664,7 +13666,7 @@ async fn add_redirect_cross_origin() -> Result<()> { let _ = redirect_url.set_username("public"); let _ = redirect_url.set_password(Some("heron")); - uv_snapshot!(filters, context.add().arg("--default-index").arg(redirect_url.as_str()).arg("anyio"), @r" + uv_snapshot!(filters, context.add().arg("--default-index").arg(redirect_url.as_str()).arg("anyio"), @" success: false exit_code: 1 ----- stdout ----- @@ -13718,7 +13720,7 @@ async fn add_redirect_cross_origin_credentials_in_location() -> Result<()> { let redirect_url = Url::parse(&redirect_server.uri())?; - uv_snapshot!(filters, context.add().arg("--default-index").arg(redirect_url.as_str()).arg("anyio"), @r" + uv_snapshot!(filters, context.add().arg("--default-index").arg(redirect_url.as_str()).arg("anyio"), @" success: true exit_code: 0 ----- stdout ----- @@ -13791,7 +13793,7 @@ async fn add_redirect_with_keyring_cross_origin() -> Result<()> { .arg(redirect_url.as_str()) .arg("anyio") .env(EnvVars::KEYRING_TEST_CREDENTIALS, r#"{"pypi-proxy.fly.dev": {"public": "heron"}}"#) - .env(EnvVars::PATH, venv_bin_path(&keyring_context.venv)), @r" + .env(EnvVars::PATH, venv_bin_path(&keyring_context.venv)), @" success: false exit_code: 1 ----- stdout ----- @@ -13842,7 +13844,7 @@ async fn pip_install_redirect_with_netrc_cross_origin() -> Result<()> { .arg("--index-url") .arg(redirect_url.as_str()) .env(EnvVars::NETRC, netrc.to_str().unwrap()) - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -13854,7 +13856,7 @@ async fn pip_install_redirect_with_netrc_cross_origin() -> Result<()> { + anyio==4.3.0 + idna==3.6 + sniffio==1.3.1 - "### + " ); context.assert_command("import anyio").success(); @@ -13899,7 +13901,7 @@ fn add_ambiguous() -> Result<()> { bar = ["anyio>=4.1.0", "anyio>=4.2.0"] "#})?; - uv_snapshot!(context.filters(), context.add().arg("anyio"), @r###" + uv_snapshot!(context.filters(), context.add().arg("anyio"), @" success: false exit_code: 2 ----- stdout ----- @@ -13908,9 +13910,9 @@ fn add_ambiguous() -> Result<()> { error: Cannot perform ambiguous update; found multiple entries for `anyio`: - `anyio>=4.0.0` - `anyio>=4.1.0` - "###); + "); - uv_snapshot!(context.filters(), context.add().arg("--group").arg("bar").arg("anyio"), @r###" + uv_snapshot!(context.filters(), context.add().arg("--group").arg("bar").arg("anyio"), @" success: false exit_code: 2 ----- stdout ----- @@ -13919,7 +13921,7 @@ fn add_ambiguous() -> Result<()> { error: Cannot perform ambiguous update; found multiple entries for `anyio`: - `anyio>=4.1.0` - `anyio>=4.2.0` - "###); + "); Ok(()) } @@ -13944,7 +13946,7 @@ fn add_optional_normalize() -> Result<()> { "#})?; // Add with a non-normalized group name. - uv_snapshot!(context.filters(), context.add().arg("iniconfig").arg("--optional").arg("cloud_export_to_parquet"), @r" + uv_snapshot!(context.filters(), context.add().arg("iniconfig").arg("--optional").arg("cloud_export_to_parquet"), @" success: true exit_code: 0 ----- stdout ----- @@ -13977,7 +13979,7 @@ fn add_optional_normalize() -> Result<()> { ); // Add with a normalized group name (which doesn't match the `pyproject.toml`). - uv_snapshot!(context.filters(), context.add().arg("typing-extensions").arg("--optional").arg("cloud-export-to-parquet"), @r" + uv_snapshot!(context.filters(), context.add().arg("typing-extensions").arg("--optional").arg("cloud-export-to-parquet"), @" success: true exit_code: 0 ----- stdout ----- @@ -14008,7 +14010,7 @@ fn add_optional_normalize() -> Result<()> { ); // Remove with a non-normalized group name. - uv_snapshot!(context.filters(), context.remove().arg("iniconfig").arg("--optional").arg("cloud_export_to_parquet"), @r" + uv_snapshot!(context.filters(), context.remove().arg("iniconfig").arg("--optional").arg("cloud_export_to_parquet"), @" success: true exit_code: 0 ----- stdout ----- @@ -14041,7 +14043,7 @@ fn add_optional_normalize() -> Result<()> { ); // Remove with a normalized group name (which doesn't match the `pyproject.toml`). - uv_snapshot!(context.filters(), context.remove().arg("typing-extensions").arg("--optional").arg("cloud-export-to-parquet"), @r" + uv_snapshot!(context.filters(), context.remove().arg("typing-extensions").arg("--optional").arg("cloud-export-to-parquet"), @" success: true exit_code: 0 ----- stdout ----- @@ -14088,7 +14090,7 @@ fn add_bounds() -> Result<()> { requires-python = ">=3.12" "#})?; - uv_snapshot!(context.filters(), context.add().arg("idna"), @r" + uv_snapshot!(context.filters(), context.add().arg("idna"), @" success: true exit_code: 0 ----- stdout ----- @@ -14128,7 +14130,7 @@ fn add_bounds() -> Result<()> { add-bounds = "major" "#})?; - uv_snapshot!(context.filters(), context.add().arg("anyio"), @r" + uv_snapshot!(context.filters(), context.add().arg("anyio"), @" success: true exit_code: 0 ----- stdout ----- @@ -14159,7 +14161,7 @@ fn add_bounds() -> Result<()> { ); // Existing constraints take precedence over the bounds option - uv_snapshot!(context.filters(), context.add().arg("anyio").arg("--bounds").arg("minor").arg("--preview"), @r" + uv_snapshot!(context.filters(), context.add().arg("anyio").arg("--bounds").arg("minor").arg("--preview"), @" success: true exit_code: 0 ----- stdout ----- @@ -14186,7 +14188,7 @@ fn add_bounds() -> Result<()> { ); // Explicit constraints take precedence over the bounds option - uv_snapshot!(context.filters(), context.add().arg("anyio==4.2").arg("idna").arg("--bounds").arg("minor").arg("--preview"), @r" + uv_snapshot!(context.filters(), context.add().arg("anyio==4.2").arg("idna").arg("--bounds").arg("minor").arg("--preview"), @" success: true exit_code: 0 ----- stdout ----- @@ -14218,7 +14220,7 @@ fn add_bounds() -> Result<()> { ); // Set bounds on the CLI and use `--preview` to silence the warning. - uv_snapshot!(context.filters(), context.add().arg("sniffio").arg("--bounds").arg("minor").arg("--preview"), @r" + uv_snapshot!(context.filters(), context.add().arg("sniffio").arg("--bounds").arg("minor").arg("--preview"), @" success: true exit_code: 0 ----- stdout ----- @@ -14267,7 +14269,7 @@ fn add_bounds_requirement_over_bounds_kind() -> Result<()> { requires-python = ">=3.12" "#})?; - uv_snapshot!(context.filters(), context.add().arg("anyio==4.2").arg("idna").arg("--bounds").arg("minor").arg("--preview"), @r" + uv_snapshot!(context.filters(), context.add().arg("anyio==4.2").arg("idna").arg("--bounds").arg("minor").arg("--preview"), @" success: true exit_code: 0 ----- stdout ----- @@ -14347,7 +14349,7 @@ fn add_path_with_existing_workspace() -> Result<()> { uv_snapshot!(context.filters(), context .add() .current_dir(&project_dir) - .arg("../dep"), @r" + .arg("../dep"), @" success: true exit_code: 0 ----- stdout ----- @@ -14426,7 +14428,7 @@ fn add_path_with_workspace() -> Result<()> { uv_snapshot!(context.filters(), context .add() .arg("./dep") - .arg("--workspace"), @r" + .arg("--workspace"), @" success: true exit_code: 0 ----- stdout ----- @@ -14494,7 +14496,7 @@ fn add_path_within_workspace_defaults_to_workspace() -> Result<()> { // since it's within the workspace directory. uv_snapshot!(context.filters(), context .add() - .arg("./dep"), @r" + .arg("./dep"), @" success: true exit_code: 0 ----- stdout ----- @@ -14562,7 +14564,7 @@ fn add_path_with_no_workspace() -> Result<()> { uv_snapshot!(context.filters(), context .add() .arg("./dep") - .arg("--no-workspace"), @r" + .arg("--no-workspace"), @" success: true exit_code: 0 ----- stdout ----- @@ -14633,7 +14635,7 @@ fn add_path_outside_workspace_no_default() -> Result<()> { uv_snapshot!(context.filters(), context .add() .current_dir(&workspace_dir) - .arg("../external_dep"), @r" + .arg("../external_dep"), @" success: true exit_code: 0 ----- stdout ----- @@ -14685,7 +14687,7 @@ fn add_multiline_indentation() -> Result<()> { dev = ["ruff", "typing-extensions"] "#})?; - uv_snapshot!(context.filters(), context.add().arg("iniconfig").arg("--dev"), @r" + uv_snapshot!(context.filters(), context.add().arg("iniconfig").arg("--dev"), @" success: true exit_code: 0 ----- stdout ----- @@ -14749,7 +14751,7 @@ fn add_no_install_project() -> Result<()> { .child("__init__.py") .touch()?; - uv_snapshot!(context.filters(), context.add().arg("iniconfig").arg("--no-install-project"), @r" + uv_snapshot!(context.filters(), context.add().arg("iniconfig").arg("--no-install-project"), @" success: true exit_code: 0 ----- stdout ----- @@ -14838,17 +14840,17 @@ fn add_git_lfs_error() -> Result<()> { "#})?; // Request lfs (via arg) without a Git source. - uv_snapshot!(context.filters(), context.add().arg("typing-extensions").arg("--lfs"), @r###" + uv_snapshot!(context.filters(), context.add().arg("typing-extensions").arg("--lfs"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: `typing-extensions` did not resolve to a Git repository, but a Git extension (`--lfs`) was provided. - "###); + "); // Request lfs (via env var) without a Git source. - uv_snapshot!(context.filters(), context.add().arg("typing-extensions").env(EnvVars::UV_GIT_LFS, "true"), @r" + uv_snapshot!(context.filters(), context.add().arg("typing-extensions").env(EnvVars::UV_GIT_LFS, "true"), @" success: true exit_code: 0 ----- stdout ----- @@ -14861,24 +14863,24 @@ fn add_git_lfs_error() -> Result<()> { "); // Request lfs (both arg and env var) without a Git source. - uv_snapshot!(context.filters(), context.add().arg("typing-extensions").env(EnvVars::UV_GIT_LFS, "true").arg("--lfs"), @r###" + uv_snapshot!(context.filters(), context.add().arg("typing-extensions").env(EnvVars::UV_GIT_LFS, "true").arg("--lfs"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: `typing-extensions` did not resolve to a Git repository, but a Git extension (`--lfs`) was provided. - "###); + "); // Request lfs from arg and disable lfs from env var (should be ignored) without a Git source. - uv_snapshot!(context.filters(), context.add().arg("typing-extensions").env(EnvVars::UV_GIT_LFS, "false").arg("--lfs"), @r###" + uv_snapshot!(context.filters(), context.add().arg("typing-extensions").env(EnvVars::UV_GIT_LFS, "false").arg("--lfs"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: `typing-extensions` did not resolve to a Git repository, but a Git extension (`--lfs`) was provided. - "###); + "); Ok(()) } diff --git a/crates/uv/tests/it/export.rs b/crates/uv/tests/it/export.rs index ef7f02248..ce85a2806 100644 --- a/crates/uv/tests/it/export.rs +++ b/crates/uv/tests/it/export.rs @@ -36,7 +36,7 @@ fn requirements_txt_dependency() -> Result<()> { context.lock().assert().success(); - uv_snapshot!(context.filters(), context.export(), @r###" + uv_snapshot!(context.filters(), context.export(), @r" success: true exit_code: 0 ----- stdout ----- @@ -58,7 +58,7 @@ fn requirements_txt_dependency() -> Result<()> { ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); Ok(()) } @@ -84,7 +84,7 @@ fn requirements_txt_export_no_header() -> Result<()> { context.lock().assert().success(); - uv_snapshot!(context.filters(), context.export().arg("--no-header"), @r###" + uv_snapshot!(context.filters(), context.export().arg("--no-header"), @r" success: true exit_code: 0 ----- stdout ----- @@ -104,7 +104,7 @@ fn requirements_txt_export_no_header() -> Result<()> { ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); Ok(()) } @@ -130,7 +130,7 @@ fn requirements_txt_dependency_extra() -> Result<()> { context.lock().assert().success(); - uv_snapshot!(context.filters(), context.export(), @r###" + uv_snapshot!(context.filters(), context.export(), @r" success: true exit_code: 0 ----- stdout ----- @@ -187,7 +187,7 @@ fn requirements_txt_dependency_extra() -> Result<()> { ----- stderr ----- Resolved 10 packages in [TIME] - "###); + "); Ok(()) } @@ -217,7 +217,7 @@ fn requirements_txt_project_extra() -> Result<()> { context.lock().assert().success(); - uv_snapshot!(context.filters(), context.export(), @r###" + uv_snapshot!(context.filters(), context.export(), @r" success: true exit_code: 0 ----- stdout ----- @@ -231,9 +231,9 @@ fn requirements_txt_project_extra() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] - "###); + "); - uv_snapshot!(context.filters(), context.export().arg("--extra").arg("pytest").arg("--extra").arg("async").arg("--no-extra").arg("pytest"), @r###" + uv_snapshot!(context.filters(), context.export().arg("--extra").arg("pytest").arg("--extra").arg("async").arg("--no-extra").arg("pytest"), @r" success: true exit_code: 0 ----- stdout ----- @@ -259,9 +259,9 @@ fn requirements_txt_project_extra() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] - "###); + "); - uv_snapshot!(context.filters(), context.export().arg("--extra").arg("pytest"), @r###" + uv_snapshot!(context.filters(), context.export().arg("--extra").arg("pytest"), @r" success: true exit_code: 0 ----- stdout ----- @@ -279,9 +279,9 @@ fn requirements_txt_project_extra() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] - "###); + "); - uv_snapshot!(context.filters(), context.export().arg("--all-extras"), @r###" + uv_snapshot!(context.filters(), context.export().arg("--all-extras"), @r" success: true exit_code: 0 ----- stdout ----- @@ -311,9 +311,9 @@ fn requirements_txt_project_extra() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] - "###); + "); - uv_snapshot!(context.filters(), context.export().arg("--all-extras").arg("--no-extra").arg("pytest"), @r###" + uv_snapshot!(context.filters(), context.export().arg("--all-extras").arg("--no-extra").arg("pytest"), @r" success: true exit_code: 0 ----- stdout ----- @@ -339,7 +339,7 @@ fn requirements_txt_project_extra() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] - "###); + "); Ok(()) } @@ -378,7 +378,7 @@ fn requirements_txt_prune() -> Result<()> { .arg("--no-hashes") .arg("--prune") .arg("jupyter-core"), - @r" + @" success: true exit_code: 0 ----- stdout ----- @@ -430,7 +430,7 @@ fn requirements_txt_dependency_marker() -> Result<()> { context.lock().assert().success(); - uv_snapshot!(context.filters(), context.export(), @r###" + uv_snapshot!(context.filters(), context.export(), @r" success: true exit_code: 0 ----- stdout ----- @@ -456,7 +456,7 @@ fn requirements_txt_dependency_marker() -> Result<()> { ----- stderr ----- Resolved 5 packages in [TIME] - "###); + "); Ok(()) } @@ -486,7 +486,7 @@ fn requirements_txt_dependency_multiple_markers() -> Result<()> { context.lock().assert().success(); // Note that the `python_version > '3.11'` markers disappear due to `requires-python = ">=3.12"` - uv_snapshot!(context.filters(), context.export(), @r###" + uv_snapshot!(context.filters(), context.export(), @r" success: true exit_code: 0 ----- stdout ----- @@ -539,7 +539,7 @@ fn requirements_txt_dependency_multiple_markers() -> Result<()> { ----- stderr ----- Resolved 10 packages in [TIME] - "###); + "); Ok(()) } @@ -566,14 +566,14 @@ fn requirements_txt_dependency_conflicting_markers() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 11 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -731,7 +731,7 @@ fn requirements_txt_dependency_conflicting_markers() -> Result<()> { } ); - uv_snapshot!(context.filters(), context.export(), @r###" + uv_snapshot!(context.filters(), context.export(), @r" success: true exit_code: 0 ----- stdout ----- @@ -783,7 +783,7 @@ fn requirements_txt_dependency_conflicting_markers() -> Result<()> { ----- stderr ----- Resolved 11 packages in [TIME] - "###); + "); Ok(()) } @@ -830,7 +830,7 @@ fn requirements_txt_non_root() -> Result<()> { context.lock().assert().success(); - uv_snapshot!(context.filters(), context.export().arg("--package").arg("child"), @r###" + uv_snapshot!(context.filters(), context.export().arg("--package").arg("child"), @r" success: true exit_code: 0 ----- stdout ----- @@ -844,7 +844,7 @@ fn requirements_txt_non_root() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] - "###); + "); Ok(()) } @@ -891,7 +891,7 @@ fn allrequirements_txt_() -> Result<()> { context.lock().assert().success(); - uv_snapshot!(context.filters(), context.export().arg("--all-packages"), @r###" + uv_snapshot!(context.filters(), context.export().arg("--all-packages"), @r" success: true exit_code: 0 ----- stdout ----- @@ -919,7 +919,7 @@ fn allrequirements_txt_() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] - "###); + "); Ok(()) } @@ -969,7 +969,7 @@ fn requirements_txt_frozen() -> Result<()> { // Remove the child `pyproject.toml`. fs_err::remove_dir_all(child.path())?; - uv_snapshot!(context.filters(), context.export().arg("--all-packages"), @r###" + uv_snapshot!(context.filters(), context.export().arg("--all-packages"), @" success: false exit_code: 1 ----- stdout ----- @@ -978,9 +978,9 @@ fn requirements_txt_frozen() -> Result<()> { × Failed to build `project @ file://[TEMP_DIR]/` ├─▶ Failed to parse entry: `child` ╰─▶ `child` references a workspace in `tool.uv.sources` (e.g., `child = { workspace = true }`), but is not a workspace member - "###); + "); - uv_snapshot!(context.filters(), context.export().arg("--all-packages").arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.export().arg("--all-packages").arg("--frozen"), @r" success: true exit_code: 0 ----- stdout ----- @@ -1007,7 +1007,7 @@ fn requirements_txt_frozen() -> Result<()> { # via anyio ----- stderr ----- - "###); + "); Ok(()) } @@ -1035,7 +1035,7 @@ fn requirements_txt_create_missing_dir() -> Result<()> { uv_snapshot!(context.filters(), context.export() .arg("--output-file") - .arg("requirements/requirements.txt"), @r###" + .arg("requirements/requirements.txt"), @r" success: true exit_code: 0 ----- stdout ----- @@ -1057,7 +1057,7 @@ fn requirements_txt_create_missing_dir() -> Result<()> { ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); // // Read the file contents. let contents = apply_filters( @@ -1070,7 +1070,7 @@ fn requirements_txt_create_missing_dir() -> Result<()> { .unwrap(), context.filters(), ); - insta::assert_snapshot!(contents, @r###" + insta::assert_snapshot!(contents, @r" # This file was autogenerated by uv via the following command: # uv export --cache-dir [CACHE_DIR] --output-file requirements/requirements.txt -e . @@ -1086,7 +1086,7 @@ fn requirements_txt_create_missing_dir() -> Result<()> { --hash=sha256:2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2 \ --hash=sha256:f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc # via anyio - "###); + "); Ok(()) } @@ -1107,7 +1107,7 @@ fn requirements_txt_non_project() -> Result<()> { context.lock().assert().success(); - uv_snapshot!(context.filters(), context.export(), @r###" + uv_snapshot!(context.filters(), context.export(), @" success: true exit_code: 0 ----- stdout ----- @@ -1117,9 +1117,9 @@ fn requirements_txt_non_project() -> Result<()> { ----- stderr ----- warning: No `requires-python` value found in the workspace. Defaulting to `>=3.12`. Resolved 3 packages in [TIME] - "###); + "); - uv_snapshot!(context.filters(), context.export().arg("--group").arg("async"), @r###" + uv_snapshot!(context.filters(), context.export().arg("--group").arg("async"), @r" success: true exit_code: 0 ----- stdout ----- @@ -1140,7 +1140,7 @@ fn requirements_txt_non_project() -> Result<()> { ----- stderr ----- warning: No `requires-python` value found in the workspace. Defaulting to `>=3.12`. Resolved 3 packages in [TIME] - "###); + "); Ok(()) } @@ -1156,7 +1156,7 @@ fn virtual_empty() -> Result<()> { wow = "someconfig" "#})?; - uv_snapshot!(context.filters(), context.export(), @r" + uv_snapshot!(context.filters(), context.export(), @" success: true exit_code: 0 ----- stdout ----- @@ -1259,7 +1259,7 @@ fn requirements_txt_https_git_credentials() -> Result<()> { context.lock().assert().success(); // The token should not be included in the export - uv_snapshot!(context.filters(), context.export(), @r" + uv_snapshot!(context.filters(), context.export(), @" success: true exit_code: 0 ----- stdout ----- @@ -1380,7 +1380,7 @@ fn requirements_txt_ssh_git_username() -> Result<()> { ssh_deploy_key.portable_display() ); - uv_snapshot!(context.filters(), context.export().env(EnvVars::GIT_SSH_COMMAND, git_ssh_command), @r" + uv_snapshot!(context.filters(), context.export().env(EnvVars::GIT_SSH_COMMAND, git_ssh_command), @" success: true exit_code: 0 ----- stdout ----- @@ -1446,7 +1446,7 @@ fn requirements_txt_non_project_marker() -> Result<()> { context.lock().assert().success(); - uv_snapshot!(context.filters(), context.export(), @r###" + uv_snapshot!(context.filters(), context.export(), @" success: true exit_code: 0 ----- stdout ----- @@ -1456,9 +1456,9 @@ fn requirements_txt_non_project_marker() -> Result<()> { ----- stderr ----- warning: No `requires-python` value found in the workspace. Defaulting to `>=3.12`. Resolved 3 packages in [TIME] - "###); + "); - uv_snapshot!(context.filters(), context.export().arg("--group").arg("async"), @r###" + uv_snapshot!(context.filters(), context.export().arg("--group").arg("async"), @r" success: true exit_code: 0 ----- stdout ----- @@ -1479,7 +1479,7 @@ fn requirements_txt_non_project_marker() -> Result<()> { ----- stderr ----- warning: No `requires-python` value found in the workspace. Defaulting to `>=3.12`. Resolved 3 packages in [TIME] - "###); + "); Ok(()) } @@ -1516,7 +1516,7 @@ fn requirements_txt_non_project_workspace() -> Result<()> { context.lock().assert().success(); - uv_snapshot!(context.filters(), context.export(), @r###" + uv_snapshot!(context.filters(), context.export(), @r" success: true exit_code: 0 ----- stdout ----- @@ -1530,9 +1530,9 @@ fn requirements_txt_non_project_workspace() -> Result<()> { ----- stderr ----- Resolved 5 packages in [TIME] - "###); + "); - uv_snapshot!(context.filters(), context.export().arg("--group").arg("async"), @r###" + uv_snapshot!(context.filters(), context.export().arg("--group").arg("async"), @r" success: true exit_code: 0 ----- stdout ----- @@ -1557,7 +1557,7 @@ fn requirements_txt_non_project_workspace() -> Result<()> { ----- stderr ----- Resolved 5 packages in [TIME] - "###); + "); Ok(()) } @@ -1693,7 +1693,7 @@ fn requirements_txt_non_project_fork() -> Result<()> { } ); - uv_snapshot!(context.filters(), context.export(), @r###" + uv_snapshot!(context.filters(), context.export(), @r" success: true exit_code: 0 ----- stdout ----- @@ -1719,9 +1719,9 @@ fn requirements_txt_non_project_fork() -> Result<()> { ----- stderr ----- Resolved 5 packages in [TIME] - "###); + "); - uv_snapshot!(context.filters(), context.export().arg("--group").arg("async"), @r###" + uv_snapshot!(context.filters(), context.export().arg("--group").arg("async"), @r" success: true exit_code: 0 ----- stdout ----- @@ -1747,9 +1747,9 @@ fn requirements_txt_non_project_fork() -> Result<()> { ----- stderr ----- Resolved 5 packages in [TIME] - "###); + "); - uv_snapshot!(context.filters(), context.export().arg("--group").arg("async").arg("--prune").arg("child"), @r###" + uv_snapshot!(context.filters(), context.export().arg("--group").arg("async").arg("--prune").arg("child"), @r" success: true exit_code: 0 ----- stdout ----- @@ -1772,9 +1772,9 @@ fn requirements_txt_non_project_fork() -> Result<()> { ----- stderr ----- Resolved 5 packages in [TIME] - "###); + "); - uv_snapshot!(context.filters(), context.export().arg("--prune").arg("child"), @r###" + uv_snapshot!(context.filters(), context.export().arg("--prune").arg("child"), @" success: true exit_code: 0 ----- stdout ----- @@ -1783,7 +1783,7 @@ fn requirements_txt_non_project_fork() -> Result<()> { ----- stderr ----- Resolved 5 packages in [TIME] - "###); + "); Ok(()) } @@ -1830,7 +1830,7 @@ fn requirements_txt_relative_path() -> Result<()> { // Pipe the output to requirements.txt. let file = std::fs::File::create(project.child("requirements.txt")).unwrap(); - uv_snapshot!(context.filters(), context.export().stdout(Stdio::from(file)).current_dir(&project), @r###" + uv_snapshot!(context.filters(), context.export().stdout(Stdio::from(file)).current_dir(&project), @" success: true exit_code: 0 ----- stdout ----- @@ -1838,14 +1838,14 @@ fn requirements_txt_relative_path() -> Result<()> { ----- stderr ----- Using CPython 3.12.[X] interpreter at: [PYTHON-3.12] Resolved 3 packages in [TIME] - "###); + "); // Read the file contents. let contents = apply_filters( fs_err::read_to_string(project.child("requirements.txt")).unwrap(), context.filters(), ); - insta::assert_snapshot!(contents, @r###" + insta::assert_snapshot!(contents, @r" # This file was autogenerated by uv via the following command: # uv export --cache-dir [CACHE_DIR] -e . @@ -1855,10 +1855,10 @@ fn requirements_txt_relative_path() -> Result<()> { --hash=sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3 \ --hash=sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374 # via dependency - "###); + "); // Install the dependencies. - uv_snapshot!(context.filters(), context.pip_install().arg("--requirement").arg("requirements.txt").current_dir(&project), @r###" + uv_snapshot!(context.filters(), context.pip_install().arg("--requirement").arg("requirements.txt").current_dir(&project), @" success: true exit_code: 0 ----- stdout ----- @@ -1871,7 +1871,7 @@ fn requirements_txt_relative_path() -> Result<()> { + dependency==0.1.0 (from file://[TEMP_DIR]/dependency) + iniconfig==2.0.0 + project==0.1.0 (from file://[TEMP_DIR]/project) - "###); + "); Ok(()) } @@ -1992,7 +1992,7 @@ fn requirements_txt_no_hashes() -> Result<()> { context.lock().assert().success(); - uv_snapshot!(context.filters(), context.export().arg("--no-hashes"), @r###" + uv_snapshot!(context.filters(), context.export().arg("--no-hashes"), @" success: true exit_code: 0 ----- stdout ----- @@ -2008,7 +2008,7 @@ fn requirements_txt_no_hashes() -> Result<()> { ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); Ok(()) } @@ -2034,7 +2034,7 @@ fn requirements_txt_output_file() -> Result<()> { context.lock().assert().success(); - uv_snapshot!(context.filters(), context.export().arg("--output-file").arg("requirements.txt"), @r###" + uv_snapshot!(context.filters(), context.export().arg("--output-file").arg("requirements.txt"), @r" success: true exit_code: 0 ----- stdout ----- @@ -2056,10 +2056,10 @@ fn requirements_txt_output_file() -> Result<()> { ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); let contents = apply_filters(context.read("requirements.txt"), context.filters()); - insta::assert_snapshot!(contents, @r###" + 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 -e . @@ -2075,7 +2075,7 @@ fn requirements_txt_output_file() -> Result<()> { --hash=sha256:2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2 \ --hash=sha256:f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc # via anyio - "###); + "); Ok(()) } @@ -2123,7 +2123,7 @@ fn requirements_txt_no_emit() -> Result<()> { context.lock().assert().success(); // Exclude `anyio`. - uv_snapshot!(context.filters(), context.export().arg("--no-emit-package").arg("anyio"), @r###" + uv_snapshot!(context.filters(), context.export().arg("--no-emit-package").arg("anyio"), @r" success: true exit_code: 0 ----- stdout ----- @@ -2147,10 +2147,10 @@ fn requirements_txt_no_emit() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] - "###); + "); // Exclude `project`. - uv_snapshot!(context.filters(), context.export().arg("--no-emit-project"), @r###" + uv_snapshot!(context.filters(), context.export().arg("--no-emit-project"), @r" success: true exit_code: 0 ----- stdout ----- @@ -2177,10 +2177,10 @@ fn requirements_txt_no_emit() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] - "###); + "); // Exclude `child`. - uv_snapshot!(context.filters(), context.export().arg("--no-emit-project").arg("--package").arg("child"), @r###" + uv_snapshot!(context.filters(), context.export().arg("--no-emit-project").arg("--package").arg("child"), @r" success: true exit_code: 0 ----- stdout ----- @@ -2193,10 +2193,10 @@ fn requirements_txt_no_emit() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] - "###); + "); // Exclude the workspace. - uv_snapshot!(context.filters(), context.export().arg("--no-emit-workspace"), @r###" + uv_snapshot!(context.filters(), context.export().arg("--no-emit-workspace"), @r" success: true exit_code: 0 ----- stdout ----- @@ -2221,7 +2221,7 @@ fn requirements_txt_no_emit() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] - "###); + "); // Remove the member. let pyproject_toml = context.temp_dir.child("pyproject.toml"); @@ -2240,7 +2240,7 @@ fn requirements_txt_no_emit() -> Result<()> { )?; // Exclude the workspace. - uv_snapshot!(context.filters(), context.export().arg("--no-emit-workspace"), @r###" + uv_snapshot!(context.filters(), context.export().arg("--no-emit-workspace"), @r" success: true exit_code: 0 ----- stdout ----- @@ -2261,7 +2261,7 @@ fn requirements_txt_no_emit() -> Result<()> { ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); Ok(()) } @@ -2308,7 +2308,7 @@ fn requirements_txt_only_emit() -> Result<()> { context.lock().assert().success(); - uv_snapshot!(context.filters(), context.export().arg("--only-emit-workspace"), @r###" + uv_snapshot!(context.filters(), context.export().arg("--only-emit-workspace"), @" success: true exit_code: 0 ----- stdout ----- @@ -2320,9 +2320,9 @@ fn requirements_txt_only_emit() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] - "###); + "); - uv_snapshot!(context.filters(), context.export().arg("--only-emit-project"), @r###" + uv_snapshot!(context.filters(), context.export().arg("--only-emit-project"), @" success: true exit_code: 0 ----- stdout ----- @@ -2332,9 +2332,9 @@ fn requirements_txt_only_emit() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] - "###); + "); - uv_snapshot!(context.filters(), context.export().arg("--only-emit-package").arg("anyio"), @r###" + uv_snapshot!(context.filters(), context.export().arg("--only-emit-package").arg("anyio"), @r" success: true exit_code: 0 ----- stdout ----- @@ -2347,7 +2347,7 @@ fn requirements_txt_only_emit() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] - "###); + "); Ok(()) } @@ -2394,7 +2394,7 @@ fn requirements_txt_no_editable() -> Result<()> { context.lock().assert().success(); - uv_snapshot!(context.filters(), context.export().arg("--no-editable"), @r###" + uv_snapshot!(context.filters(), context.export().arg("--no-editable"), @r" success: true exit_code: 0 ----- stdout ----- @@ -2422,7 +2422,7 @@ fn requirements_txt_no_editable() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] - "###); + "); Ok(()) } @@ -2449,7 +2449,7 @@ fn requirements_txt_export_group() -> Result<()> { context.lock().assert().success(); - uv_snapshot!(context.filters(), context.export(), @r###" + uv_snapshot!(context.filters(), context.export(), @r" success: true exit_code: 0 ----- stdout ----- @@ -2465,9 +2465,9 @@ fn requirements_txt_export_group() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] - "###); + "); - uv_snapshot!(context.filters(), context.export().arg("--only-group").arg("bar"), @r###" + uv_snapshot!(context.filters(), context.export().arg("--only-group").arg("bar"), @r" success: true exit_code: 0 ----- stdout ----- @@ -2479,9 +2479,9 @@ fn requirements_txt_export_group() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] - "###); + "); - uv_snapshot!(context.filters(), context.export().arg("--group").arg("foo"), @r###" + uv_snapshot!(context.filters(), context.export().arg("--group").arg("foo"), @r" success: true exit_code: 0 ----- stdout ----- @@ -2505,9 +2505,9 @@ fn requirements_txt_export_group() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] - "###); + "); - uv_snapshot!(context.filters(), context.export().arg("--group").arg("foo").arg("--group").arg("bar"), @r###" + uv_snapshot!(context.filters(), context.export().arg("--group").arg("foo").arg("--group").arg("bar"), @r" success: true exit_code: 0 ----- stdout ----- @@ -2534,9 +2534,9 @@ fn requirements_txt_export_group() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] - "###); + "); - uv_snapshot!(context.filters(), context.export().arg("--all-groups"), @r###" + uv_snapshot!(context.filters(), context.export().arg("--all-groups"), @r" success: true exit_code: 0 ----- stdout ----- @@ -2563,9 +2563,9 @@ fn requirements_txt_export_group() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] - "###); + "); - uv_snapshot!(context.filters(), context.export().arg("--all-groups").arg("--no-group").arg("bar"), @r###" + uv_snapshot!(context.filters(), context.export().arg("--all-groups").arg("--no-group").arg("bar"), @r" success: true exit_code: 0 ----- stdout ----- @@ -2589,9 +2589,9 @@ fn requirements_txt_export_group() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] - "###); + "); - uv_snapshot!(context.filters(), context.export().arg("--all-groups").arg("--no-group").arg("baz"), @r###" + uv_snapshot!(context.filters(), context.export().arg("--all-groups").arg("--no-group").arg("baz"), @" success: false exit_code: 2 ----- stdout ----- @@ -2599,7 +2599,7 @@ fn requirements_txt_export_group() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] error: Group `baz` is not defined in the project's `dependency-groups` table - "###); + "); Ok(()) } @@ -2619,7 +2619,7 @@ fn requirements_txt_script() -> Result<()> { # /// "#})?; - uv_snapshot!(context.filters(), context.export().arg("--script").arg(script.path()), @r###" + uv_snapshot!(context.filters(), context.export().arg("--script").arg(script.path()), @r" success: true exit_code: 0 ----- stdout ----- @@ -2642,20 +2642,20 @@ fn requirements_txt_script() -> Result<()> { ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); // If the lockfile didn't exist already, it shouldn't be persisted to disk. assert!(!context.temp_dir.child("uv.lock").exists()); // Explicitly lock the script. - uv_snapshot!(context.filters(), context.lock().arg("--script").arg(script.path()), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--script").arg(script.path()), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); let lock = context.read("script.py.lock"); @@ -2748,7 +2748,7 @@ fn requirements_txt_script() -> Result<()> { "#})?; // `uv tree` should update the lockfile. - uv_snapshot!(context.filters(), context.export().arg("--script").arg(script.path()), @r###" + uv_snapshot!(context.filters(), context.export().arg("--script").arg(script.path()), @r" success: true exit_code: 0 ----- stdout ----- @@ -2774,7 +2774,7 @@ fn requirements_txt_script() -> Result<()> { ----- stderr ----- Resolved 5 packages in [TIME] - "###); + "); let lock = context.read("script.py.lock"); @@ -2900,7 +2900,7 @@ fn requirements_txt_conflicts() -> Result<()> { context.lock().assert().success(); - uv_snapshot!(context.filters(), context.export(), @r###" + uv_snapshot!(context.filters(), context.export(), @r" success: true exit_code: 0 ----- stdout ----- @@ -2914,9 +2914,9 @@ fn requirements_txt_conflicts() -> Result<()> { ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); - uv_snapshot!(context.filters(), context.export().arg("--extra").arg("extra1"), @r###" + uv_snapshot!(context.filters(), context.export().arg("--extra").arg("extra1"), @r" success: true exit_code: 0 ----- stdout ----- @@ -2934,9 +2934,9 @@ fn requirements_txt_conflicts() -> Result<()> { ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); - uv_snapshot!(context.filters(), context.export().arg("--extra").arg("extra2"), @r###" + uv_snapshot!(context.filters(), context.export().arg("--extra").arg("extra2"), @r" success: true exit_code: 0 ----- stdout ----- @@ -2954,9 +2954,9 @@ fn requirements_txt_conflicts() -> Result<()> { ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); - uv_snapshot!(context.filters(), context.export().arg("--extra").arg("extra1").arg("--extra").arg("extra2"), @r###" + uv_snapshot!(context.filters(), context.export().arg("--extra").arg("extra1").arg("--extra").arg("extra2"), @" success: false exit_code: 2 ----- stdout ----- @@ -2964,7 +2964,7 @@ fn requirements_txt_conflicts() -> Result<()> { ----- stderr ----- Resolved 4 packages in [TIME] error: Extras `extra1` and `extra2` are incompatible with the declared conflicts: {`project[extra1]`, `project[extra2]`} - "###); + "); Ok(()) } @@ -3002,7 +3002,7 @@ fn requirements_txt_simple_conflict_markers() -> Result<()> { context.lock().assert().success(); - uv_snapshot!(context.filters(), context.export(), @r###" + uv_snapshot!(context.filters(), context.export(), @r" success: true exit_code: 0 ----- stdout ----- @@ -3023,9 +3023,9 @@ fn requirements_txt_simple_conflict_markers() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] - "###); + "); - uv_snapshot!(context.filters(), context.export().arg("--extra").arg("cpu"), @r###" + uv_snapshot!(context.filters(), context.export().arg("--extra").arg("cpu"), @r" success: true exit_code: 0 ----- stdout ----- @@ -3049,7 +3049,7 @@ fn requirements_txt_simple_conflict_markers() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] - "###); + "); Ok(()) } @@ -4482,7 +4482,7 @@ fn pep_751_infer_output_format() -> Result<()> { Resolved 4 packages in [TIME] "#); - uv_snapshot!(context.filters(), context.export().arg("-o").arg("pyproject.toml"), @r" + uv_snapshot!(context.filters(), context.export().arg("-o").arg("pyproject.toml"), @" success: false exit_code: 2 ----- stdout ----- @@ -4516,7 +4516,7 @@ fn pep_751_filename() -> Result<()> { context.lock().assert().success(); - uv_snapshot!(context.filters(), context.export().arg("--format").arg("pylock.toml").arg("-o").arg("test.toml"), @r" + uv_snapshot!(context.filters(), context.export().arg("--format").arg("pylock.toml").arg("-o").arg("test.toml"), @" success: false exit_code: 2 ----- stdout ----- @@ -4623,7 +4623,7 @@ fn no_editable_env_var() -> Result<()> { .assert() .success(); - uv_snapshot!(context.filters(), context.export().env(EnvVars::UV_NO_EDITABLE, "1"), @r" + uv_snapshot!(context.filters(), context.export().env(EnvVars::UV_NO_EDITABLE, "1"), @" success: true exit_code: 0 ----- stdout ----- @@ -4660,7 +4660,7 @@ fn export_only_group_and_extra_conflict() -> Result<()> { )?; // Using --only-group and --extra together should error. - uv_snapshot!(context.filters(), context.export().arg("--only-group").arg("dev").arg("--extra").arg("test"), @r###" + uv_snapshot!(context.filters(), context.export().arg("--only-group").arg("dev").arg("--extra").arg("test"), @" success: false exit_code: 2 ----- stdout ----- @@ -4671,10 +4671,10 @@ fn export_only_group_and_extra_conflict() -> Result<()> { Usage: uv export --cache-dir [CACHE_DIR] --only-group --exclude-newer For more information, try '--help'. - "###); + "); // Using --only-group and --all-extras together should also error. - uv_snapshot!(context.filters(), context.export().arg("--only-group").arg("dev").arg("--all-extras"), @r###" + uv_snapshot!(context.filters(), context.export().arg("--only-group").arg("dev").arg("--all-extras"), @" success: false exit_code: 2 ----- stdout ----- @@ -4685,7 +4685,7 @@ fn export_only_group_and_extra_conflict() -> Result<()> { Usage: uv export --cache-dir [CACHE_DIR] --only-group --exclude-newer For more information, try '--help'. - "###); + "); Ok(()) } @@ -4720,7 +4720,7 @@ fn export_lock_workspace_mismatch_with_frozen() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.export().arg("--frozen"), @r" + uv_snapshot!(context.filters(), context.export().arg("--frozen"), @" success: false exit_code: 2 ----- stdout ----- @@ -4806,7 +4806,7 @@ fn multiple_packages() -> Result<()> { // Export `foo` and `bar`. uv_snapshot!(context.filters(), context.export() .arg("--package").arg("foo") - .arg("--package").arg("bar"), @r###" + .arg("--package").arg("bar"), @r" success: true exit_code: 0 ----- stdout ----- @@ -4833,13 +4833,13 @@ fn multiple_packages() -> Result<()> { ----- stderr ----- Resolved 9 packages in [TIME] - "###); + "); // Export `foo`, `bar`, and `baz`. uv_snapshot!(context.filters(), context.export() .arg("--package").arg("foo") .arg("--package").arg("bar") - .arg("--package").arg("baz"), @r###" + .arg("--package").arg("baz"), @r" success: true exit_code: 0 ----- stdout ----- @@ -4871,7 +4871,7 @@ fn multiple_packages() -> Result<()> { ----- stderr ----- Resolved 9 packages in [TIME] - "###); + "); Ok(()) } @@ -5970,7 +5970,7 @@ fn cyclonedx_export_workspace_frozen() -> Result<()> { // Remove the child `pyproject.toml`. fs_err::remove_dir_all(child.path())?; - uv_snapshot!(context.filters(), context.export().arg("--format").arg("cyclonedx1.5").arg("--all-packages"), @r###" + uv_snapshot!(context.filters(), context.export().arg("--format").arg("cyclonedx1.5").arg("--all-packages"), @" success: false exit_code: 1 ----- stdout ----- @@ -5979,7 +5979,7 @@ fn cyclonedx_export_workspace_frozen() -> Result<()> { × Failed to build `project @ file://[TEMP_DIR]/` ├─▶ Failed to parse entry: `child` ╰─▶ `child` references a workspace in `tool.uv.sources` (e.g., `child = { workspace = true }`), but is not a workspace member - "###); + "); uv_snapshot!(context.filters(), context.export().arg("--format").arg("cyclonedx1.5").arg("--all-packages").arg("--frozen"), @r#" success: true @@ -8163,7 +8163,7 @@ fn cyclonedx_export_all_packages_conflicting_workspace_members() -> Result<()> { "#); // Should fail when exporting to `requirements.txt` or `pylock.toml`as conflict detection is enabled for these formats - uv_snapshot!(context.filters(), context.export().arg("--format").arg("requirements-txt").arg("--all-packages"), @r" + uv_snapshot!(context.filters(), context.export().arg("--format").arg("requirements-txt").arg("--all-packages"), @" success: false exit_code: 2 ----- stdout ----- @@ -8174,7 +8174,7 @@ fn cyclonedx_export_all_packages_conflicting_workspace_members() -> Result<()> { error: Package `child` and package `project` are incompatible with the declared conflicts: {child, project} "); - uv_snapshot!(context.filters(), context.export().arg("--format").arg("pylock.toml").arg("--all-packages"), @r" + uv_snapshot!(context.filters(), context.export().arg("--format").arg("pylock.toml").arg("--all-packages"), @" success: false exit_code: 2 ----- stdout ----- diff --git a/crates/uv/tests/it/extract.rs b/crates/uv/tests/it/extract.rs index 4595d32ff..b0ed62690 100644 --- a/crates/uv/tests/it/extract.rs +++ b/crates/uv/tests/it/extract.rs @@ -83,7 +83,7 @@ async fn malo_accept_zip64_eocd() { #[tokio::test] async fn malo_iffy_8bitcomment() { let result = unzip("https://pub-c6f28d316acd406eae43501e51ad30fa.r2.dev/0723f54ceb33a4fdc7f2eddc19635cd704d61c84/iffy/8bitcomment.zip").await; - insta::assert_debug_snapshot!(result, @r" + insta::assert_debug_snapshot!(result, @" Err( ZipInZip, ) @@ -93,7 +93,7 @@ async fn malo_iffy_8bitcomment() { #[tokio::test] async fn malo_iffy_extra3byte() { let result = unzip("https://pub-c6f28d316acd406eae43501e51ad30fa.r2.dev/0723f54ceb33a4fdc7f2eddc19635cd704d61c84/iffy/extra3byte.zip").await; - insta::assert_debug_snapshot!(result, @r" + insta::assert_debug_snapshot!(result, @" Ok( (), ) @@ -103,7 +103,7 @@ async fn malo_iffy_extra3byte() { #[tokio::test] async fn malo_iffy_non_ascii_original_name() { let result = unzip("https://pub-c6f28d316acd406eae43501e51ad30fa.r2.dev/0723f54ceb33a4fdc7f2eddc19635cd704d61c84/iffy/non_ascii_original_name.zip").await; - insta::assert_debug_snapshot!(result, @r" + insta::assert_debug_snapshot!(result, @" Err( LocalHeaderNotUtf8 { offset: 0, @@ -115,7 +115,7 @@ async fn malo_iffy_non_ascii_original_name() { #[tokio::test] async fn malo_iffy_nosubdir() { let result = unzip("https://pub-c6f28d316acd406eae43501e51ad30fa.r2.dev/0723f54ceb33a4fdc7f2eddc19635cd704d61c84/iffy/nosubdir.zip").await; - insta::assert_debug_snapshot!(result, @r" + insta::assert_debug_snapshot!(result, @" Ok( (), ) @@ -125,7 +125,7 @@ async fn malo_iffy_nosubdir() { #[tokio::test] async fn malo_iffy_prefix() { let result = unzip("https://pub-c6f28d316acd406eae43501e51ad30fa.r2.dev/0723f54ceb33a4fdc7f2eddc19635cd704d61c84/iffy/prefix.zip").await; - insta::assert_debug_snapshot!(result, @r" + insta::assert_debug_snapshot!(result, @" Err( AsyncZip( UnexpectedHeaderError( @@ -140,7 +140,7 @@ async fn malo_iffy_prefix() { #[tokio::test] async fn malo_iffy_suffix_not_comment() { let result = unzip("https://pub-c6f28d316acd406eae43501e51ad30fa.r2.dev/0723f54ceb33a4fdc7f2eddc19635cd704d61c84/iffy/suffix_not_comment.zip").await; - insta::assert_debug_snapshot!(result, @r" + insta::assert_debug_snapshot!(result, @" Err( TrailingContents, ) @@ -150,7 +150,7 @@ async fn malo_iffy_suffix_not_comment() { #[tokio::test] async fn malo_iffy_zip64_eocd_extensible_data() { let result = unzip("https://pub-c6f28d316acd406eae43501e51ad30fa.r2.dev/0723f54ceb33a4fdc7f2eddc19635cd704d61c84/iffy/zip64_eocd_extensible_data.zip").await; - insta::assert_debug_snapshot!(result, @r" + insta::assert_debug_snapshot!(result, @" Err( ExtensibleData, ) @@ -160,7 +160,7 @@ async fn malo_iffy_zip64_eocd_extensible_data() { #[tokio::test] async fn malo_iffy_zip64_extra_too_long() { let result = unzip("https://pub-c6f28d316acd406eae43501e51ad30fa.r2.dev/0723f54ceb33a4fdc7f2eddc19635cd704d61c84/iffy/zip64_extra_too_long.zip").await; - insta::assert_debug_snapshot!(result, @r" + insta::assert_debug_snapshot!(result, @" Err( AsyncZip( Zip64ExtendedInformationFieldTooLong { @@ -301,7 +301,7 @@ async fn malo_reject_dupe_eocd() { #[tokio::test] async fn malo_reject_shortextra() { let result = unzip("https://pub-c6f28d316acd406eae43501e51ad30fa.r2.dev/0723f54ceb33a4fdc7f2eddc19635cd704d61c84/reject/shortextra.zip").await.unwrap_err(); - insta::assert_debug_snapshot!(result, @r" + insta::assert_debug_snapshot!(result, @" AsyncZip( InvalidExtraFieldHeader( 9, @@ -337,7 +337,7 @@ async fn malo_reject_zip64_extra_usize() { #[tokio::test] async fn malo_malicious_second_unicode_extra() { let result = unzip("https://pub-c6f28d316acd406eae43501e51ad30fa.r2.dev/0723f54ceb33a4fdc7f2eddc19635cd704d61c84/malicious/second_unicode_extra.zip").await.unwrap_err(); - insta::assert_debug_snapshot!(result, @r" + insta::assert_debug_snapshot!(result, @" AsyncZip( DuplicateExtraFieldHeader( 28789, @@ -349,7 +349,7 @@ async fn malo_malicious_second_unicode_extra() { #[tokio::test] async fn malo_malicious_short_usize_zip64() { let result = unzip("https://pub-c6f28d316acd406eae43501e51ad30fa.r2.dev/0723f54ceb33a4fdc7f2eddc19635cd704d61c84/malicious/short_usize_zip64.zip").await.unwrap_err(); - insta::assert_debug_snapshot!(result, @r" + insta::assert_debug_snapshot!(result, @" AsyncZip( Zip64ExtendedInformationFieldTooLong { expected: 16, @@ -380,7 +380,7 @@ async fn malo_malicious_zip64_eocd_confusion() { #[tokio::test] async fn malo_malicious_unicode_extra_chain() { let result = unzip("https://pub-c6f28d316acd406eae43501e51ad30fa.r2.dev/0723f54ceb33a4fdc7f2eddc19635cd704d61c84/malicious/unicode_extra_chain.zip").await.unwrap_err(); - insta::assert_debug_snapshot!(result, @r" + insta::assert_debug_snapshot!(result, @" AsyncZip( DuplicateExtraFieldHeader( 28789, diff --git a/crates/uv/tests/it/format.rs b/crates/uv/tests/it/format.rs index 78e72ce22..5f63a618a 100644 --- a/crates/uv/tests/it/format.rs +++ b/crates/uv/tests/it/format.rs @@ -24,7 +24,7 @@ fn format_project() -> Result<()> { x = 1 "})?; - uv_snapshot!(context.filters(), context.format(), @r" + uv_snapshot!(context.filters(), context.format(), @" success: true exit_code: 0 ----- stdout ----- @@ -36,9 +36,7 @@ fn format_project() -> Result<()> { // Check that the file was formatted let formatted_content = fs_err::read_to_string(&main_py)?; - assert_snapshot!(formatted_content, @r" - x = 1 - "); + assert_snapshot!(formatted_content, @"x = 1"); Ok(()) } @@ -53,7 +51,7 @@ fn format_missing_pyproject_toml() -> Result<()> { x = 1 "})?; - uv_snapshot!(context.filters(), context.format(), @r" + uv_snapshot!(context.filters(), context.format(), @" success: true exit_code: 0 ----- stdout ----- @@ -65,9 +63,7 @@ fn format_missing_pyproject_toml() -> Result<()> { // Check that the file was formatted let formatted_content = fs_err::read_to_string(&main_py)?; - assert_snapshot!(formatted_content, @r" - x = 1 - "); + assert_snapshot!(formatted_content, @"x = 1"); Ok(()) } @@ -85,7 +81,7 @@ fn format_missing_project_in_pyproject_toml() -> Result<()> { x = 1 "})?; - uv_snapshot!(context.filters(), context.format(), @r" + uv_snapshot!(context.filters(), context.format(), @" success: true exit_code: 0 ----- stdout ----- @@ -97,9 +93,7 @@ fn format_missing_project_in_pyproject_toml() -> Result<()> { // Check that the file was formatted let formatted_content = fs_err::read_to_string(&main_py)?; - assert_snapshot!(formatted_content, @r" - x = 1 - "); + assert_snapshot!(formatted_content, @"x = 1"); Ok(()) } @@ -126,7 +120,7 @@ fn format_unmanaged_project() -> Result<()> { x = 1 "})?; - uv_snapshot!(context.filters(), context.format(), @r" + uv_snapshot!(context.filters(), context.format(), @" success: true exit_code: 0 ----- stdout ----- @@ -138,9 +132,7 @@ fn format_unmanaged_project() -> Result<()> { // Check that the file was formatted let formatted_content = fs_err::read_to_string(&main_py)?; - assert_snapshot!(formatted_content, @r" - x = 1 - "); + assert_snapshot!(formatted_content, @"x = 1"); Ok(()) } @@ -168,7 +160,7 @@ fn format_from_project_root() -> Result<()> { fs_err::create_dir_all(&subdir)?; // Using format from a subdirectory should still run in the project root - uv_snapshot!(context.filters(), context.format().current_dir(&subdir), @r" + uv_snapshot!(context.filters(), context.format().current_dir(&subdir), @" success: true exit_code: 0 ----- stdout ----- @@ -180,9 +172,7 @@ fn format_from_project_root() -> Result<()> { // Check that the file was formatted let formatted_content = fs_err::read_to_string(&main_py)?; - assert_snapshot!(formatted_content, @r" - x = 1 - "); + assert_snapshot!(formatted_content, @"x = 1"); Ok(()) } @@ -196,7 +186,7 @@ fn format_no_project() -> Result<()> { x = 1 "})?; - uv_snapshot!(context.filters(), context.format().arg("--no-project"), @r" + uv_snapshot!(context.filters(), context.format().arg("--no-project"), @" success: true exit_code: 0 ----- stdout ----- @@ -208,9 +198,7 @@ fn format_no_project() -> Result<()> { // Check that the file was formatted let formatted_content = fs_err::read_to_string(&main_py)?; - assert_snapshot!(formatted_content, @r" - x = 1 - "); + assert_snapshot!(formatted_content, @"x = 1"); Ok(()) } @@ -240,7 +228,7 @@ fn format_relative_project() -> Result<()> { x = 1 "})?; - uv_snapshot!(context.filters(), context.format().arg("--project").arg("project"), @r" + uv_snapshot!(context.filters(), context.format().arg("--project").arg("project"), @" success: true exit_code: 0 ----- stdout ----- @@ -252,15 +240,11 @@ fn format_relative_project() -> Result<()> { // Check that the relative project file was formatted let relative_project_content = fs_err::read_to_string(&relative_project_main_py)?; - assert_snapshot!(relative_project_content, @r" - x = 1 - "); + assert_snapshot!(relative_project_content, @"x = 1"); // Check that the root file was not formatted let root_content = fs_err::read_to_string(&root_main_py)?; - assert_snapshot!(root_content, @r" - x = 1 - "); + assert_snapshot!(root_content, @"x = 1"); Ok(()) } @@ -278,7 +262,7 @@ fn format_fails_malformed_pyproject() -> Result<()> { x = 1 "})?; - uv_snapshot!(context.filters(), context.format(), @r" + uv_snapshot!(context.filters(), context.format(), @" success: false exit_code: 2 ----- stdout ----- @@ -302,9 +286,7 @@ fn format_fails_malformed_pyproject() -> Result<()> { // Check that the file is not formatted let formatted_content = fs_err::read_to_string(&main_py)?; - assert_snapshot!(formatted_content, @r" - x = 1 - "); + assert_snapshot!(formatted_content, @"x = 1"); Ok(()) } @@ -328,7 +310,7 @@ fn format_check() -> Result<()> { x = 1 "})?; - uv_snapshot!(context.filters(), context.format().arg("--check"), @r" + uv_snapshot!(context.filters(), context.format().arg("--check"), @" success: false exit_code: 1 ----- stdout ----- @@ -341,9 +323,7 @@ fn format_check() -> Result<()> { // Verify the file wasn't modified let content = fs_err::read_to_string(&main_py)?; - assert_snapshot!(content, @r" - x = 1 - "); + assert_snapshot!(content, @"x = 1"); Ok(()) } @@ -367,7 +347,7 @@ fn format_diff() -> Result<()> { x = 1 "})?; - uv_snapshot!(context.filters(), context.format().arg("--diff"), @r#" + uv_snapshot!(context.filters(), context.format().arg("--diff"), @" success: false exit_code: 1 ----- stdout ----- @@ -381,13 +361,11 @@ fn format_diff() -> Result<()> { ----- stderr ----- warning: `uv format` is experimental and may change without warning. Pass `--preview-features format` to disable this warning. 1 file would be reformatted - "#); + "); // Verify the file wasn't modified let content = fs_err::read_to_string(&main_py)?; - assert_snapshot!(content, @r" - x = 1 - "); + assert_snapshot!(content, @"x = 1"); Ok(()) } @@ -413,7 +391,7 @@ fn format_with_ruff_args() -> Result<()> { "#})?; // Run format with custom line length - uv_snapshot!(context.filters(), context.format().arg("--").arg("main.py").arg("--line-length").arg("200"), @r" + uv_snapshot!(context.filters(), context.format().arg("--").arg("main.py").arg("--line-length").arg("200"), @" success: true exit_code: 0 ----- stdout ----- @@ -457,7 +435,7 @@ fn format_specific_files() -> Result<()> { x = 1 "})?; - uv_snapshot!(context.filters(), context.format().arg("--").arg("main.py"), @r" + uv_snapshot!(context.filters(), context.format().arg("--").arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -468,15 +446,11 @@ fn format_specific_files() -> Result<()> { "); let main_content = fs_err::read_to_string(&main_py)?; - assert_snapshot!(main_content, @r" - x = 1 - "); + assert_snapshot!(main_content, @"x = 1"); // Unchanged let utils_content = fs_err::read_to_string(&utils_py)?; - assert_snapshot!(utils_content, @r" - x = 1 - "); + assert_snapshot!(utils_content, @"x = 1"); Ok(()) } @@ -503,7 +477,7 @@ fn format_version_option() -> Result<()> { // TODO(zanieb): It'd be nice to assert on the version used here somehow? Maybe we should emit // the version we're using to stderr? Alas there's not a way to get the Ruff version from the // format command :) - uv_snapshot!(context.filters(), context.format().arg("--version").arg("0.8.2"), @r" + uv_snapshot!(context.filters(), context.format().arg("--version").arg("0.8.2"), @" success: true exit_code: 0 ----- stdout ----- diff --git a/crates/uv/tests/it/help.rs b/crates/uv/tests/it/help.rs index d1d09cc4b..d1e8b40cb 100644 --- a/crates/uv/tests/it/help.rs +++ b/crates/uv/tests/it/help.rs @@ -890,7 +890,7 @@ fn help_flag_subsubcommand() { fn help_unknown_subcommand() { let context = TestContext::new_with_versions(&[]); - uv_snapshot!(context.filters(), context.help().arg("foobar"), @r" + uv_snapshot!(context.filters(), context.help().arg("foobar"), @" success: false exit_code: 2 ----- stdout ----- @@ -919,7 +919,7 @@ fn help_unknown_subcommand() { generate-shell-completion "); - uv_snapshot!(context.filters(), context.help().arg("foo").arg("bar"), @r" + uv_snapshot!(context.filters(), context.help().arg("foo").arg("bar"), @" success: false exit_code: 2 ----- stdout ----- @@ -953,7 +953,7 @@ fn help_unknown_subcommand() { fn help_unknown_subsubcommand() { let context = TestContext::new_with_versions(&[]); - uv_snapshot!(context.filters(), context.help().arg("python").arg("foobar"), @r" + uv_snapshot!(context.filters(), context.help().arg("python").arg("foobar"), @" success: false exit_code: 2 ----- stdout ----- @@ -1056,7 +1056,7 @@ fn help_with_global_option() { fn help_with_help() { let context = TestContext::new_with_versions(&[]); - uv_snapshot!(context.filters(), context.help().arg("--help"), @r###" + uv_snapshot!(context.filters(), context.help().arg("--help"), @" success: true exit_code: 0 ----- stdout ----- @@ -1068,14 +1068,14 @@ fn help_with_help() { --no-pager Disable pager when printing help ----- stderr ----- - "###); + "); } #[test] fn help_with_version() { let context = TestContext::new_with_versions(&[]); - uv_snapshot!(context.filters(), context.help().arg("--version"), @r" + uv_snapshot!(context.filters(), context.help().arg("--version"), @" success: false exit_code: 2 ----- stdout ----- diff --git a/crates/uv/tests/it/init.rs b/crates/uv/tests/it/init.rs index 058b523ff..d492ed9ab 100644 --- a/crates/uv/tests/it/init.rs +++ b/crates/uv/tests/it/init.rs @@ -15,14 +15,14 @@ use crate::common::{TestContext, uv_snapshot}; fn init() { let context = TestContext::new("3.12"); - uv_snapshot!(context.filters(), context.init().arg("foo"), @r###" + uv_snapshot!(context.filters(), context.init().arg("foo"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Initialized project `foo` at `[TEMP_DIR]/foo` - "###); + "); let pyproject = context.read("foo/pyproject.toml"); let _ = context.read("foo/README.md"); @@ -31,7 +31,7 @@ fn init() { filters => context.filters(), }, { assert_snapshot!( - pyproject, @r###" + pyproject, @r#" [project] name = "foo" version = "0.1.0" @@ -39,12 +39,12 @@ fn init() { readme = "README.md" requires-python = ">=3.12" dependencies = [] - "### + "# ); }); // Run `uv lock` in the new project. - uv_snapshot!(context.filters(), context.lock().current_dir(context.temp_dir.join("foo")), @r###" + uv_snapshot!(context.filters(), context.lock().current_dir(context.temp_dir.join("foo")), @" success: true exit_code: 0 ----- stdout ----- @@ -52,7 +52,7 @@ fn init() { ----- stderr ----- Using CPython 3.12.[X] interpreter at: [PYTHON-3.12] Resolved 1 package in [TIME] - "###); + "); let python_version = context.read("foo/.python-version"); insta::with_settings!({ @@ -68,14 +68,14 @@ fn init() { fn init_bare() { let context = TestContext::new("3.12"); - uv_snapshot!(context.filters(), context.init().arg("foo").arg("--bare"), @r###" + uv_snapshot!(context.filters(), context.init().arg("foo").arg("--bare"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Initialized project `foo` at `[TEMP_DIR]/foo` - "###); + "); // No extra files should be created context @@ -100,13 +100,13 @@ fn init_bare() { filters => context.filters(), }, { assert_snapshot!( - pyproject, @r###" + pyproject, @r#" [project] name = "foo" version = "0.1.0" requires-python = ">=3.12" dependencies = [] - "### + "# ); }); } @@ -122,21 +122,21 @@ fn init_application() -> Result<()> { let pyproject_toml = child.join("pyproject.toml"); let main_py = child.join("main.py"); - uv_snapshot!(context.filters(), context.init().current_dir(&child).arg("--app"), @r###" + uv_snapshot!(context.filters(), context.init().current_dir(&child).arg("--app"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Initialized project `foo` - "###); + "); let pyproject = fs_err::read_to_string(&pyproject_toml)?; insta::with_settings!({ filters => context.filters(), }, { assert_snapshot!( - pyproject, @r###" + pyproject, @r#" [project] name = "foo" version = "0.1.0" @@ -144,7 +144,7 @@ fn init_application() -> Result<()> { readme = "README.md" requires-python = ">=3.12" dependencies = [] - "### + "# ); }); @@ -153,18 +153,18 @@ fn init_application() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - hello, @r###" + hello, @r#" def main(): print("Hello from foo!") if __name__ == "__main__": main() - "### + "# ); }); - uv_snapshot!(context.filters(), context.run().current_dir(&child).arg("main.py"), @r###" + uv_snapshot!(context.filters(), context.run().current_dir(&child).arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -176,7 +176,7 @@ fn init_application() -> Result<()> { Creating virtual environment at: .venv Resolved 1 package in [TIME] Audited in [TIME] - "###); + "); Ok(()) } @@ -193,21 +193,21 @@ fn init_application_hello_exists() -> Result<()> { let main_py = child.child("main.py"); main_py.touch()?; - uv_snapshot!(context.filters(), context.init().current_dir(&child).arg("--app"), @r###" + uv_snapshot!(context.filters(), context.init().current_dir(&child).arg("--app"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Initialized project `foo` - "###); + "); let pyproject = fs_err::read_to_string(&pyproject_toml)?; insta::with_settings!({ filters => context.filters(), }, { assert_snapshot!( - pyproject, @r###" + pyproject, @r#" [project] name = "foo" version = "0.1.0" @@ -215,7 +215,7 @@ fn init_application_hello_exists() -> Result<()> { readme = "README.md" requires-python = ">=3.12" dependencies = [] - "### + "# ); }); @@ -244,21 +244,21 @@ fn init_application_other_python_exists() -> Result<()> { let other_py = child.child("foo.py"); other_py.touch()?; - uv_snapshot!(context.filters(), context.init().current_dir(&child).arg("--app"), @r###" + uv_snapshot!(context.filters(), context.init().current_dir(&child).arg("--app"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Initialized project `foo` - "###); + "); let pyproject = fs_err::read_to_string(&pyproject_toml)?; insta::with_settings!({ filters => context.filters(), }, { assert_snapshot!( - pyproject, @r###" + pyproject, @r#" [project] name = "foo" version = "0.1.0" @@ -266,7 +266,7 @@ fn init_application_other_python_exists() -> Result<()> { readme = "README.md" requires-python = ">=3.12" dependencies = [] - "### + "# ); }); @@ -275,14 +275,14 @@ fn init_application_other_python_exists() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - hello, @r###" + hello, @r#" def main(): print("Hello from foo!") if __name__ == "__main__": main() - "### + "# ); }); @@ -300,14 +300,14 @@ fn init_application_package() -> Result<()> { let pyproject_toml = child.join("pyproject.toml"); let init_py = child.join("src").join("foo").join("__init__.py"); - uv_snapshot!(context.filters(), context.init().current_dir(&child).arg("--app").arg("--package"), @r###" + uv_snapshot!(context.filters(), context.init().current_dir(&child).arg("--app").arg("--package"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Initialized project `foo` - "###); + "); let pyproject = fs_err::read_to_string(&pyproject_toml)?; insta::with_settings!({ @@ -338,14 +338,14 @@ fn init_application_package() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - init, @r###" + init, @r#" def main() -> None: print("Hello from foo!") - "### + "# ); }); - uv_snapshot!(context.filters(), context.run().current_dir(&child).arg("foo"), @r###" + uv_snapshot!(context.filters(), context.run().current_dir(&child).arg("foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -359,7 +359,7 @@ fn init_application_package() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + foo==0.1.0 (from file://[TEMP_DIR]/foo) - "###); + "); Ok(()) } @@ -376,14 +376,14 @@ fn init_library() -> Result<()> { let init_py = child.join("src").join("foo").join("__init__.py"); let py_typed = child.join("src").join("foo").join("py.typed"); - uv_snapshot!(context.filters(), context.init().current_dir(&child).arg("--lib"), @r###" + uv_snapshot!(context.filters(), context.init().current_dir(&child).arg("--lib"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Initialized project `foo` - "###); + "); let pyproject = fs_err::read_to_string(&pyproject_toml)?; insta::with_settings!({ @@ -411,10 +411,10 @@ fn init_library() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - init, @r###" + init, @r#" def hello() -> str: return "Hello from foo!" - "### + "# ); }); @@ -427,7 +427,7 @@ fn init_library() -> Result<()> { ); }); - uv_snapshot!(context.filters(), context.run().current_dir(&child).arg("python").arg("-c").arg("import foo; print(foo.hello())"), @r###" + uv_snapshot!(context.filters(), context.run().current_dir(&child).arg("python").arg("-c").arg("import foo; print(foo.hello())"), @" success: true exit_code: 0 ----- stdout ----- @@ -441,7 +441,7 @@ fn init_library() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + foo==0.1.0 (from file://[TEMP_DIR]/foo) - "###); + "); Ok(()) } @@ -455,14 +455,14 @@ fn init_package_preview() -> Result<()> { let child = context.temp_dir.child("foo"); child.create_dir_all()?; - uv_snapshot!(context.filters(), context.init().current_dir(&child).arg("--package").arg("--preview"), @r###" + uv_snapshot!(context.filters(), context.init().current_dir(&child).arg("--package").arg("--preview"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Initialized project `foo` - "###); + "); let pyproject = fs_err::read_to_string(child.join("pyproject.toml"))?; insta::with_settings!({ @@ -495,14 +495,14 @@ fn init_package_preview() -> Result<()> { fn init_bare_lib() { let context = TestContext::new("3.12"); - uv_snapshot!(context.filters(), context.init().arg("foo").arg("--bare").arg("--lib"), @r###" + uv_snapshot!(context.filters(), context.init().arg("foo").arg("--bare").arg("--lib"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Initialized project `foo` at `[TEMP_DIR]/foo` - "###); + "); // No extra files should be created context @@ -547,14 +547,14 @@ fn init_bare_lib() { fn init_bare_package() { let context = TestContext::new("3.12"); - uv_snapshot!(context.filters(), context.init().arg("foo").arg("--bare").arg("--package"), @r###" + uv_snapshot!(context.filters(), context.init().arg("foo").arg("--bare").arg("--package"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Initialized project `foo` at `[TEMP_DIR]/foo` - "###); + "); // No extra files should be created context @@ -604,14 +604,14 @@ fn init_bare_opt_in() { uv_snapshot!(context.filters(), context.init().arg("foo").arg("--bare") .arg("--description").arg("foo") .arg("--pin-python") - .arg("--vcs").arg("git"), @r###" + .arg("--vcs").arg("git"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Initialized project `foo` at `[TEMP_DIR]/foo` - "###); + "); context .temp_dir @@ -635,14 +635,14 @@ fn init_bare_opt_in() { filters => context.filters(), }, { assert_snapshot!( - pyproject, @r###" + pyproject, @r#" [project] name = "foo" version = "0.1.0" description = "foo" requires-python = ">=3.12" dependencies = [] - "### + "# ); }); } @@ -657,21 +657,21 @@ fn init_script() -> Result<()> { let script = child.join("main.py"); - uv_snapshot!(context.filters(), context.init().current_dir(&child).arg("--script").arg("main.py"), @r###" + uv_snapshot!(context.filters(), context.init().current_dir(&child).arg("--script").arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Initialized script at `main.py` - "###); + "); let script = fs_err::read_to_string(&script)?; insta::with_settings!({ filters => context.filters(), }, { assert_snapshot!( - script, @r###" + script, @r#" # /// script # requires-python = ">=3.12" # dependencies = [] @@ -684,18 +684,18 @@ fn init_script() -> Result<()> { if __name__ == "__main__": main() - "### + "# ); }); - uv_snapshot!(context.filters(), context.run().current_dir(&child).arg("python").arg("main.py"), @r###" + uv_snapshot!(context.filters(), context.run().current_dir(&child).arg("python").arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- Hello from main.py! ----- stderr ----- - "###); + "); Ok(()) } @@ -710,26 +710,26 @@ fn init_script_bare() -> Result<()> { let script = child.join("main.py"); - uv_snapshot!(context.filters(), context.init().current_dir(&child).arg("--script").arg("--bare").arg("main.py"), @r###" + uv_snapshot!(context.filters(), context.init().current_dir(&child).arg("--script").arg("--bare").arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Initialized script at `main.py` - "###); + "); let script = fs_err::read_to_string(&script)?; insta::with_settings!({ filters => context.filters(), }, { assert_snapshot!( - script, @r###" + script, @r#" # /// script # requires-python = ">=3.12" # dependencies = [] # /// - "### + "# ); }); @@ -746,21 +746,21 @@ fn init_script_python_version() -> Result<()> { let script = child.join("version.py"); - uv_snapshot!(context.filters(), context.init().current_dir(&child).arg("--script").arg("version.py").arg("--python").arg("3.11"), @r###" + uv_snapshot!(context.filters(), context.init().current_dir(&child).arg("--script").arg("version.py").arg("--python").arg("3.11"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Initialized script at `version.py` - "###); + "); let script = fs_err::read_to_string(&script)?; insta::with_settings!({ filters => context.filters(), }, { assert_snapshot!( - script, @r###" + script, @r#" # /// script # requires-python = ">=3.11" # dependencies = [] @@ -773,7 +773,7 @@ fn init_script_python_version() -> Result<()> { if __name__ == "__main__": main() - "### + "# ); }); @@ -790,21 +790,21 @@ fn init_script_create_directory() -> Result<()> { let script = child.join("test").join("dir.py"); - uv_snapshot!(context.filters(), context.init().current_dir(&child).arg("--script").arg("test/dir.py"), @r###" + uv_snapshot!(context.filters(), context.init().current_dir(&child).arg("--script").arg("test/dir.py"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Initialized script at `test/dir.py` - "###); + "); let script = fs_err::read_to_string(&script)?; insta::with_settings!({ filters => context.filters(), }, { assert_snapshot!( - script, @r###" + script, @r#" # /// script # requires-python = ">=3.12" # dependencies = [] @@ -817,7 +817,7 @@ fn init_script_create_directory() -> Result<()> { if __name__ == "__main__": main() - "### + "# ); }); @@ -832,47 +832,47 @@ fn init_script_file_conflicts() -> Result<()> { let child = context.temp_dir.child("foo"); child.create_dir_all()?; - uv_snapshot!(context.filters(), context.init().current_dir(&child).arg("--script").arg("name_conflict.py"), @r###" + uv_snapshot!(context.filters(), context.init().current_dir(&child).arg("--script").arg("name_conflict.py"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Initialized script at `name_conflict.py` - "###); + "); - uv_snapshot!(context.filters(), context.init().current_dir(&child).arg("--script").arg("name_conflict.py"), @r###" + uv_snapshot!(context.filters(), context.init().current_dir(&child).arg("--script").arg("name_conflict.py"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: `name_conflict.py` is already a PEP 723 script; use `uv run` to execute it - "###); + "); let contents = "print(\"Hello, world!\")"; fs_err::write(child.join("existing_script.py"), contents)?; - uv_snapshot!(context.filters(), context.init().current_dir(&child).arg("--script").arg("existing_script.py"), @r###" + uv_snapshot!(context.filters(), context.init().current_dir(&child).arg("--script").arg("existing_script.py"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Initialized script at `existing_script.py` - "###); + "); let existing_script = fs_err::read_to_string(child.join("existing_script.py"))?; assert_snapshot!( - existing_script, @r###" + existing_script, @r#" # /// script # requires-python = ">=3.12" # dependencies = [] # /// print("Hello, world!") - "### + "# ); Ok(()) @@ -887,7 +887,7 @@ fn init_script_shebang() -> Result<()> { let contents = "#! /usr/bin/env python3\nprint(\"Hello, world!\")"; fs_err::write(&script_path, contents)?; - uv_snapshot!(context.filters(), context.init().arg("--script").arg("script.py"), @r" + uv_snapshot!(context.filters(), context.init().arg("--script").arg("script.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -913,7 +913,7 @@ fn init_script_shebang() -> Result<()> { // If the shebang already contains `uv`, the result is the same, but we suppress the warning. let contents = "#!/usr/bin/env -S uv run --script\nprint(\"Hello, world!\")"; fs_err::write(&script_path, contents)?; - uv_snapshot!(context.filters(), context.init().arg("--script").arg("script.py"), @r" + uv_snapshot!(context.filters(), context.init().arg("--script").arg("script.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -994,14 +994,14 @@ fn init_py_typed_exists() -> Result<()> { let py_typed = foo.join("py.typed"); fs_err::write(&py_typed, "partial")?; - uv_snapshot!(context.filters(), context.init().current_dir(&child).arg("--lib"), @r###" + uv_snapshot!(context.filters(), context.init().current_dir(&child).arg("--lib"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Initialized project `foo` - "###); + "); let py_typed = fs_err::read_to_string(py_typed)?; insta::with_settings!({ @@ -1022,7 +1022,7 @@ fn init_library_no_package() -> Result<()> { let child = context.temp_dir.child("foo"); child.create_dir_all()?; - uv_snapshot!(context.filters(), context.init().current_dir(&child).arg("--lib").arg("--no-package"), @r###" + uv_snapshot!(context.filters(), context.init().current_dir(&child).arg("--lib").arg("--no-package"), @" success: false exit_code: 2 ----- stdout ----- @@ -1033,7 +1033,7 @@ fn init_library_no_package() -> Result<()> { Usage: uv init --cache-dir [CACHE_DIR] --lib [PATH] For more information, try '--help'. - "###); + "); Ok(()) } @@ -1045,14 +1045,14 @@ fn init_cache() -> Result<()> { fs_err::remove_dir_all(&context.cache_dir)?; - uv_snapshot!(context.filters(), context.init().arg("foo"), @r###" + uv_snapshot!(context.filters(), context.init().arg("foo"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Initialized project `foo` at `[TEMP_DIR]/foo` - "###); + "); Ok(()) } @@ -1061,14 +1061,14 @@ fn init_cache() -> Result<()> { fn init_no_readme() { let context = TestContext::new("3.12"); - uv_snapshot!(context.filters(), context.init().arg("foo").arg("--no-readme"), @r###" + uv_snapshot!(context.filters(), context.init().arg("foo").arg("--no-readme"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Initialized project `foo` at `[TEMP_DIR]/foo` - "###); + "); let pyproject = context.read("foo/pyproject.toml"); let _ = fs_err::read_to_string(context.temp_dir.join("foo/README.md")).unwrap_err(); @@ -1077,14 +1077,14 @@ fn init_no_readme() { filters => context.filters(), }, { assert_snapshot!( - pyproject, @r###" + pyproject, @r#" [project] name = "foo" version = "0.1.0" description = "Add your description here" requires-python = ">=3.12" dependencies = [] - "### + "# ); }); } @@ -1093,14 +1093,14 @@ fn init_no_readme() { fn init_no_pin_python() { let context = TestContext::new("3.12"); - uv_snapshot!(context.filters(), context.init().arg("foo").arg("--no-pin-python"), @r###" + uv_snapshot!(context.filters(), context.init().arg("foo").arg("--no-pin-python"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Initialized project `foo` at `[TEMP_DIR]/foo` - "###); + "); let pyproject = context.read("foo/pyproject.toml"); let _ = fs_err::read_to_string(context.temp_dir.join("foo/.python-version")).unwrap_err(); @@ -1109,7 +1109,7 @@ fn init_no_pin_python() { filters => context.filters(), }, { assert_snapshot!( - pyproject, @r###" + pyproject, @r#" [project] name = "foo" version = "0.1.0" @@ -1117,7 +1117,7 @@ fn init_no_pin_python() { readme = "README.md" requires-python = ">=3.12" dependencies = [] - "### + "# ); }); } @@ -1129,14 +1129,14 @@ fn init_library_current_dir() -> Result<()> { let dir = context.temp_dir.join("foo"); fs_err::create_dir(&dir)?; - uv_snapshot!(context.filters(), context.init().arg("--lib").current_dir(&dir), @r###" + uv_snapshot!(context.filters(), context.init().arg("--lib").current_dir(&dir), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Initialized project `foo` - "###); + "); let pyproject = fs_err::read_to_string(dir.join("pyproject.toml"))?; let init_py = fs_err::read_to_string(dir.join("src/foo/__init__.py"))?; @@ -1166,15 +1166,15 @@ fn init_library_current_dir() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - init_py, @r###" + init_py, @r#" def hello() -> str: return "Hello from foo!" - "### + "# ); }); // Run `uv lock` in the new project. - uv_snapshot!(context.filters(), context.lock().current_dir(&dir), @r###" + uv_snapshot!(context.filters(), context.lock().current_dir(&dir), @" success: true exit_code: 0 ----- stdout ----- @@ -1182,7 +1182,7 @@ fn init_library_current_dir() -> Result<()> { ----- stderr ----- Using CPython 3.12.[X] interpreter at: [PYTHON-3.12] Resolved 1 package in [TIME] - "###); + "); Ok(()) } @@ -1194,14 +1194,14 @@ fn init_application_current_dir() -> Result<()> { let dir = context.temp_dir.join("foo"); fs_err::create_dir(&dir)?; - uv_snapshot!(context.filters(), context.init().arg("--app").current_dir(&dir), @r###" + uv_snapshot!(context.filters(), context.init().arg("--app").current_dir(&dir), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Initialized project `foo` - "###); + "); let pyproject = fs_err::read_to_string(dir.join("pyproject.toml"))?; let main_py = fs_err::read_to_string(dir.join("main.py"))?; @@ -1210,7 +1210,7 @@ fn init_application_current_dir() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject, @r###" + pyproject, @r#" [project] name = "foo" version = "0.1.0" @@ -1218,7 +1218,7 @@ fn init_application_current_dir() -> Result<()> { readme = "README.md" requires-python = ">=3.12" dependencies = [] - "### + "# ); }); @@ -1226,19 +1226,19 @@ fn init_application_current_dir() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - main_py, @r###" + main_py, @r#" def main(): print("Hello from foo!") if __name__ == "__main__": main() - "### + "# ); }); // Run `uv lock` in the new project. - uv_snapshot!(context.filters(), context.lock().current_dir(&dir), @r###" + uv_snapshot!(context.filters(), context.lock().current_dir(&dir), @" success: true exit_code: 0 ----- stdout ----- @@ -1246,7 +1246,7 @@ fn init_application_current_dir() -> Result<()> { ----- stderr ----- Using CPython 3.12.[X] interpreter at: [PYTHON-3.12] Resolved 1 package in [TIME] - "###); + "); Ok(()) } @@ -1258,14 +1258,14 @@ fn init_dot_args() -> Result<()> { let dir = context.temp_dir.join("foo"); fs_err::create_dir(&dir)?; - uv_snapshot!(context.filters(), context.init().current_dir(&dir).arg(".").arg("--lib"), @r###" + uv_snapshot!(context.filters(), context.init().current_dir(&dir).arg(".").arg("--lib"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Initialized project `foo` at `[TEMP_DIR]/foo` - "###); + "); let pyproject = fs_err::read_to_string(dir.join("pyproject.toml"))?; let init_py = fs_err::read_to_string(dir.join("src/foo/__init__.py"))?; @@ -1295,15 +1295,15 @@ fn init_dot_args() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - init_py, @r###" + init_py, @r#" def hello() -> str: return "Hello from foo!" - "### + "# ); }); // Run `uv lock` in the new project. - uv_snapshot!(context.filters(), context.lock().current_dir(&dir), @r###" + uv_snapshot!(context.filters(), context.lock().current_dir(&dir), @" success: true exit_code: 0 ----- stdout ----- @@ -1311,7 +1311,7 @@ fn init_dot_args() -> Result<()> { ----- stderr ----- Using CPython 3.12.[X] interpreter at: [PYTHON-3.12] Resolved 1 package in [TIME] - "###); + "); Ok(()) } @@ -1334,7 +1334,7 @@ fn init_workspace() -> Result<()> { let child = context.temp_dir.join("foo"); fs_err::create_dir(&child)?; - uv_snapshot!(context.filters(), context.init().arg("--lib").current_dir(&child), @r###" + uv_snapshot!(context.filters(), context.init().arg("--lib").current_dir(&child), @" success: true exit_code: 0 ----- stdout ----- @@ -1342,7 +1342,7 @@ fn init_workspace() -> Result<()> { ----- stderr ----- Adding `foo` as member of workspace `[TEMP_DIR]/` Initialized project `foo` - "###); + "); let pyproject = fs_err::read_to_string(child.join("pyproject.toml"))?; let init_py = fs_err::read_to_string(child.join("src/foo/__init__.py"))?; @@ -1373,10 +1373,10 @@ fn init_workspace() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - init_py, @r###" + init_py, @r#" def hello() -> str: return "Hello from foo!" - "### + "# ); }); @@ -1401,20 +1401,20 @@ fn init_workspace() -> Result<()> { }); // Run `uv lock` in the workspace. - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 5 packages in [TIME] - "###); + "); // Add another member (`bar`). let child = context.temp_dir.join("bar"); fs_err::create_dir(&child)?; - uv_snapshot!(context.filters(), context.init().arg("--lib").current_dir(&child), @r" + uv_snapshot!(context.filters(), context.init().arg("--lib").current_dir(&child), @" success: true exit_code: 0 ----- stdout ----- @@ -1467,7 +1467,7 @@ fn init_workspace() -> Result<()> { let child = context.temp_dir.join("baz"); fs_err::create_dir(&child)?; - uv_snapshot!(context.filters(), context.init().arg("--lib").current_dir(&child), @r" + uv_snapshot!(context.filters(), context.init().arg("--lib").current_dir(&child), @" success: true exit_code: 0 ----- stdout ----- @@ -1519,7 +1519,7 @@ fn init_workspace_relative_sub_package() -> Result<()> { let child = context.temp_dir.join("foo"); - uv_snapshot!(context.filters(), context.init().arg("--lib").current_dir(&context.temp_dir).arg("foo"), @r###" + uv_snapshot!(context.filters(), context.init().arg("--lib").current_dir(&context.temp_dir).arg("foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -1527,7 +1527,7 @@ fn init_workspace_relative_sub_package() -> Result<()> { ----- stderr ----- Adding `foo` as member of workspace `[TEMP_DIR]/` Initialized project `foo` at `[TEMP_DIR]/foo` - "###); + "); let pyproject = fs_err::read_to_string(child.join("pyproject.toml"))?; let init_py = fs_err::read_to_string(child.join("src/foo/__init__.py"))?; @@ -1558,10 +1558,10 @@ fn init_workspace_relative_sub_package() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - init_py, @r###" + init_py, @r#" def hello() -> str: return "Hello from foo!" - "### + "# ); }); @@ -1586,14 +1586,14 @@ fn init_workspace_relative_sub_package() -> Result<()> { }); // Run `uv lock` in the workspace. - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 5 packages in [TIME] - "###); + "); Ok(()) } @@ -1616,7 +1616,7 @@ fn init_workspace_outside() -> Result<()> { let child = context.temp_dir.join("foo"); // Run `uv init ` outside the workspace. - uv_snapshot!(context.filters(), context.init().arg("--lib").current_dir(&context.home_dir).arg(&child), @r###" + uv_snapshot!(context.filters(), context.init().arg("--lib").current_dir(&context.home_dir).arg(&child), @" success: true exit_code: 0 ----- stdout ----- @@ -1624,7 +1624,7 @@ fn init_workspace_outside() -> Result<()> { ----- stderr ----- Adding `foo` as member of workspace `[TEMP_DIR]/` Initialized project `foo` at `[TEMP_DIR]/foo` - "###); + "); let pyproject = fs_err::read_to_string(child.join("pyproject.toml"))?; let init_py = fs_err::read_to_string(child.join("src/foo/__init__.py"))?; @@ -1655,10 +1655,10 @@ fn init_workspace_outside() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - init_py, @r###" + init_py, @r#" def hello() -> str: return "Hello from foo!" - "### + "# ); }); @@ -1683,14 +1683,14 @@ fn init_workspace_outside() -> Result<()> { }); // Run `uv lock` in the workspace. - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 5 packages in [TIME] - "###); + "); Ok(()) } @@ -1700,14 +1700,14 @@ fn init_normalized_names() -> Result<()> { let context = TestContext::new("3.12"); // `foo-bar` module is normalized to `foo-bar`. - uv_snapshot!(context.filters(), context.init().current_dir(&context.temp_dir).arg("foo-bar").arg("--lib"), @r###" + uv_snapshot!(context.filters(), context.init().current_dir(&context.temp_dir).arg("foo-bar").arg("--lib"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Initialized project `foo-bar` at `[TEMP_DIR]/foo-bar` - "###); + "); let child = context.temp_dir.child("foo-bar"); let pyproject = fs_err::read_to_string(child.join("pyproject.toml"))?; @@ -1734,14 +1734,14 @@ fn init_normalized_names() -> Result<()> { }); // `bar_baz` module is normalized to `bar-baz`. - uv_snapshot!(context.filters(), context.init().current_dir(&context.temp_dir).arg("bar_baz").arg("--app"), @r###" + uv_snapshot!(context.filters(), context.init().current_dir(&context.temp_dir).arg("bar_baz").arg("--app"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Initialized project `bar-baz` at `[TEMP_DIR]/bar_baz` - "###); + "); let child = context.temp_dir.child("bar_baz"); let pyproject = fs_err::read_to_string(child.join("pyproject.toml"))?; @@ -1750,7 +1750,7 @@ fn init_normalized_names() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject, @r###" + pyproject, @r#" [project] name = "bar-baz" version = "0.1.0" @@ -1758,19 +1758,19 @@ fn init_normalized_names() -> Result<()> { readme = "README.md" requires-python = ">=3.12" dependencies = [] - "### + "# ); }); // "baz bop" is normalized to "baz-bop". - uv_snapshot!(context.filters(), context.init().current_dir(&context.temp_dir).arg("baz bop"), @r###" + uv_snapshot!(context.filters(), context.init().current_dir(&context.temp_dir).arg("baz bop"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Initialized project `baz-bop` at `[TEMP_DIR]/baz bop` - "###); + "); let child = context.temp_dir.child("baz bop"); let pyproject = fs_err::read_to_string(child.join("pyproject.toml"))?; @@ -1779,7 +1779,7 @@ fn init_normalized_names() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject, @r###" + pyproject, @r#" [project] name = "baz-bop" version = "0.1.0" @@ -1787,7 +1787,7 @@ fn init_normalized_names() -> Result<()> { readme = "README.md" requires-python = ">=3.12" dependencies = [] - "### + "# ); }); @@ -1811,7 +1811,7 @@ fn init_isolated() -> Result<()> { let child = context.temp_dir.join("foo"); fs_err::create_dir(&child)?; - uv_snapshot!(context.filters(), context.init().current_dir(&child).arg("--isolated"), @r###" + uv_snapshot!(context.filters(), context.init().current_dir(&child).arg("--isolated"), @" success: true exit_code: 0 ----- stdout ----- @@ -1820,7 +1820,7 @@ fn init_isolated() -> Result<()> { warning: The `--isolated` flag is deprecated and has no effect. Instead, use `--no-config` to prevent uv from discovering configuration files or `--no-workspace` to prevent uv from adding the initialized project to the containing workspace. Adding `foo` as member of workspace `[TEMP_DIR]/` Initialized project `foo` - "###); + "); let workspace = context.read("pyproject.toml"); @@ -1863,14 +1863,14 @@ fn init_no_workspace() -> Result<()> { let child = context.temp_dir.join("foo"); fs_err::create_dir(&child)?; - uv_snapshot!(context.filters(), context.init().current_dir(&child).arg("--no-workspace"), @r###" + uv_snapshot!(context.filters(), context.init().current_dir(&child).arg("--no-workspace"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Initialized project `foo` - "###); + "); // Ensure that the workspace was not modified. let workspace = context.read("pyproject.toml"); @@ -1879,12 +1879,12 @@ fn init_no_workspace() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - workspace, @r###" + workspace, @r#" [project] name = "project" version = "0.1.0" requires-python = ">=3.12" - "### + "# ); }); @@ -1897,14 +1897,14 @@ fn init_no_workspace() -> Result<()> { let child = context.temp_dir.join("bar"); fs_err::create_dir(&child)?; - uv_snapshot!(context.filters(), context.init().current_dir(&child).arg("--no-workspace"), @r###" + uv_snapshot!(context.filters(), context.init().current_dir(&child).arg("--no-workspace"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Initialized project `bar` - "###); + "); let workspace = context.read("pyproject.toml"); @@ -1924,14 +1924,14 @@ fn init_no_workspace() -> 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###" + uv_snapshot!(context.filters(), context.init().current_dir(&context.temp_dir).arg("--no-workspace").arg("--name").arg("project"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Initialized project `project` - "###); + "); let workspace = context.read("pyproject.toml"); @@ -1939,7 +1939,7 @@ fn init_no_workspace_warning() { filters => context.filters(), }, { assert_snapshot!( - workspace, @r###" + workspace, @r#" [project] name = "project" version = "0.1.0" @@ -1947,7 +1947,7 @@ fn init_no_workspace_warning() { readme = "README.md" requires-python = ">=3.12" dependencies = [] - "### + "# ); }); } @@ -1968,7 +1968,7 @@ fn init_project_inside_project() -> Result<()> { // Create a child from the workspace root. let child = context.temp_dir.join("foo"); - uv_snapshot!(context.filters(), context.init().current_dir(&context.temp_dir).arg(&child), @r###" + uv_snapshot!(context.filters(), context.init().current_dir(&context.temp_dir).arg(&child), @" success: true exit_code: 0 ----- stdout ----- @@ -1976,10 +1976,10 @@ fn init_project_inside_project() -> Result<()> { ----- stderr ----- Adding `foo` as member of workspace `[TEMP_DIR]/` Initialized project `foo` at `[TEMP_DIR]/foo` - "###); + "); // Create a grandchild from the child directory. - uv_snapshot!(context.filters(), context.init().current_dir(&child).arg("bar"), @r###" + uv_snapshot!(context.filters(), context.init().current_dir(&child).arg("bar"), @" success: true exit_code: 0 ----- stdout ----- @@ -1987,7 +1987,7 @@ fn init_project_inside_project() -> Result<()> { ----- stderr ----- Adding `bar` as member of workspace `[TEMP_DIR]/` Initialized project `bar` at `[TEMP_DIR]/foo/bar` - "###); + "); let workspace = fs_err::read_to_string(pyproject_toml)?; insta::with_settings!({ @@ -2014,7 +2014,7 @@ fn init_project_inside_project() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject, @r###" + pyproject, @r#" [project] name = "foo" version = "0.1.0" @@ -2022,7 +2022,7 @@ fn init_project_inside_project() -> Result<()> { readme = "README.md" requires-python = ">=3.12" dependencies = [] - "### + "# ); }); @@ -2048,7 +2048,7 @@ fn init_explicit_workspace() -> Result<()> { })?; let child = context.temp_dir.join("foo"); - uv_snapshot!(context.filters(), context.init().current_dir(&context.temp_dir).arg(&child), @r###" + uv_snapshot!(context.filters(), context.init().current_dir(&context.temp_dir).arg(&child), @" success: true exit_code: 0 ----- stdout ----- @@ -2056,7 +2056,7 @@ fn init_explicit_workspace() -> Result<()> { ----- stderr ----- Adding `foo` as member of workspace `[TEMP_DIR]/` Initialized project `foo` at `[TEMP_DIR]/foo` - "###); + "); let workspace = context.read("pyproject.toml"); insta::with_settings!({ @@ -2090,14 +2090,14 @@ fn init_virtual_project() -> Result<()> { let pyproject_toml = child.join("pyproject.toml"); - uv_snapshot!(context.filters(), context.init().current_dir(&child).arg("--virtual"), @r###" + uv_snapshot!(context.filters(), context.init().current_dir(&child).arg("--virtual"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Initialized project `foo` - "###); + "); let pyproject = fs_err::read_to_string(&pyproject_toml)?; insta::with_settings!({ @@ -2116,7 +2116,7 @@ fn init_virtual_project() -> Result<()> { ); }); - uv_snapshot!(context.filters(), context.init().current_dir(&child).arg("bar"), @r###" + uv_snapshot!(context.filters(), context.init().current_dir(&child).arg("bar"), @" success: true exit_code: 0 ----- stdout ----- @@ -2124,7 +2124,7 @@ fn init_virtual_project() -> Result<()> { ----- stderr ----- Adding `bar` as member of workspace `[TEMP_DIR]/foo` Initialized project `bar` at `[TEMP_DIR]/foo/bar` - "###); + "); let pyproject = fs_err::read_to_string(pyproject_toml)?; insta::with_settings!({ @@ -2168,7 +2168,7 @@ fn init_virtual_workspace() -> Result<()> { ", })?; - uv_snapshot!(context.filters(), context.init().current_dir(&child).arg("bar"), @r###" + uv_snapshot!(context.filters(), context.init().current_dir(&child).arg("bar"), @" success: true exit_code: 0 ----- stdout ----- @@ -2176,7 +2176,7 @@ fn init_virtual_workspace() -> Result<()> { ----- stderr ----- Adding `bar` as member of workspace `[TEMP_DIR]/foo` Initialized project `bar` at `[TEMP_DIR]/foo/bar` - "###); + "); let pyproject = fs_err::read_to_string(pyproject_toml)?; insta::with_settings!({ @@ -2208,7 +2208,7 @@ fn init_nested_virtual_workspace() -> Result<()> { ", })?; - uv_snapshot!(context.filters(), context.init().current_dir(&context.temp_dir).arg("--virtual").arg("foo"), @r###" + uv_snapshot!(context.filters(), context.init().current_dir(&context.temp_dir).arg("--virtual").arg("foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -2216,7 +2216,7 @@ fn init_nested_virtual_workspace() -> Result<()> { ----- stderr ----- Adding `foo` as member of workspace `[TEMP_DIR]/` Initialized project `foo` at `[TEMP_DIR]/foo` - "###); + "); let pyproject = context.read("foo/pyproject.toml"); insta::with_settings!({ @@ -2271,7 +2271,7 @@ fn init_matches_members() -> Result<()> { let packages = context.temp_dir.join("packages"); fs_err::create_dir_all(packages.join("foo"))?; - uv_snapshot!(context.filters(), context.init().current_dir(context.temp_dir.join("packages")).arg("foo"), @r###" + uv_snapshot!(context.filters(), context.init().current_dir(context.temp_dir.join("packages")).arg("foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -2279,17 +2279,17 @@ fn init_matches_members() -> Result<()> { ----- stderr ----- Project `foo` is already a member of workspace `[TEMP_DIR]/` Initialized project `foo` at `[TEMP_DIR]/packages/foo` - "###); + "); let workspace = context.read("pyproject.toml"); insta::with_settings!({ filters => context.filters(), }, { assert_snapshot!( - workspace, @r###" + workspace, @" [tool.uv.workspace] members = ['packages/*'] - "### + " ); }); @@ -2313,7 +2313,7 @@ fn init_matches_exclude() -> Result<()> { let packages = context.temp_dir.join("packages"); fs_err::create_dir_all(packages)?; - uv_snapshot!(context.filters(), context.init().current_dir(context.temp_dir.join("packages")).arg("foo"), @r###" + uv_snapshot!(context.filters(), context.init().current_dir(context.temp_dir.join("packages")).arg("foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -2321,18 +2321,18 @@ fn init_matches_exclude() -> Result<()> { ----- stderr ----- Project `foo` is excluded by workspace `[TEMP_DIR]/` Initialized project `foo` at `[TEMP_DIR]/packages/foo` - "###); + "); let workspace = context.read("pyproject.toml"); insta::with_settings!({ filters => context.filters(), }, { assert_snapshot!( - workspace, @r###" + workspace, @" [tool.uv.workspace] exclude = ['packages/foo'] members = ['packages/*'] - "### + " ); }); @@ -2358,7 +2358,7 @@ fn init_requires_python_workspace() -> Result<()> { })?; let child = context.temp_dir.join("foo"); - uv_snapshot!(context.filters(), context.init().current_dir(&context.temp_dir).arg(&child), @r###" + uv_snapshot!(context.filters(), context.init().current_dir(&context.temp_dir).arg(&child), @" success: true exit_code: 0 ----- stdout ----- @@ -2366,14 +2366,14 @@ fn init_requires_python_workspace() -> Result<()> { ----- stderr ----- Adding `foo` as member of workspace `[TEMP_DIR]/` Initialized project `foo` at `[TEMP_DIR]/foo` - "###); + "); let pyproject_toml = fs_err::read_to_string(child.join("pyproject.toml"))?; insta::with_settings!({ filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "foo" version = "0.1.0" @@ -2381,7 +2381,7 @@ fn init_requires_python_workspace() -> Result<()> { readme = "README.md" requires-python = ">=3.10" dependencies = [] - "### + "# ); }); @@ -2416,7 +2416,7 @@ fn init_requires_python_version() -> Result<()> { })?; let child = context.temp_dir.join("foo"); - uv_snapshot!(context.filters(), context.init().current_dir(&context.temp_dir).arg(&child).arg("--python").arg("3.9"), @r###" + uv_snapshot!(context.filters(), context.init().current_dir(&context.temp_dir).arg(&child).arg("--python").arg("3.9"), @" success: true exit_code: 0 ----- stdout ----- @@ -2424,7 +2424,7 @@ fn init_requires_python_version() -> Result<()> { ----- stderr ----- Adding `foo` as member of workspace `[TEMP_DIR]/` Initialized project `foo` at `[TEMP_DIR]/foo` - "###); + "); let pyproject_toml = fs_err::read_to_string(child.join("pyproject.toml"))?; insta::with_settings!({ @@ -2475,7 +2475,7 @@ fn init_requires_python_specifiers() -> Result<()> { })?; let child = context.temp_dir.join("foo"); - uv_snapshot!(context.filters(), context.init().current_dir(&context.temp_dir).arg(&child).arg("--python").arg("==3.9.*"), @r" + uv_snapshot!(context.filters(), context.init().current_dir(&context.temp_dir).arg(&child).arg("--python").arg("==3.9.*"), @" success: true exit_code: 0 ----- stdout ----- @@ -2490,7 +2490,7 @@ fn init_requires_python_specifiers() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "foo" version = "0.1.0" @@ -2498,7 +2498,7 @@ fn init_requires_python_specifiers() -> Result<()> { readme = "README.md" requires-python = "==3.9.*" dependencies = [] - "### + "# ); }); @@ -2522,14 +2522,14 @@ fn init_requires_python_version_file() -> Result<()> { context.temp_dir.child(".python-version").write_str("3.9")?; let child = context.temp_dir.join("foo"); - uv_snapshot!(context.filters(), context.init().current_dir(&context.temp_dir).arg(&child), @r###" + uv_snapshot!(context.filters(), context.init().current_dir(&context.temp_dir).arg(&child), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Initialized project `foo` at `[TEMP_DIR]/foo` - "###); + "); let pyproject_toml = fs_err::read_to_string(child.join("pyproject.toml"))?; insta::with_settings!({ @@ -2560,7 +2560,7 @@ fn init_existing_environment() -> Result<()> { child.create_dir_all()?; // Create a new virtual environment in the directory - uv_snapshot!(context.filters(), context.venv().current_dir(&child).arg("--python").arg("3.12"), @r###" + uv_snapshot!(context.filters(), context.venv().current_dir(&child).arg("--python").arg("3.12"), @" success: true exit_code: 0 ----- stdout ----- @@ -2569,23 +2569,23 @@ fn init_existing_environment() -> Result<()> { Using CPython 3.12.[X] interpreter at: [PYTHON-3.12] Creating virtual environment at: .venv Activate with: source .venv/[BIN]/activate - "###); + "); - uv_snapshot!(context.filters(), context.init().current_dir(&context.temp_dir).arg(child.as_os_str()), @r###" + uv_snapshot!(context.filters(), context.init().current_dir(&context.temp_dir).arg(child.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Initialized project `foo` at `[TEMP_DIR]/foo` - "###); + "); let pyproject_toml = fs_err::read_to_string(child.join("pyproject.toml"))?; insta::with_settings!({ filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "foo" version = "0.1.0" @@ -2593,7 +2593,7 @@ fn init_existing_environment() -> Result<()> { readme = "README.md" requires-python = ">=3.12" dependencies = [] - "### + "# ); }); @@ -2606,7 +2606,7 @@ fn init_existing_environment_parent() -> Result<()> { let context = TestContext::new_with_versions(&["3.9", "3.12"]); // Create a new virtual environment in the parent directory - uv_snapshot!(context.filters(), context.venv().current_dir(&context.temp_dir).arg("--python").arg("3.12"), @r###" + uv_snapshot!(context.filters(), context.venv().current_dir(&context.temp_dir).arg("--python").arg("3.12"), @" success: true exit_code: 0 ----- stdout ----- @@ -2615,25 +2615,25 @@ fn init_existing_environment_parent() -> Result<()> { Using CPython 3.12.[X] interpreter at: [PYTHON-3.12] Creating virtual environment at: .venv Activate with: source .venv/[BIN]/activate - "###); + "); let child = context.temp_dir.child("foo"); - uv_snapshot!(context.filters(), context.init().current_dir(&context.temp_dir).arg(child.as_os_str()), @r###" + uv_snapshot!(context.filters(), context.init().current_dir(&context.temp_dir).arg(child.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Initialized project `foo` at `[TEMP_DIR]/foo` - "###); + "); let pyproject_toml = fs_err::read_to_string(child.join("pyproject.toml"))?; insta::with_settings!({ filters => context.filters(), }, { assert_snapshot!( - pyproject_toml, @r###" + pyproject_toml, @r#" [project] name = "foo" version = "0.1.0" @@ -2641,7 +2641,7 @@ fn init_existing_environment_parent() -> Result<()> { readme = "README.md" requires-python = ">=3.9" dependencies = [] - "### + "# ); }); @@ -2661,24 +2661,24 @@ fn init_unmanaged() -> Result<()> { ", })?; - uv_snapshot!(context.filters(), context.init().arg("foo"), @r###" + uv_snapshot!(context.filters(), context.init().arg("foo"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Initialized project `foo` at `[TEMP_DIR]/foo` - "###); + "); let workspace = context.read("pyproject.toml"); insta::with_settings!({ filters => context.filters(), }, { assert_snapshot!( - workspace, @r###" + workspace, @" [tool.uv] managed = false - "### + " ); }); @@ -2689,14 +2689,14 @@ fn init_unmanaged() -> Result<()> { fn init_hidden() { let context = TestContext::new("3.12"); - uv_snapshot!(context.filters(), context.init().arg(".foo"), @r###" + uv_snapshot!(context.filters(), context.init().arg(".foo"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: The target directory (`.foo`) is not a valid package name. Please provide a package name with `--name`. - "###); + "); } #[test] @@ -2709,14 +2709,14 @@ fn init_non_ascii_directory() -> Result<()> { let mut command = context.init(); command.current_dir(directory.path()); - uv_snapshot!(context.filters(), command, @r###" + uv_snapshot!(context.filters(), command, @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: The current directory (`püthon`) is not a valid package name. Please provide a package name with `--name`. - "###); + "); Ok(()) } @@ -2730,7 +2730,7 @@ fn init_failure() -> Result<()> { let pyproject_toml = context.temp_dir.child("pyproject.toml"); pyproject_toml.touch()?; - uv_snapshot!(context.filters(), context.init().arg("foo"), @r###" + uv_snapshot!(context.filters(), context.init().arg("foo"), @" success: false exit_code: 2 ----- stdout ----- @@ -2738,23 +2738,23 @@ fn init_failure() -> Result<()> { ----- stderr ----- error: Failed to discover parent workspace; use `uv init --no-workspace` to ignore Caused by: No `project` table found in: `[TEMP_DIR]/pyproject.toml` - "###); + "); - uv_snapshot!(context.filters(), context.init().arg("foo").arg("--no-workspace"), @r###" + uv_snapshot!(context.filters(), context.init().arg("foo").arg("--no-workspace"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Initialized project `foo` at `[TEMP_DIR]/foo` - "###); + "); let workspace = context.read("foo/pyproject.toml"); insta::with_settings!({ filters => context.filters(), }, { assert_snapshot!( - workspace, @r###" + workspace, @r#" [project] name = "foo" version = "0.1.0" @@ -2762,7 +2762,7 @@ fn init_failure() -> Result<()> { readme = "README.md" requires-python = ">=3.12" dependencies = [] - "### + "# ); }); @@ -2772,7 +2772,7 @@ fn init_failure() -> Result<()> { #[test] fn init_failure_with_invalid_option_named_backend() { let context = TestContext::new("3.12"); - uv_snapshot!(context.filters(), context.init().arg("foo").arg("--backend"), @r###" + uv_snapshot!(context.filters(), context.init().arg("foo").arg("--backend"), @" success: false exit_code: 2 ----- stdout ----- @@ -2785,8 +2785,8 @@ fn init_failure_with_invalid_option_named_backend() { Usage: uv init [OPTIONS] [PATH] For more information, try '--help'. - "###); - uv_snapshot!(context.filters(), context.init().arg("foo").arg("--backend").arg("maturin"), @r###" + "); + uv_snapshot!(context.filters(), context.init().arg("foo").arg("--backend").arg("maturin"), @" success: false exit_code: 2 ----- stdout ----- @@ -2799,7 +2799,7 @@ fn init_failure_with_invalid_option_named_backend() { Usage: uv init [OPTIONS] [PATH] For more information, try '--help'. - "###); + "); } #[test] #[cfg(feature = "git")] @@ -2808,21 +2808,21 @@ fn init_git() -> Result<()> { let child = context.temp_dir.child("foo"); - uv_snapshot!(context.filters(), context.init().arg(child.as_ref()), @r###" + uv_snapshot!(context.filters(), context.init().arg(child.as_ref()), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Initialized project `foo` at `[TEMP_DIR]/foo` - "###); + "); let gitignore = fs_err::read_to_string(child.join(".gitignore"))?; insta::with_settings!({ filters => context.filters(), }, { assert_snapshot!( - gitignore, @r###" + gitignore, @" # Python-generated files __pycache__/ *.py[oc] @@ -2833,7 +2833,7 @@ fn init_git() -> Result<()> { # Virtual environments .venv - "### + " ); }); @@ -2848,14 +2848,14 @@ fn init_vcs_none() { let child = context.temp_dir.child("foo"); - uv_snapshot!(context.filters(), context.init().arg(child.as_ref()).arg("--vcs").arg("none"), @r###" + uv_snapshot!(context.filters(), context.init().arg(child.as_ref()).arg("--vcs").arg("none"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Initialized project `foo` at `[TEMP_DIR]/foo` - "###); + "); child.child(".gitignore").assert(predicate::path::missing()); child.child(".git").assert(predicate::path::missing()); @@ -2875,26 +2875,26 @@ fn init_inside_git_repo() { let child = context.temp_dir.child("foo"); - uv_snapshot!(context.filters(), context.init().arg(child.as_ref()).arg("--vcs").arg("git"), @r###" + uv_snapshot!(context.filters(), context.init().arg(child.as_ref()).arg("--vcs").arg("git"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Initialized project `foo` at `[TEMP_DIR]/foo` - "###); + "); child.child(".gitignore").assert(predicate::path::missing()); let child = context.temp_dir.child("bar"); - uv_snapshot!(context.filters(), context.init().arg(child.as_ref()), @r###" + uv_snapshot!(context.filters(), context.init().arg(child.as_ref()), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Initialized project `bar` at `[TEMP_DIR]/bar` - "###); + "); child.child(".gitignore").assert(predicate::path::missing()); } @@ -2906,26 +2906,26 @@ fn init_git_not_installed() { let child = context.temp_dir.child("foo"); // Without explicit `--vcs git`, `uv init` succeeds without initializing a Git repository. - uv_snapshot!(context.filters(), context.init().env(EnvVars::PATH, &*child).arg(child.as_ref()), @r###" + uv_snapshot!(context.filters(), context.init().env(EnvVars::PATH, &*child).arg(child.as_ref()), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Initialized project `foo` at `[TEMP_DIR]/foo` - "###); + "); // With explicit `--vcs git`, `uv init` will fail. let child = context.temp_dir.child("bar"); // Set `PATH` to child to make `git` command cannot be found. - uv_snapshot!(context.filters(), context.init().env(EnvVars::PATH, &*child).arg(child.as_ref()).arg("--vcs").arg("git"), @r###" + uv_snapshot!(context.filters(), context.init().env(EnvVars::PATH, &*child).arg(child.as_ref()).arg("--vcs").arg("git"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: Attempted to initialize a Git repository, but `git` was not found in PATH - "###); + "); } #[test] @@ -3070,21 +3070,21 @@ fn init_application_package_flit() -> Result<()> { let pyproject_toml = child.join("pyproject.toml"); let init_py = child.join("src").join("foo").join("__init__.py"); - uv_snapshot!(context.filters(), context.init().current_dir(&child).arg("--app").arg("--package").arg("--build-backend").arg("flit"), @r###" + uv_snapshot!(context.filters(), context.init().current_dir(&child).arg("--app").arg("--package").arg("--build-backend").arg("flit"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Initialized project `foo` - "###); + "); let pyproject = fs_err::read_to_string(&pyproject_toml)?; insta::with_settings!({ filters => context.filters(), }, { assert_snapshot!( - pyproject, @r###" + pyproject, @r#" [project] name = "foo" version = "0.1.0" @@ -3099,7 +3099,7 @@ fn init_application_package_flit() -> Result<()> { [build-system] requires = ["flit_core>=3.2,<4"] build-backend = "flit_core.buildapi" - "### + "# ); }); @@ -3108,14 +3108,14 @@ fn init_application_package_flit() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - init, @r###" + init, @r#" def main() -> None: print("Hello from foo!") - "### + "# ); }); - uv_snapshot!(context.filters(), context.run().current_dir(&child).env_remove(EnvVars::VIRTUAL_ENV).arg("foo"), @r###" + uv_snapshot!(context.filters(), context.run().current_dir(&child).env_remove(EnvVars::VIRTUAL_ENV).arg("foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -3128,7 +3128,7 @@ fn init_application_package_flit() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + foo==0.1.0 (from file://[TEMP_DIR]/foo) - "###); + "); Ok(()) } @@ -3145,21 +3145,21 @@ fn init_library_flit() -> Result<()> { let init_py = child.join("src").join("foo").join("__init__.py"); let py_typed = child.join("src").join("foo").join("py.typed"); - uv_snapshot!(context.filters(), context.init().current_dir(&child).arg("--lib").arg("--build-backend").arg("flit"), @r###" + uv_snapshot!(context.filters(), context.init().current_dir(&child).arg("--lib").arg("--build-backend").arg("flit"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Initialized project `foo` - "###); + "); let pyproject = fs_err::read_to_string(&pyproject_toml)?; insta::with_settings!({ filters => context.filters(), }, { assert_snapshot!( - pyproject, @r###" + pyproject, @r#" [project] name = "foo" version = "0.1.0" @@ -3171,7 +3171,7 @@ fn init_library_flit() -> Result<()> { [build-system] requires = ["flit_core>=3.2,<4"] build-backend = "flit_core.buildapi" - "### + "# ); }); @@ -3180,10 +3180,10 @@ fn init_library_flit() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - init, @r###" + init, @r#" def hello() -> str: return "Hello from foo!" - "### + "# ); }); @@ -3196,7 +3196,7 @@ fn init_library_flit() -> Result<()> { ); }); - uv_snapshot!(context.filters(), context.run().current_dir(&child).env_remove(EnvVars::VIRTUAL_ENV).arg("python").arg("-c").arg("import foo; print(foo.hello())"), @r###" + uv_snapshot!(context.filters(), context.run().current_dir(&child).env_remove(EnvVars::VIRTUAL_ENV).arg("python").arg("-c").arg("import foo; print(foo.hello())"), @" success: true exit_code: 0 ----- stdout ----- @@ -3209,7 +3209,7 @@ fn init_library_flit() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + foo==0.1.0 (from file://[TEMP_DIR]/foo) - "###); + "); Ok(()) } @@ -3219,14 +3219,14 @@ fn init_library_flit() -> Result<()> { fn init_backend_implies_package() { let context = TestContext::new("3.12"); - uv_snapshot!(context.filters(), context.init().arg("project").arg("--build-backend").arg("flit"), @r#" + uv_snapshot!(context.filters(), context.init().arg("project").arg("--build-backend").arg("flit"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Initialized project `project` at `[TEMP_DIR]/project` - "#); + "); let pyproject = context.read("project/pyproject.toml"); insta::with_settings!({ @@ -3265,21 +3265,21 @@ fn init_library_poetry() -> Result<()> { let init_py = child.join("src").join("foo").join("__init__.py"); let py_typed = child.join("src").join("foo").join("py.typed"); - uv_snapshot!(context.filters(), context.init().current_dir(&child).arg("--lib").arg("--build-backend").arg("poetry"), @r###" + uv_snapshot!(context.filters(), context.init().current_dir(&child).arg("--lib").arg("--build-backend").arg("poetry"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Initialized project `foo` - "###); + "); let pyproject = fs_err::read_to_string(&pyproject_toml)?; insta::with_settings!({ filters => context.filters(), }, { assert_snapshot!( - pyproject, @r###" + pyproject, @r#" [project] name = "foo" version = "0.1.0" @@ -3291,7 +3291,7 @@ fn init_library_poetry() -> Result<()> { [build-system] requires = ["poetry-core>=2,<3"] build-backend = "poetry.core.masonry.api" - "### + "# ); }); @@ -3300,10 +3300,10 @@ fn init_library_poetry() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - init, @r###" + init, @r#" def hello() -> str: return "Hello from foo!" - "### + "# ); }); @@ -3316,7 +3316,7 @@ fn init_library_poetry() -> Result<()> { ); }); - uv_snapshot!(context.filters(), context.run().current_dir(&child).env_remove(EnvVars::VIRTUAL_ENV).arg("python").arg("-c").arg("import foo; print(foo.hello())"), @r###" + uv_snapshot!(context.filters(), context.run().current_dir(&child).env_remove(EnvVars::VIRTUAL_ENV).arg("python").arg("-c").arg("import foo; print(foo.hello())"), @" success: true exit_code: 0 ----- stdout ----- @@ -3329,7 +3329,7 @@ fn init_library_poetry() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + foo==0.1.0 (from file://[TEMP_DIR]/foo) - "###); + "); Ok(()) } @@ -3349,21 +3349,21 @@ fn init_app_build_backend_maturin() -> Result<()> { let lib_core = child.join("src").join("lib.rs"); let build_file = child.join("Cargo.toml"); - uv_snapshot!(context.filters(), context.init().current_dir(&child).arg("--app").arg("--package").arg("--build-backend").arg("maturin"), @r###" + uv_snapshot!(context.filters(), context.init().current_dir(&child).arg("--app").arg("--package").arg("--build-backend").arg("maturin"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Initialized project `foo` - "###); + "); let pyproject = fs_err::read_to_string(&pyproject_toml)?; insta::with_settings!({ filters => context.filters(), }, { assert_snapshot!( - pyproject, @r###" + pyproject, @r#" [project] name = "foo" version = "0.1.0" @@ -3386,7 +3386,7 @@ fn init_app_build_backend_maturin() -> Result<()> { [build-system] requires = ["maturin>=1.0,<2.0"] build-backend = "maturin" - "### + "# ); }); @@ -3395,13 +3395,13 @@ fn init_app_build_backend_maturin() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - init, @r###" + init, @" from foo._core import hello_from_bin def main() -> None: print(hello_from_bin()) - "### + " ); }); @@ -3410,9 +3410,7 @@ fn init_app_build_backend_maturin() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyi_contents, @r###" - def hello_from_bin() -> str: ... - "### + pyi_contents, @"def hello_from_bin() -> str: ..." ); }); @@ -3421,7 +3419,7 @@ fn init_app_build_backend_maturin() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - lib_core_contents, @r###" + lib_core_contents, @r#" use pyo3::prelude::*; /// A Python module implemented in Rust. The name of this module must match @@ -3436,7 +3434,7 @@ fn init_app_build_backend_maturin() -> Result<()> { "Hello from foo!".to_string() } } - "### + "# ); }); @@ -3445,7 +3443,7 @@ fn init_app_build_backend_maturin() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - build_file_contents, @r###" + build_file_contents, @r#" [package] name = "foo" version = "0.1.0" @@ -3460,7 +3458,7 @@ fn init_app_build_backend_maturin() -> Result<()> { # "extension-module" tells pyo3 we want to build an extension module (skips linking against libpython.so) # "abi3-py39" tells pyo3 (and maturin) to build using the stable ABI with minimum Python version 3.9 pyo3 = { version = "0.27.1", features = ["extension-module", "abi3-py39"] } - "### + "# ); }); @@ -3481,21 +3479,21 @@ fn init_app_build_backend_scikit() -> Result<()> { let lib_core = child.join("src").join("main.cpp"); let build_file = child.join("CMakeLists.txt"); - uv_snapshot!(context.filters(), context.init().current_dir(&child).arg("--app").arg("--package").arg("--build-backend").arg("scikit"), @r###" + uv_snapshot!(context.filters(), context.init().current_dir(&child).arg("--app").arg("--package").arg("--build-backend").arg("scikit"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Initialized project `foo` - "###); + "); let pyproject = fs_err::read_to_string(&pyproject_toml)?; insta::with_settings!({ filters => context.filters(), }, { assert_snapshot!( - pyproject, @r###" + pyproject, @r#" [project] name = "foo" version = "0.1.0" @@ -3517,7 +3515,7 @@ fn init_app_build_backend_scikit() -> Result<()> { [build-system] requires = ["scikit-build-core>=0.10", "pybind11"] build-backend = "scikit_build_core.build" - "### + "# ); }); @@ -3526,13 +3524,13 @@ fn init_app_build_backend_scikit() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - init, @r###" + init, @" from foo._core import hello_from_bin def main() -> None: print(hello_from_bin()) - "### + " ); }); @@ -3541,9 +3539,7 @@ fn init_app_build_backend_scikit() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyi_contents, @r###" - def hello_from_bin() -> str: ... - "### + pyi_contents, @"def hello_from_bin() -> str: ..." ); }); @@ -3552,7 +3548,7 @@ fn init_app_build_backend_scikit() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - lib_core_contents, @r###" + lib_core_contents, @r#" #include std::string hello_from_bin() { return "Hello from foo!"; } @@ -3566,7 +3562,7 @@ fn init_app_build_backend_scikit() -> Result<()> { A function that returns a Hello string. )pbdoc"); } - "### + "# ); }); @@ -3575,7 +3571,7 @@ fn init_app_build_backend_scikit() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - build_file_contents, @r###" + build_file_contents, @" cmake_minimum_required(VERSION 3.15) project(${SKBUILD_PROJECT_NAME} LANGUAGES CXX) @@ -3584,7 +3580,7 @@ fn init_app_build_backend_scikit() -> Result<()> { pybind11_add_module(_core MODULE src/main.cpp) install(TARGETS _core DESTINATION ${SKBUILD_PROJECT_NAME}) - "### + " ); }); @@ -3608,21 +3604,21 @@ fn init_lib_build_backend_maturin() -> Result<()> { let lib_core = child.join("src").join("lib.rs"); let build_file = child.join("Cargo.toml"); - uv_snapshot!(context.filters(), context.init().current_dir(&child).arg("--lib").arg("--build-backend").arg("maturin"), @r###" + uv_snapshot!(context.filters(), context.init().current_dir(&child).arg("--lib").arg("--build-backend").arg("maturin"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Initialized project `foo` - "###); + "); let pyproject = fs_err::read_to_string(&pyproject_toml)?; insta::with_settings!({ filters => context.filters(), }, { assert_snapshot!( - pyproject, @r###" + pyproject, @r#" [project] name = "foo" version = "0.1.0" @@ -3642,7 +3638,7 @@ fn init_lib_build_backend_maturin() -> Result<()> { [build-system] requires = ["maturin>=1.0,<2.0"] build-backend = "maturin" - "### + "# ); }); @@ -3651,13 +3647,13 @@ fn init_lib_build_backend_maturin() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - init, @r###" + init, @" from foo._core import hello_from_bin def hello() -> str: return hello_from_bin() - "### + " ); }); @@ -3666,9 +3662,7 @@ fn init_lib_build_backend_maturin() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyi_contents, @r###" - def hello_from_bin() -> str: ... - "### + pyi_contents, @"def hello_from_bin() -> str: ..." ); }); @@ -3677,7 +3671,7 @@ fn init_lib_build_backend_maturin() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - lib_core_contents, @r###" + lib_core_contents, @r#" use pyo3::prelude::*; /// A Python module implemented in Rust. The name of this module must match @@ -3692,7 +3686,7 @@ fn init_lib_build_backend_maturin() -> Result<()> { "Hello from foo!".to_string() } } - "### + "# ); }); @@ -3701,7 +3695,7 @@ fn init_lib_build_backend_maturin() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - build_file_contents, @r###" + build_file_contents, @r#" [package] name = "foo" version = "0.1.0" @@ -3716,7 +3710,7 @@ fn init_lib_build_backend_maturin() -> Result<()> { # "extension-module" tells pyo3 we want to build an extension module (skips linking against libpython.so) # "abi3-py39" tells pyo3 (and maturin) to build using the stable ABI with minimum Python version 3.9 pyo3 = { version = "0.27.1", features = ["extension-module", "abi3-py39"] } - "### + "# ); }); @@ -3737,21 +3731,21 @@ fn init_lib_build_backend_scikit() -> Result<()> { let lib_core = child.join("src").join("main.cpp"); let build_file = child.join("CMakeLists.txt"); - uv_snapshot!(context.filters(), context.init().current_dir(&child).arg("--lib").arg("--build-backend").arg("scikit"), @r###" + uv_snapshot!(context.filters(), context.init().current_dir(&child).arg("--lib").arg("--build-backend").arg("scikit"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Initialized project `foo` - "###); + "); let pyproject = fs_err::read_to_string(&pyproject_toml)?; insta::with_settings!({ filters => context.filters(), }, { assert_snapshot!( - pyproject, @r###" + pyproject, @r#" [project] name = "foo" version = "0.1.0" @@ -3770,7 +3764,7 @@ fn init_lib_build_backend_scikit() -> Result<()> { [build-system] requires = ["scikit-build-core>=0.10", "pybind11"] build-backend = "scikit_build_core.build" - "### + "# ); }); @@ -3779,13 +3773,13 @@ fn init_lib_build_backend_scikit() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - init, @r###" + init, @" from foo._core import hello_from_bin def hello() -> str: return hello_from_bin() - "### + " ); }); @@ -3794,9 +3788,7 @@ fn init_lib_build_backend_scikit() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - pyi_contents, @r###" - def hello_from_bin() -> str: ... - "### + pyi_contents, @"def hello_from_bin() -> str: ..." ); }); @@ -3805,7 +3797,7 @@ fn init_lib_build_backend_scikit() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - lib_core_contents, @r###" + lib_core_contents, @r#" #include std::string hello_from_bin() { return "Hello from foo!"; } @@ -3819,7 +3811,7 @@ fn init_lib_build_backend_scikit() -> Result<()> { A function that returns a Hello string. )pbdoc"); } - "### + "# ); }); @@ -3828,7 +3820,7 @@ fn init_lib_build_backend_scikit() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - build_file_contents, @r###" + build_file_contents, @" cmake_minimum_required(VERSION 3.15) project(${SKBUILD_PROJECT_NAME} LANGUAGES CXX) @@ -3837,7 +3829,7 @@ fn init_lib_build_backend_scikit() -> Result<()> { pybind11_add_module(_core MODULE src/main.cpp) install(TARGETS _core DESTINATION ${SKBUILD_PROJECT_NAME}) - "### + " ); }); @@ -3857,14 +3849,14 @@ fn init_application_package_hatchling() -> Result<()> { let pyproject_toml = child.join("pyproject.toml"); let init_py = child.join("src").join("foo").join("__init__.py"); - uv_snapshot!(context.filters(), context.init().current_dir(&child).arg("--app").arg("--package").arg("--build-backend").arg("hatchling"), @r###" + uv_snapshot!(context.filters(), context.init().current_dir(&child).arg("--app").arg("--package").arg("--build-backend").arg("hatchling"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Initialized project `foo` - "###); + "); let pyproject = fs_err::read_to_string(&pyproject_toml)?; assert_snapshot!( @@ -3891,14 +3883,14 @@ fn init_application_package_hatchling() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - init, @r###" + init, @r#" def main() -> None: print("Hello from foo!") - "### + "# ); }); - uv_snapshot!(context.filters(), context.run().arg("foo").current_dir(&child).env_remove(EnvVars::VIRTUAL_ENV), @r###" + uv_snapshot!(context.filters(), context.run().arg("foo").current_dir(&child).env_remove(EnvVars::VIRTUAL_ENV), @" success: true exit_code: 0 ----- stdout ----- @@ -3911,7 +3903,7 @@ fn init_application_package_hatchling() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + foo==0.1.0 (from file://[TEMP_DIR]/foo) - "###); + "); Ok(()) } @@ -4006,14 +3998,14 @@ fn init_without_description() -> Result<()> { #[test] fn init_python_variant() { let context = TestContext::new("3.13"); - uv_snapshot!(context.filters(), context.init().arg("foo").arg("--python").arg("3.13t"), @r###" + uv_snapshot!(context.filters(), context.init().arg("foo").arg("--python").arg("3.13t"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Initialized project `foo` at `[TEMP_DIR]/foo` - "###); + "); let contents = context.read("foo/.python-version"); assert_snapshot!(contents, @"3.13+freethreaded"); @@ -4067,7 +4059,7 @@ fn git_states() { .init() .arg("broken-git") .arg("--vcs") - .arg("git"), @r" + .arg("git"), @" success: false exit_code: 2 ----- stdout ----- @@ -4089,24 +4081,24 @@ fn init_project_flag_is_not_allowed_under_preview() -> Result<()> { child.create_dir_all()?; // Positional `path` provided - uv_snapshot!(context.filters(), context.init().arg("--preview-features").arg("init-project-flag").arg("--project").arg("foo").arg("bar"), @r###" + uv_snapshot!(context.filters(), context.init().arg("--preview-features").arg("init-project-flag").arg("--project").arg("foo").arg("bar"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: The `--project` option cannot be used in `uv init`. Use `--directory` instead. - "###); + "); // No positional `path` provided - uv_snapshot!(context.filters(), context.init().arg("--preview-features").arg("init-project-flag").arg("--project").arg("foo"), @r###" + uv_snapshot!(context.filters(), context.init().arg("--preview-features").arg("init-project-flag").arg("--project").arg("foo"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: The `--project` option cannot be used in `uv init`. Use `--directory` or a positional path instead. - "###); + "); Ok(()) } @@ -4116,7 +4108,7 @@ fn init_project_flag_is_ignored_with_explicit_path() { let context = TestContext::new("3.12"); // with explicit path - uv_snapshot!(context.filters(), context.init().arg("--project").arg("bar").arg("foo"), @r###" + uv_snapshot!(context.filters(), context.init().arg("--project").arg("bar").arg("foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -4124,14 +4116,14 @@ fn init_project_flag_is_ignored_with_explicit_path() { ----- stderr ----- warning: Use of the `--project` option in `uv init` is deprecated and will be removed in a future release. Since a positional path was provided, the `--project` option has no effect. Consider using `--directory` instead. Initialized project `foo` at `[TEMP_DIR]/foo` - "###); + "); let pyproject = context.read("foo/pyproject.toml"); insta::with_settings!({ filters => context.filters(), }, { assert_snapshot!( - pyproject, @r###" + pyproject, @r#" [project] name = "foo" version = "0.1.0" @@ -4139,7 +4131,7 @@ fn init_project_flag_is_ignored_with_explicit_path() { readme = "README.md" requires-python = ">=3.12" dependencies = [] - "### + "# ); }); } @@ -4149,7 +4141,7 @@ fn init_project_flag_is_warned_without_path() { let context = TestContext::new("3.12"); // with explicit path - uv_snapshot!(context.filters(), context.init().arg("--project").arg("bar"), @r###" + uv_snapshot!(context.filters(), context.init().arg("--project").arg("bar"), @" success: true exit_code: 0 ----- stdout ----- @@ -4157,7 +4149,7 @@ fn init_project_flag_is_warned_without_path() { ----- stderr ----- warning: Use of the `--project` option in `uv init` is deprecated and will be removed in a future release. Consider using `uv init ` instead. Initialized project `bar` - "###); + "); context .temp_dir @@ -4173,14 +4165,14 @@ fn init_working_directory_change() -> Result<()> { let child = context.temp_dir.child("bar"); child.create_dir_all()?; - uv_snapshot!(context.filters(), context.init().arg("--directory").arg("bar").arg("foo"), @r###" + uv_snapshot!(context.filters(), context.init().arg("--directory").arg("bar").arg("foo"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Initialized project `foo` at `[TEMP_DIR]/bar/foo` - "###); + "); context .temp_dir diff --git a/crates/uv/tests/it/lock.rs b/crates/uv/tests/it/lock.rs index 8c4d3fd24..77980bc2c 100644 --- a/crates/uv/tests/it/lock.rs +++ b/crates/uv/tests/it/lock.rs @@ -30,14 +30,14 @@ fn lock_wheel_registry() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -99,28 +99,28 @@ fn lock_wheel_registry() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); // Re-run with `--offline`. We shouldn't need a network connection to validate an // already-correct lockfile with immutable metadata. - uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline").arg("--no-cache"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline").arg("--no-cache"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -131,17 +131,17 @@ fn lock_wheel_registry() -> Result<()> { + anyio==3.7.0 + idna==3.6 + sniffio==1.3.1 - "###); + "); // Re-install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Audited 3 packages in [TIME] - "###); + "); Ok(()) } @@ -162,14 +162,14 @@ fn lock_sdist_registry() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -206,17 +206,17 @@ fn lock_sdist_registry() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -225,17 +225,17 @@ fn lock_sdist_registry() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + source-distribution==0.0.1 - "###); + "); // Re-install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Audited 1 package in [TIME] - "###); + "); Ok(()) } @@ -260,14 +260,14 @@ fn lock_sdist_git() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -303,28 +303,28 @@ fn lock_sdist_git() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); // Re-run with `--offline`. We shouldn't need a network connection to validate an // already-correct lockfile with immutable metadata. - uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline").arg("--no-cache"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline").arg("--no-cache"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -333,7 +333,7 @@ fn lock_sdist_git() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + uv-public-pypackage==0.1.0 (from git+https://github.com/astral-test/uv-public-pypackage@0dacfd662c64cb4ceb16e6cf65a157a8b715b979) - "###); + "); // Re-lock with a precise commit that maps to the same tag. let pyproject_toml = context.temp_dir.child("pyproject.toml"); @@ -350,14 +350,14 @@ fn lock_sdist_git() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -407,7 +407,7 @@ fn lock_sdist_git() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -465,14 +465,14 @@ fn lock_sdist_git() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -527,14 +527,14 @@ fn lock_sdist_git_subdirectory() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -570,17 +570,17 @@ fn lock_sdist_git_subdirectory() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -589,17 +589,17 @@ fn lock_sdist_git_subdirectory() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + example-pkg-a==1 (from git+https://github.com/pypa/sample-namespace-packages.git@df7530eeb8fa0cb7dbb8ecb28363e8e36bfa2f45#subdirectory=pkg_resources/pkg_a) - "###); + "); // Re-install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Audited 1 package in [TIME] - "###); + "); Ok(()) } @@ -621,14 +621,14 @@ fn lock_sdist_git_pep508() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -664,14 +664,14 @@ fn lock_sdist_git_pep508() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); // Re-lock with a precise commit that maps to the same tag. let pyproject_toml = context.temp_dir.child("pyproject.toml"); @@ -685,14 +685,14 @@ fn lock_sdist_git_pep508() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -739,7 +739,7 @@ fn lock_sdist_git_pep508() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -794,14 +794,14 @@ fn lock_sdist_git_pep508() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -859,14 +859,14 @@ fn lock_sdist_git_short_rev() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -902,28 +902,28 @@ fn lock_sdist_git_short_rev() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); // Re-run with `--offline`. We shouldn't need a network connection to validate an // already-correct lockfile with immutable metadata. - uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline").arg("--no-cache"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline").arg("--no-cache"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -932,17 +932,17 @@ fn lock_sdist_git_short_rev() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + uv-public-pypackage==0.1.0 (from git+https://github.com/astral-test/uv-public-pypackage@0dacfd662c64cb4ceb16e6cf65a157a8b715b979) - "###); + "); // Re-install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Audited 1 package in [TIME] - "###); + "); Ok(()) } @@ -963,14 +963,14 @@ fn lock_wheel_url() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -1054,17 +1054,17 @@ fn lock_wheel_url() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); // Re-run with `--offline`. This should fail: we need network access to resolve mutable metadata. - uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline").arg("--no-cache"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline").arg("--no-cache"), @" success: false exit_code: 2 ----- stdout ----- @@ -1072,10 +1072,10 @@ fn lock_wheel_url() -> Result<()> { ----- stderr ----- error: Failed to generate package metadata for `anyio==4.3.0 @ direct+https://files.pythonhosted.org/packages/14/fd/2f20c40b45e4fb4324834aea24bd4afdf1143390242c0b33774da0e2e34f/anyio-4.3.0-py3-none-any.whl` Caused by: Network connectivity is disabled, but the requested data wasn't found in the cache for: `https://files.pythonhosted.org/packages/14/fd/2f20c40b45e4fb4324834aea24bd4afdf1143390242c0b33774da0e2e34f/anyio-4.3.0-py3-none-any.whl` - "###); + "); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -1086,17 +1086,17 @@ fn lock_wheel_url() -> Result<()> { + anyio==4.3.0 (from https://files.pythonhosted.org/packages/14/fd/2f20c40b45e4fb4324834aea24bd4afdf1143390242c0b33774da0e2e34f/anyio-4.3.0-py3-none-any.whl) + idna==3.6 + sniffio==1.3.1 - "###); + "); // Re-install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Audited 3 packages in [TIME] - "###); + "); Ok(()) } @@ -1117,14 +1117,14 @@ fn lock_sdist_url() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -1206,17 +1206,17 @@ fn lock_sdist_url() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -1227,17 +1227,17 @@ fn lock_sdist_url() -> Result<()> { + anyio==4.3.0 (from https://files.pythonhosted.org/packages/db/4d/3970183622f0330d3c23d9b8a5f52e365e50381fd484d08e3285104333d3/anyio-4.3.0.tar.gz) + idna==3.6 + sniffio==1.3.1 - "###); + "); // Re-install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Audited 3 packages in [TIME] - "###); + "); Ok(()) } @@ -1261,14 +1261,14 @@ fn lock_sdist_url_subdirectory() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 5 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -1342,17 +1342,17 @@ fn lock_sdist_url_subdirectory() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 5 packages in [TIME] - "###); + "); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -1364,17 +1364,17 @@ fn lock_sdist_url_subdirectory() -> Result<()> { + idna==3.6 + root==0.0.1 (from https://github.com/user-attachments/files/18216295/subdirectory-test.tar.gz#subdirectory=packages/root) + sniffio==1.3.1 - "###); + "); // Re-install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Audited 4 packages in [TIME] - "###); + "); Ok(()) } @@ -1395,14 +1395,14 @@ fn lock_sdist_url_subdirectory_pep508() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 5 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -1476,17 +1476,17 @@ fn lock_sdist_url_subdirectory_pep508() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 5 packages in [TIME] - "###); + "); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -1498,17 +1498,17 @@ fn lock_sdist_url_subdirectory_pep508() -> Result<()> { + idna==3.6 + root==0.0.1 (from https://github.com/user-attachments/files/18216295/subdirectory-test.tar.gz#subdirectory=packages/root) + sniffio==1.3.1 - "###); + "); // Re-install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Audited 4 packages in [TIME] - "###); + "); Ok(()) } @@ -1532,14 +1532,14 @@ fn lock_project_extra() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 5 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -1619,17 +1619,17 @@ fn lock_project_extra() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 5 packages in [TIME] - "###); + "); // Install the base dependencies from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -1640,10 +1640,10 @@ fn lock_project_extra() -> Result<()> { + anyio==3.7.0 + idna==3.6 + sniffio==1.3.1 - "###); + "); // Install the extras from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--extra").arg("test"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--extra").arg("test"), @" success: true exit_code: 0 ----- stdout ----- @@ -1652,7 +1652,7 @@ fn lock_project_extra() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + iniconfig==2.0.0 - "###); + "); Ok(()) } @@ -1676,27 +1676,27 @@ fn lock_project_with_overrides() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 9 packages in [TIME] - "###); + "); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 9 packages in [TIME] - "###); + "); // Install the base dependencies from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -1711,7 +1711,7 @@ fn lock_project_with_overrides() -> Result<()> { + jinja2==3.1.3 + markupsafe==2.1.5 + werkzeug==2.3.8 - "###); + "); Ok(()) } @@ -1738,27 +1738,27 @@ fn lock_project_with_override_sources() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); // Install the base dependencies from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -1769,7 +1769,7 @@ fn lock_project_with_override_sources() -> Result<()> { + anyio==3.7.0 + idna==3.2 (from https://files.pythonhosted.org/packages/d7/77/ff688d1504cdc4db2a938e2b7b9adee5dd52e34efbd2431051efc9984de9/idna-3.2-py3-none-any.whl) + sniffio==1.3.1 - "###); + "); Ok(()) } @@ -1793,27 +1793,27 @@ fn lock_project_with_excludes() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 8 packages in [TIME] - "###); + "); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 8 packages in [TIME] - "###); + "); // Install the base dependencies from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -1827,7 +1827,7 @@ fn lock_project_with_excludes() -> Result<()> { + itsdangerous==2.1.2 + jinja2==3.1.3 + markupsafe==2.1.5 - "###); + "); // Check the lockfile contains the excludes. let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?; @@ -1958,7 +1958,7 @@ fn lock_project_with_excludes() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: false exit_code: 1 ----- stdout ----- @@ -1990,27 +1990,27 @@ fn lock_project_with_constraints() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); // Install the base dependencies from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -2021,7 +2021,7 @@ fn lock_project_with_constraints() -> Result<()> { + anyio==3.7.0 + idna==3.3 + sniffio==1.3.1 - "###); + "); Ok(()) } @@ -2048,27 +2048,27 @@ fn lock_project_with_constraint_sources() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); // Install the base dependencies from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -2079,7 +2079,7 @@ fn lock_project_with_constraint_sources() -> Result<()> { + anyio==3.7.0 + idna==3.2 (from https://files.pythonhosted.org/packages/d7/77/ff688d1504cdc4db2a938e2b7b9adee5dd52e34efbd2431051efc9984de9/idna-3.2-py3-none-any.whl) + sniffio==1.3.1 - "###); + "); Ok(()) } @@ -2104,27 +2104,27 @@ fn lock_project_with_build_constraints() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); // Install the base dependencies from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -2135,7 +2135,7 @@ fn lock_project_with_build_constraints() -> Result<()> { + anyio==3.7.0 + idna==3.6 + sniffio==1.3.1 - "###); + "); let pyproject_toml = context.temp_dir.child("pyproject.toml"); pyproject_toml.write_str( @@ -2152,7 +2152,7 @@ fn lock_project_with_build_constraints() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: false exit_code: 1 ----- stdout ----- @@ -2190,27 +2190,27 @@ fn lock_project_with_build_constraint_sources() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); // Install the base dependencies from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -2219,7 +2219,7 @@ fn lock_project_with_build_constraint_sources() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + requests==1.2.0 - "###); + "); Ok(()) } @@ -2240,7 +2240,7 @@ fn lock_dependency_extra() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -2389,17 +2389,17 @@ fn lock_dependency_extra() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 10 packages in [TIME] - "###); + "); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -2415,7 +2415,7 @@ fn lock_dependency_extra() -> Result<()> { + markupsafe==2.1.5 + python-dotenv==1.0.1 + werkzeug==3.0.1 - "###); + "); Ok(()) } @@ -2439,7 +2439,7 @@ fn lock_conditional_dependency_extra() -> Result<()> { let lockfile = context.temp_dir.join("uv.lock"); - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -2669,7 +2669,7 @@ fn lock_conditional_dependency_extra() -> Result<()> { // "###); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -2682,7 +2682,7 @@ fn lock_conditional_dependency_extra() -> Result<()> { + idna==3.6 + requests==2.31.0 + urllib3==2.2.1 - "###); + "); // Validate that the extra is included on relevant Python versions. let context_38 = TestContext::new("3.8"); @@ -2691,17 +2691,17 @@ fn lock_conditional_dependency_extra() -> Result<()> { fs_err::copy(lockfile, context_38.temp_dir.join("uv.lock"))?; // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 8 packages in [TIME] - "###); + "); // Install from the lockfile. - uv_snapshot!(context_38.filters(), context_38.sync().arg("--frozen"), @r###" + uv_snapshot!(context_38.filters(), context_38.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -2715,7 +2715,7 @@ fn lock_conditional_dependency_extra() -> Result<()> { + pysocks==1.7.1 + requests==2.31.0 + urllib3==2.2.1 - "###); + "); Ok(()) } @@ -2736,7 +2736,7 @@ fn lock_dependency_non_existent_extra() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -2872,17 +2872,17 @@ fn lock_dependency_non_existent_extra() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 9 packages in [TIME] - "###); + "); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -2897,7 +2897,7 @@ fn lock_dependency_non_existent_extra() -> Result<()> { + jinja2==3.1.3 + markupsafe==2.1.5 + werkzeug==3.0.1 - "###); + "); Ok(()) } @@ -2929,7 +2929,7 @@ fn lock_conflicting_project_basic1() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: false exit_code: 1 ----- stdout ----- @@ -2969,7 +2969,7 @@ fn lock_conflicting_project_basic1() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -3038,7 +3038,7 @@ fn lock_conflicting_project_basic1() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- @@ -3049,7 +3049,7 @@ fn lock_conflicting_project_basic1() -> Result<()> { "); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -3059,11 +3059,11 @@ fn lock_conflicting_project_basic1() -> Result<()> { Installed 2 packages in [TIME] + project==0.1.0 (from file://[TEMP_DIR]/) + sortedcontainers==2.3.0 - "###); + "); // Another install, but with the group enabled, which // should fail because it conflicts with the project. - uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--group=foo"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--group=foo"), @" success: false exit_code: 2 ----- stdout ----- @@ -3073,7 +3073,7 @@ fn lock_conflicting_project_basic1() -> Result<()> { "); // Another install, but this time with `--only-group=foo`, // which excludes the project and is thus okay. - uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--only-group=foo"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--only-group=foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -3085,7 +3085,7 @@ fn lock_conflicting_project_basic1() -> Result<()> { - project==0.1.0 (from file://[TEMP_DIR]/) - sortedcontainers==2.3.0 + sortedcontainers==2.4.0 - "###); + "); Ok(()) } @@ -3144,7 +3144,7 @@ fn lock_conflicting_workspace_members() -> Result<()> { )?; // Lock should succeed because we declared the conflict - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -3222,7 +3222,7 @@ fn lock_conflicting_workspace_members() -> Result<()> { }); // Install from the lockfile - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -3235,7 +3235,7 @@ fn lock_conflicting_workspace_members() -> Result<()> { "); // Install subexample without the root - uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--package").arg("subexample"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--package").arg("subexample"), @" success: true exit_code: 0 ----- stdout ----- @@ -3251,7 +3251,7 @@ fn lock_conflicting_workspace_members() -> Result<()> { "); // Attempt to install them together, i.e., with `--all-packages` - uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--all-packages"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--all-packages"), @" success: false exit_code: 2 ----- stdout ----- @@ -3261,7 +3261,7 @@ fn lock_conflicting_workspace_members() -> Result<()> { "); // Attempt to install them together, i.e., with `--package` - uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--package").arg("example").arg("--package").arg("subexample"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--package").arg("example").arg("--package").arg("subexample"), @" success: false exit_code: 2 ----- stdout ----- @@ -3331,7 +3331,7 @@ fn lock_conflicting_workspace_members_depends_direct() -> Result<()> { )?; // This should fail to resolve, because these conflict - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: false exit_code: 1 ----- stdout ----- @@ -3411,7 +3411,7 @@ fn lock_conflicting_workspace_members_depends_direct_extra() -> Result<()> { )?; // This should succeed, because the conflict is optional - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -3494,7 +3494,7 @@ fn lock_conflicting_workspace_members_depends_direct_extra() -> Result<()> { }); // Install from the lockfile - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -3507,7 +3507,7 @@ fn lock_conflicting_workspace_members_depends_direct_extra() -> Result<()> { "); // Attempt to install with the extra selected - uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--extra").arg("foo"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--extra").arg("foo"), @" success: false exit_code: 2 ----- stdout ----- @@ -3517,7 +3517,7 @@ fn lock_conflicting_workspace_members_depends_direct_extra() -> Result<()> { "); // Install just the child package - uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--package").arg("subexample"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--package").arg("subexample"), @" success: true exit_code: 0 ----- stdout ----- @@ -3533,7 +3533,7 @@ fn lock_conflicting_workspace_members_depends_direct_extra() -> Result<()> { "); // Install with just development dependencies - uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--only-dev"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--only-dev"), @" success: true exit_code: 0 ----- stdout ----- @@ -3628,7 +3628,7 @@ fn lock_conflicting_workspace_members_depends_transitive() -> Result<()> { )?; // This should fail to resolve, because these conflict - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: false exit_code: 1 ----- stdout ----- @@ -3729,7 +3729,7 @@ fn lock_conflicting_workspace_members_depends_transitive_extra() -> Result<()> { // This succeeds, but should fail. We have an unconditional conflict via `example -> // indirection[foo] -> subexample`, so `example` is unusable. - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -3826,7 +3826,7 @@ fn lock_conflicting_workspace_members_depends_transitive_extra() -> Result<()> { }); // Install from the lockfile - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: false exit_code: 2 ----- stdout ----- @@ -3836,7 +3836,7 @@ fn lock_conflicting_workspace_members_depends_transitive_extra() -> Result<()> { "); // Install with `--only-dev` - uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--only-dev"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--only-dev"), @" success: true exit_code: 0 ----- stdout ----- @@ -3846,7 +3846,7 @@ fn lock_conflicting_workspace_members_depends_transitive_extra() -> Result<()> { "); // Install just the child package - uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--package").arg("subexample"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--package").arg("subexample"), @" success: true exit_code: 0 ----- stdout ----- @@ -3899,7 +3899,7 @@ fn lock_conflicting_project_basic2() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -3994,7 +3994,7 @@ fn lock_conflicting_project_basic2() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- @@ -4005,7 +4005,7 @@ fn lock_conflicting_project_basic2() -> Result<()> { "); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -4020,7 +4020,7 @@ fn lock_conflicting_project_basic2() -> Result<()> { "); // Another install, but with the group enabled, which // should fail because it conflicts with the project. - uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--group=foo"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--group=foo"), @" success: false exit_code: 2 ----- stdout ----- @@ -4030,7 +4030,7 @@ fn lock_conflicting_project_basic2() -> Result<()> { "); // Another install, but this time with `--only-group=foo`, // which excludes the project and is thus okay. - uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--only-group=foo"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--only-group=foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -4075,7 +4075,7 @@ fn lock_conflicting_mixed() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: false exit_code: 1 ----- stdout ----- @@ -4118,14 +4118,14 @@ fn lock_conflicting_mixed() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 3 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -4189,17 +4189,17 @@ fn lock_conflicting_mixed() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 3 packages in [TIME] - "###); + "); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -4208,9 +4208,9 @@ fn lock_conflicting_mixed() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + project==0.1.0 (from file://[TEMP_DIR]/) - "###); + "); // Another install, but with the group enabled. - uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--group=project1"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--group=project1"), @" success: true exit_code: 0 ----- stdout ----- @@ -4219,9 +4219,9 @@ fn lock_conflicting_mixed() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + sortedcontainers==2.3.0 - "###); + "); // Another install, but with the extra enabled. - uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--extra=project2"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--extra=project2"), @" success: true exit_code: 0 ----- stdout ----- @@ -4232,9 +4232,9 @@ fn lock_conflicting_mixed() -> Result<()> { Installed 1 package in [TIME] - sortedcontainers==2.3.0 + sortedcontainers==2.4.0 - "###); + "); // And finally, installing both the group and the extra should fail. - uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--group=project1").arg("--extra=project2"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--group=project1").arg("--extra=project2"), @" success: false exit_code: 2 ----- stdout ----- @@ -4262,14 +4262,14 @@ fn lock_upgrade_log() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 3 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -4319,14 +4319,14 @@ fn lock_upgrade_log() -> Result<()> { }); // Run with `--upgrade`; ensure that nothing is changed. - uv_snapshot!(context.filters(), context.lock().arg("--upgrade"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--upgrade"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 3 packages in [TIME] - "###); + "); // Modify the `pyproject.toml` to loosen a requirement, drop a requirement, and add a // requirement. @@ -4341,7 +4341,7 @@ fn lock_upgrade_log() -> Result<()> { )?; // Run with `--upgrade`; ensure that the updates are reported. - uv_snapshot!(context.filters(), context.lock().arg("--upgrade"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--upgrade"), @" success: true exit_code: 0 ----- stdout ----- @@ -4351,7 +4351,7 @@ fn lock_upgrade_log() -> Result<()> { Removed iniconfig v2.0.0 Updated markupsafe v1.1.1 -> v2.1.5 Added typing-extensions v4.10.0 - "###); + "); let lock = context.read("uv.lock"); @@ -4432,14 +4432,14 @@ fn lock_upgrade_log_multi_version() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 3 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -4496,14 +4496,14 @@ fn lock_upgrade_log_multi_version() -> Result<()> { }); // Run with `--upgrade`; ensure that nothing is changed. - uv_snapshot!(context.filters(), context.lock().arg("--upgrade"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--upgrade"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 3 packages in [TIME] - "###); + "); // Modify the `pyproject.toml` to loosen the requirement. pyproject_toml.write_str( @@ -4517,7 +4517,7 @@ fn lock_upgrade_log_multi_version() -> Result<()> { )?; // Run with `--upgrade`; ensure that `markupsafe` is upgraded. - uv_snapshot!(context.filters(), context.lock().arg("--upgrade"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--upgrade"), @" success: true exit_code: 0 ----- stdout ----- @@ -4525,7 +4525,7 @@ fn lock_upgrade_log_multi_version() -> Result<()> { ----- stderr ----- Resolved 2 packages in [TIME] Updated markupsafe v1.1.1, v2.0.0 -> v2.1.5 - "###); + "); let lock = context.read("uv.lock"); @@ -4592,14 +4592,14 @@ fn lock_preference() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -4652,14 +4652,14 @@ fn lock_preference() -> Result<()> { // Ensure that the locked version is still respected. // // Note that we do not use `deterministic!` here because the results depend on the existing lockfile. - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -4698,7 +4698,7 @@ fn lock_preference() -> Result<()> { ); }); - uv_snapshot!(context.filters(), context.lock().arg("--upgrade"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--upgrade"), @" success: true exit_code: 0 ----- stdout ----- @@ -4706,7 +4706,7 @@ fn lock_preference() -> Result<()> { ----- stderr ----- Resolved 2 packages in [TIME] Updated iniconfig v1.1.1 -> v2.0.0 - "###); + "); let lock = context.read("uv.lock"); @@ -4768,7 +4768,7 @@ fn lock_git_plus_prefix() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -4811,17 +4811,17 @@ fn lock_git_plus_prefix() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); // Install from the lockfile, excluding development dependencies. - uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--no-dev"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--no-dev"), @" success: true exit_code: 0 ----- stdout ----- @@ -4830,7 +4830,7 @@ fn lock_git_plus_prefix() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + uv-public-pypackage==0.1.0 (from git+https://github.com/astral-test/uv-public-pypackage@b270df1a2fb5d012294e9aaf05e7e0bab1e6a389) - "###); + "); Ok(()) } @@ -4854,14 +4854,14 @@ fn lock_partial_git() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 7 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -4966,17 +4966,17 @@ fn lock_partial_git() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 7 packages in [TIME] - "###); + "); // Install from the lockfile, excluding development dependencies. - uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--no-dev"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--no-dev"), @" success: true exit_code: 0 ----- stdout ----- @@ -4987,7 +4987,7 @@ fn lock_partial_git() -> Result<()> { + anyio==4.3.0 + idna==3.6 + sniffio==1.3.1 - "###); + "); Ok(()) } @@ -5051,17 +5051,17 @@ fn lock_unsupported_tag() -> Result<()> { "#)?; // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -5070,7 +5070,7 @@ fn lock_unsupported_tag() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + watchdog==6.0.0 - "###); + "); Ok(()) } @@ -5134,17 +5134,17 @@ fn lock_git_sha() -> Result<()> { )?; // The lockfile should be unchanged. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); // Relock with `--upgrade`. - uv_snapshot!(context.filters(), context.lock().arg("--upgrade-package").arg("uv-public-pypackage"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--upgrade-package").arg("uv-public-pypackage"), @" success: true exit_code: 0 ----- stdout ----- @@ -5211,7 +5211,7 @@ fn lock_requires_python() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: false exit_code: 1 ----- stdout ----- @@ -5248,14 +5248,14 @@ fn lock_requires_python() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 17 packages in [TIME] - "###); + "); let lock = fs_err::read_to_string(&lockfile).unwrap(); @@ -5539,14 +5539,14 @@ fn lock_requires_python() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 13 packages in [TIME] - "###); + "); let lock = fs_err::read_to_string(&lockfile).unwrap(); @@ -5759,14 +5759,14 @@ fn lock_requires_python() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 5 packages in [TIME] - "###); + "); let lock = fs_err::read_to_string(&lockfile).unwrap(); @@ -5853,18 +5853,18 @@ fn lock_requires_python() -> Result<()> { fs_err::copy(&lockfile, context_unsupported.temp_dir.join("uv.lock"))?; // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 5 packages in [TIME] - "###); + "); // Install from the lockfile. // Note we need to disable Python fetches or we'll just download 3.12 - uv_snapshot!(context_unsupported.filters(), context_unsupported.sync().arg("--frozen").arg("--no-python-downloads"), @r" + uv_snapshot!(context_unsupported.filters(), context_unsupported.sync().arg("--frozen").arg("--no-python-downloads"), @" success: false exit_code: 2 ----- stdout ----- @@ -5898,14 +5898,14 @@ fn lock_requires_python_upper() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 5 packages in [TIME] - "###); + "); let lock = fs_err::read_to_string(&lockfile).unwrap(); @@ -5991,14 +5991,14 @@ fn lock_requires_python_upper() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 5 packages in [TIME] - "###); + "); Ok(()) } @@ -6165,14 +6165,14 @@ fn lock_requires_python_fork() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); let lock = fs_err::read_to_string(&lockfile).unwrap(); @@ -6228,14 +6228,14 @@ fn lock_requires_python_fork() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); Ok(()) } @@ -6259,7 +6259,7 @@ fn lock_requires_python_wheels() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -6267,7 +6267,7 @@ fn lock_requires_python_wheels() -> Result<()> { ----- stderr ----- Using CPython 3.12.[X] interpreter at: [PYTHON-3.12] Resolved 2 packages in [TIME] - "###); + "); let lock = fs_err::read_to_string(&lockfile).unwrap(); @@ -6322,7 +6322,7 @@ fn lock_requires_python_wheels() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- @@ -6330,7 +6330,7 @@ fn lock_requires_python_wheels() -> Result<()> { ----- stderr ----- Using CPython 3.12.[X] interpreter at: [PYTHON-3.12] Resolved 2 packages in [TIME] - "###); + "); // Change to ==3.11.*, which should different wheels in the lockfile. pyproject_toml.write_str( @@ -6343,7 +6343,7 @@ fn lock_requires_python_wheels() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -6407,7 +6407,7 @@ fn lock_requires_python_wheels() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- @@ -6415,7 +6415,7 @@ fn lock_requires_python_wheels() -> Result<()> { ----- stderr ----- Using CPython 3.11.[X] interpreter at: [PYTHON-3.11] Resolved 2 packages in [TIME] - "###); + "); Ok(()) } @@ -6439,14 +6439,14 @@ fn lock_requires_python_star() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 6 packages in [TIME] - "###); + "); let lock = fs_err::read_to_string(&lockfile).unwrap(); @@ -6530,14 +6530,14 @@ fn lock_requires_python_star() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 6 packages in [TIME] - "###); + "); Ok(()) } @@ -6561,7 +6561,7 @@ fn lock_requires_python_not_equal() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -6608,14 +6608,14 @@ fn lock_requires_python_not_equal() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); Ok(()) } @@ -6640,14 +6640,14 @@ fn lock_requires_python_pre() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 6 packages in [TIME] - "###); + "); let lock = fs_err::read_to_string(&lockfile).unwrap(); @@ -6731,14 +6731,14 @@ fn lock_requires_python_pre() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 6 packages in [TIME] - "###); + "); Ok(()) } @@ -6761,7 +6761,7 @@ fn lock_requires_python_unbounded() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -6769,7 +6769,7 @@ fn lock_requires_python_unbounded() -> Result<()> { ----- stderr ----- warning: The workspace `requires-python` value (`<=3.12`) does not contain a lower bound. Add a lower bound to indicate the minimum compatible Python version (e.g., `>=3.11`). Resolved 3 packages in [TIME] - "###); + "); let lock = fs_err::read_to_string(&lockfile).unwrap(); @@ -6829,7 +6829,7 @@ fn lock_requires_python_unbounded() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- @@ -6837,7 +6837,7 @@ fn lock_requires_python_unbounded() -> Result<()> { ----- stderr ----- warning: The workspace `requires-python` value (`<=3.12`) does not contain a lower bound. Add a lower bound to indicate the minimum compatible Python version (e.g., `>=3.11`). Resolved 3 packages in [TIME] - "###); + "); Ok(()) } @@ -6872,7 +6872,7 @@ fn lock_requires_python_disjoint() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: false exit_code: 2 ----- stdout ----- @@ -6903,14 +6903,14 @@ fn lock_requires_python_maximum_version() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 3 packages in [TIME] - "###); + "); let lock = fs_err::read_to_string(&lockfile).unwrap(); @@ -7030,14 +7030,14 @@ fn lock_requires_python_maximum_version() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 3 packages in [TIME] - "###); + "); Ok(()) } @@ -7062,14 +7062,14 @@ fn lock_requires_python_fewest_versions() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); let lock = fs_err::read_to_string(&lockfile).unwrap(); @@ -7136,14 +7136,14 @@ fn lock_requires_python_fewest_versions() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); Ok(()) } @@ -7179,14 +7179,14 @@ fn lock_python_version_marker_complement() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); let lock = fs_err::read_to_string(&lockfile).unwrap(); @@ -7259,14 +7259,14 @@ fn lock_python_version_marker_complement() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); Ok(()) } @@ -7290,7 +7290,7 @@ fn lock_dev() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -7354,7 +7354,7 @@ fn lock_dev() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- @@ -7365,7 +7365,7 @@ fn lock_dev() -> Result<()> { "); // Install from the lockfile, excluding development dependencies. - uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--no-dev"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--no-dev"), @" success: true exit_code: 0 ----- stdout ----- @@ -7378,7 +7378,7 @@ fn lock_dev() -> Result<()> { "); // Install from the lockfile, including development dependencies (the default). - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -7408,7 +7408,7 @@ fn lock_conditional_unconditional() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -7458,14 +7458,14 @@ fn lock_conditional_unconditional() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); Ok(()) } @@ -7486,14 +7486,14 @@ fn lock_multiple_markers() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -7536,14 +7536,14 @@ fn lock_multiple_markers() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); Ok(()) } @@ -7602,14 +7602,14 @@ fn lock_relative_and_absolute_paths() -> Result<()> { "#})?; context.temp_dir.child("c/c/__init__.py").touch()?; - uv_snapshot!(context.filters(), context.lock(), @r###" - success: true - exit_code: 0 - ----- stdout ----- + uv_snapshot!(context.filters(), context.lock(), @" + success: true + exit_code: 0 + ----- stdout ----- - ----- stderr ----- - Resolved 3 packages in [TIME] - "###); + ----- stderr ----- + Resolved 3 packages in [TIME] + "); let lock = context.read("uv.lock"); @@ -7654,14 +7654,14 @@ fn lock_relative_and_absolute_paths() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 3 packages in [TIME] - "###); + "); Ok(()) } @@ -7682,7 +7682,7 @@ fn lock_cycles() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -7836,17 +7836,17 @@ fn lock_cycles() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 11 packages in [TIME] - "###); + "); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -7864,7 +7864,7 @@ fn lock_cycles() -> Result<()> { + testtools==2.3.0 + traceback2==1.4.0 + unittest2==1.1.0 - "###); + "); Ok(()) } @@ -7885,14 +7885,14 @@ fn lock_new_extras() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" - success: true - exit_code: 0 - ----- stdout ----- + uv_snapshot!(context.filters(), context.lock(), @" + success: true + exit_code: 0 + ----- stdout ----- - ----- stderr ----- - Resolved 6 packages in [TIME] - "###); + ----- stderr ----- + Resolved 6 packages in [TIME] + "); let lock = context.read("uv.lock"); @@ -7989,14 +7989,14 @@ fn lock_new_extras() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 6 packages in [TIME] - "###); + "); // Enable a new extra. pyproject_toml.write_str( @@ -8009,15 +8009,15 @@ fn lock_new_extras() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" - success: true - exit_code: 0 - ----- stdout ----- + uv_snapshot!(context.filters(), context.lock(), @" + success: true + exit_code: 0 + ----- stdout ----- - ----- stderr ----- - Resolved 7 packages in [TIME] - Added pysocks v1.7.1 - "###); + ----- stderr ----- + Resolved 7 packages in [TIME] + Added pysocks v1.7.1 + "); let lock = context.read("uv.lock"); @@ -8128,14 +8128,14 @@ fn lock_new_extras() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 7 packages in [TIME] - "###); + "); Ok(()) } @@ -8210,7 +8210,7 @@ fn lock_invalid_hash() -> Result<()> { "#)?; // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: false exit_code: 1 ----- stdout ----- @@ -8221,7 +8221,7 @@ fn lock_invalid_hash() -> Result<()> { "); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: false exit_code: 1 ----- stdout ----- @@ -8319,7 +8319,7 @@ fn lock_mixed_hashes() -> Result<()> { .collect::>(); // Lock with SHA256 hashes. - uv_snapshot!(context.filters(), context.lock().env_remove(EnvVars::UV_EXCLUDE_NEWER), @r" + uv_snapshot!(context.filters(), context.lock().env_remove(EnvVars::UV_EXCLUDE_NEWER), @" success: true exit_code: 0 ----- stdout ----- @@ -8363,7 +8363,7 @@ fn lock_mixed_hashes() -> Result<()> { }); // Sync with SHA256 hashes to populate the cache. - uv_snapshot!(filters.clone(), context.sync().arg("--frozen"), @r" + uv_snapshot!(filters.clone(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -8401,7 +8401,7 @@ fn lock_mixed_hashes() -> Result<()> { })?; // Lock again with `--refresh` to pick up the SHA512 hash from the updated index. - uv_snapshot!(context.filters(), context.lock().arg("--refresh").env_remove(EnvVars::UV_EXCLUDE_NEWER), @r" + uv_snapshot!(context.filters(), context.lock().arg("--refresh").env_remove(EnvVars::UV_EXCLUDE_NEWER), @" success: true exit_code: 0 ----- stdout ----- @@ -8445,7 +8445,7 @@ fn lock_mixed_hashes() -> Result<()> { }); // Reinstalling should re-compute the hash for the `basic-package` wheel to reflect SHA512. - uv_snapshot!(filters, context.sync().arg("--frozen").arg("--reinstall"), @r" + uv_snapshot!(filters, context.sync().arg("--frozen").arg("--reinstall"), @" success: true exit_code: 0 ----- stdout ----- @@ -8544,7 +8544,7 @@ async fn lock_zstd_wheel() -> Result<()> { server.uri() })?; - uv_snapshot!(context.filters(), context.lock().env_remove(EnvVars::UV_EXCLUDE_NEWER), @r" + uv_snapshot!(context.filters(), context.lock().env_remove(EnvVars::UV_EXCLUDE_NEWER), @" success: true exit_code: 0 ----- stdout ----- @@ -8603,14 +8603,14 @@ fn lock_resolution_mode() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -8672,17 +8672,17 @@ fn lock_resolution_mode() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); // Locking with `lowest-direct` should ignore the existing lockfile. - uv_snapshot!(context.filters(), context.lock().arg("--resolution").arg("lowest-direct"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--resolution").arg("lowest-direct"), @" success: true exit_code: 0 ----- stdout ----- @@ -8691,7 +8691,7 @@ fn lock_resolution_mode() -> Result<()> { Ignoring existing lockfile due to change in resolution mode: `highest` vs. `lowest-direct` Resolved 4 packages in [TIME] Updated anyio v4.3.0 -> v3.0.0 - "###); + "); let lock = context.read("uv.lock"); @@ -8754,14 +8754,14 @@ fn lock_resolution_mode() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--resolution").arg("lowest-direct").arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--resolution").arg("lowest-direct").arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); Ok(()) } @@ -8783,7 +8783,7 @@ fn lock_requires_python_no_wheels() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: false exit_code: 1 ----- stdout ----- @@ -8793,7 +8793,7 @@ fn lock_requires_python_no_wheels() -> Result<()> { ╰─▶ Because dearpygui==1.9.1 has no wheels with a matching Python version tag (e.g., `cp312`) and your project depends on dearpygui==1.9.1, we can conclude that your project's requirements are unsatisfiable. hint: Wheels are available for `dearpygui` (v1.9.1) with the following Python ABI tags: `cp37m`, `cp38`, `cp39`, `cp310`, `cp311` - "###); + "); Ok(()) } @@ -8846,14 +8846,14 @@ fn lock_same_version_multiple_urls() -> Result<()> { Url::from_file_path(context.temp_dir.join("v2")).unwrap(), })?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 7 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -8970,14 +8970,14 @@ fn lock_same_version_multiple_urls() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 7 packages in [TIME] - "###); + "); Ok(()) } @@ -9003,7 +9003,7 @@ fn lock_unsafe_lowest() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock().arg("--resolution").arg("lowest-direct"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--resolution").arg("lowest-direct"), @" success: true exit_code: 0 ----- stdout ----- @@ -9014,14 +9014,14 @@ fn lock_unsafe_lowest() -> Result<()> { "); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--resolution").arg("lowest-direct").arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--resolution").arg("lowest-direct").arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); Ok(()) } @@ -9067,7 +9067,7 @@ fn lock_exclusion() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock().current_dir(&child), @r###" + uv_snapshot!(context.filters(), context.lock().current_dir(&child), @" success: true exit_code: 0 ----- stdout ----- @@ -9075,7 +9075,7 @@ fn lock_exclusion() -> Result<()> { ----- stderr ----- Using CPython 3.12.[X] interpreter at: [PYTHON-3.12] Resolved 2 packages in [TIME] - "###); + "); let lock = fs_err::read_to_string(child.join("uv.lock")).unwrap(); @@ -9111,14 +9111,14 @@ fn lock_exclusion() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: Unable to find lockfile at `uv.lock`, but `--locked` was provided. To create a lockfile, run `uv lock` or `uv sync` without the flag. - "###); + "); Ok(()) } @@ -9210,7 +9210,7 @@ fn lock_relative_lock_deserialization() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock().current_dir(&child), @r###" + uv_snapshot!(context.filters(), context.lock().current_dir(&child), @" success: false exit_code: 2 ----- stdout ----- @@ -9220,7 +9220,7 @@ fn lock_relative_lock_deserialization() -> Result<()> { error: Failed to generate package metadata for `child==0.1.0 @ editable+.` Caused by: Failed to parse entry: `member` Caused by: `member` references a workspace in `tool.uv.sources` (e.g., `member = { workspace = true }`), but is not a workspace member - "###); + "); Ok(()) } @@ -9265,7 +9265,7 @@ fn lock_non_workspace_source() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock().current_dir(&child), @r###" + uv_snapshot!(context.filters(), context.lock().current_dir(&child), @" success: false exit_code: 1 ----- stdout ----- @@ -9274,7 +9274,7 @@ fn lock_non_workspace_source() -> Result<()> { × Failed to build `project @ file://[TEMP_DIR]/` ├─▶ Failed to parse entry: `child` ╰─▶ `child` is included as a workspace member, but references a path in `tool.uv.sources`. Workspace members must be declared as workspace sources (e.g., `child = { workspace = true }`). - "###); + "); Ok(()) } @@ -9316,7 +9316,7 @@ fn lock_no_workspace_source() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock().current_dir(&child), @r###" + uv_snapshot!(context.filters(), context.lock().current_dir(&child), @" success: false exit_code: 1 ----- stdout ----- @@ -9325,7 +9325,7 @@ fn lock_no_workspace_source() -> Result<()> { × Failed to build `project @ file://[TEMP_DIR]/` ├─▶ Failed to parse entry: `child` ╰─▶ `child` is included as a workspace member, but is missing an entry in `tool.uv.sources` (e.g., `child = { workspace = true }`) - "###); + "); Ok(()) } @@ -9373,7 +9373,7 @@ fn lock_peer_member() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock().current_dir(context.temp_dir.child("project")), @r###" + uv_snapshot!(context.filters(), context.lock().current_dir(context.temp_dir.child("project")), @" success: true exit_code: 0 ----- stdout ----- @@ -9381,7 +9381,7 @@ fn lock_peer_member() -> Result<()> { ----- stderr ----- Using CPython 3.12.[X] interpreter at: [PYTHON-3.12] Resolved 2 packages in [TIME] - "###); + "); let lock = fs_err::read_to_string(context.temp_dir.child("project").child("uv.lock")).unwrap(); @@ -9423,14 +9423,14 @@ fn lock_peer_member() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: No `pyproject.toml` found in current directory or any parent directory - "###); + "); Ok(()) } @@ -9484,7 +9484,7 @@ fn lock_index_workspace_member() -> Result<()> { )?; // Locking without the necessary credentials should fail. - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: false exit_code: 1 ----- stdout ----- @@ -9497,7 +9497,7 @@ fn lock_index_workspace_member() -> Result<()> { uv_snapshot!(context.filters(), context.lock() .env(EnvVars::UV_INDEX_MY_INDEX_USERNAME, "public") - .env(EnvVars::UV_INDEX_MY_INDEX_PASSWORD, "heron"), @r" + .env(EnvVars::UV_INDEX_MY_INDEX_PASSWORD, "heron"), @" success: true exit_code: 0 ----- stdout ----- @@ -9564,14 +9564,14 @@ fn lock_index_workspace_member() -> Result<()> { uv_snapshot!(context.filters(), context.lock() .env(EnvVars::UV_INDEX_MY_INDEX_USERNAME, "public") .env(EnvVars::UV_INDEX_MY_INDEX_PASSWORD, "heron") - .arg("--locked"), @r###" + .arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 3 packages in [TIME] - "###); + "); Ok(()) } @@ -9645,7 +9645,7 @@ fn lock_dev_transitive() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock().current_dir(&bar), @r" + uv_snapshot!(context.filters(), context.lock().current_dir(&bar), @" success: true exit_code: 0 ----- stdout ----- @@ -9740,14 +9740,14 @@ fn lock_dev_transitive() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: No `pyproject.toml` found in current directory or any parent directory - "###); + "); Ok(()) } @@ -9779,14 +9779,14 @@ fn lock_redact_https() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock().arg("--index-url").arg("https://public:heron@pypi-proxy.fly.dev/basic-auth/simple"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--index-url").arg("https://public:heron@pypi-proxy.fly.dev/basic-auth/simple"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -9827,18 +9827,18 @@ fn lock_redact_https() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); // Installing from the lockfile should fail without credentials. Omit the root, so that we fail // when installing `iniconfig`, rather than when building `foo`. - uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--index-url").arg("https://pypi-proxy.fly.dev/basic-auth/simple").arg("--no-install-project"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--index-url").arg("https://pypi-proxy.fly.dev/basic-auth/simple").arg("--no-install-project"), @" success: false exit_code: 1 ----- stdout ----- @@ -9848,10 +9848,10 @@ fn lock_redact_https() -> Result<()> { ├─▶ Failed to fetch: `https://pypi-proxy.fly.dev/basic-auth/files/packages/ef/a6/62565a6e1cf69e10f5727360368e451d4b7f58beeac6173dc9db836a5b46/iniconfig-2.0.0-py3-none-any.whl` ╰─▶ HTTP status client error (401 Unauthorized) for url (https://pypi-proxy.fly.dev/basic-auth/files/packages/ef/a6/62565a6e1cf69e10f5727360368e451d4b7f58beeac6173dc9db836a5b46/iniconfig-2.0.0-py3-none-any.whl) help: `iniconfig` (v2.0.0) was included because `foo` (v0.1.0) depends on `iniconfig` - "###); + "); // Installing from the lockfile should fail without an index. - uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--no-install-project"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--no-install-project"), @" success: false exit_code: 1 ----- stdout ----- @@ -9861,10 +9861,10 @@ fn lock_redact_https() -> Result<()> { ├─▶ Failed to fetch: `https://pypi-proxy.fly.dev/basic-auth/files/packages/ef/a6/62565a6e1cf69e10f5727360368e451d4b7f58beeac6173dc9db836a5b46/iniconfig-2.0.0-py3-none-any.whl` ╰─▶ HTTP status client error (401 Unauthorized) for url (https://pypi-proxy.fly.dev/basic-auth/files/packages/ef/a6/62565a6e1cf69e10f5727360368e451d4b7f58beeac6173dc9db836a5b46/iniconfig-2.0.0-py3-none-any.whl) help: `iniconfig` (v2.0.0) was included because `foo` (v0.1.0) depends on `iniconfig` - "###); + "); // Installing from the lockfile should succeed when credentials are included on the command-line. - uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--index-url").arg("https://public:heron@pypi-proxy.fly.dev/basic-auth/simple"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--index-url").arg("https://public:heron@pypi-proxy.fly.dev/basic-auth/simple"), @" success: true exit_code: 0 ----- stdout ----- @@ -9873,10 +9873,10 @@ fn lock_redact_https() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + iniconfig==2.0.0 - "###); + "); // A subsequent sync will succeed because the credentials are in uv's request cache. - uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--reinstall"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--reinstall"), @" success: true exit_code: 0 ----- stdout ----- @@ -9886,10 +9886,10 @@ fn lock_redact_https() -> Result<()> { Uninstalled 1 package in [TIME] Installed 1 package in [TIME] ~ iniconfig==2.0.0 - "###); + "); // Installing without credentials will fail without a cache. - uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--reinstall").arg("--no-cache").arg("--no-install-project"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--reinstall").arg("--no-cache").arg("--no-install-project"), @" success: false exit_code: 1 ----- stdout ----- @@ -9899,10 +9899,10 @@ fn lock_redact_https() -> Result<()> { ├─▶ Failed to fetch: `https://pypi-proxy.fly.dev/basic-auth/files/packages/ef/a6/62565a6e1cf69e10f5727360368e451d4b7f58beeac6173dc9db836a5b46/iniconfig-2.0.0-py3-none-any.whl` ╰─▶ HTTP status client error (401 Unauthorized) for url (https://pypi-proxy.fly.dev/basic-auth/files/packages/ef/a6/62565a6e1cf69e10f5727360368e451d4b7f58beeac6173dc9db836a5b46/iniconfig-2.0.0-py3-none-any.whl) help: `iniconfig` (v2.0.0) was included because `foo` (v0.1.0) depends on `iniconfig` - "###); + "); // Installing with credentials from with `UV_INDEX_URL` should succeed. - uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--reinstall").arg("--no-cache").env(EnvVars::UV_INDEX_URL, "https://public:heron@pypi-proxy.fly.dev/basic-auth/simple"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--reinstall").arg("--no-cache").env(EnvVars::UV_INDEX_URL, "https://public:heron@pypi-proxy.fly.dev/basic-auth/simple"), @" success: true exit_code: 0 ----- stdout ----- @@ -9912,7 +9912,7 @@ fn lock_redact_https() -> Result<()> { Uninstalled 1 package in [TIME] Installed 1 package in [TIME] ~ iniconfig==2.0.0 - "###); + "); let pyproject_toml = context.temp_dir.child("pyproject.toml"); pyproject_toml.write_str( @@ -9930,7 +9930,7 @@ fn lock_redact_https() -> Result<()> { // Installing from the lockfile should succeed when credentials are included via // `pyproject.toml`. - uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--reinstall").arg("--no-cache"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--reinstall").arg("--no-cache"), @" success: true exit_code: 0 ----- stdout ----- @@ -9940,7 +9940,7 @@ fn lock_redact_https() -> Result<()> { Uninstalled 1 package in [TIME] Installed 1 package in [TIME] ~ iniconfig==2.0.0 - "###); + "); Ok(()) } @@ -9969,14 +9969,14 @@ fn lock_index_url_username_change_no_update() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -10004,14 +10004,14 @@ fn lock_index_url_username_change_no_update() -> Result<()> { // Run `uv lock` to update the lockfile // The package should stay at 4.0.0 - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); let lock_after = context.read("uv.lock"); @@ -10041,14 +10041,14 @@ fn lock_redact_git_pep508() -> Result<()> { token = token, })?; - uv_snapshot!(&context.filters(), context.lock(), @r###" + uv_snapshot!(&context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -10084,17 +10084,17 @@ fn lock_redact_git_pep508() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(&context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(&context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); // Install from the lockfile. - uv_snapshot!(&context.filters(), context.sync().arg("--frozen").arg("--reinstall").arg("--no-cache"), @r###" + uv_snapshot!(&context.filters(), context.sync().arg("--frozen").arg("--reinstall").arg("--no-cache"), @" success: true exit_code: 0 ----- stdout ----- @@ -10103,7 +10103,7 @@ fn lock_redact_git_pep508() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + uv-private-pypackage==0.1.0 (from git+https://github.com/astral-test/uv-private-pypackage@d780faf0ac91257d4d5a4f0c5a0e4509608c0071) - "###); + "); Ok(()) } @@ -10129,14 +10129,14 @@ fn lock_redact_git_sources() -> Result<()> { token = token, })?; - uv_snapshot!(&context.filters(), context.lock(), @r###" + uv_snapshot!(&context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -10172,17 +10172,17 @@ fn lock_redact_git_sources() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(&context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(&context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); // Install from the lockfile. - uv_snapshot!(&context.filters(), context.sync().arg("--frozen").arg("--reinstall").arg("--no-cache"), @r###" + uv_snapshot!(&context.filters(), context.sync().arg("--frozen").arg("--reinstall").arg("--no-cache"), @" success: true exit_code: 0 ----- stdout ----- @@ -10191,7 +10191,7 @@ fn lock_redact_git_sources() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + uv-private-pypackage==0.1.0 (from git+https://github.com/astral-test/uv-private-pypackage@d780faf0ac91257d4d5a4f0c5a0e4509608c0071) - "###); + "); Ok(()) } @@ -10214,7 +10214,7 @@ fn lock_redact_git_pep508_non_project() -> Result<()> { token = token, })?; - uv_snapshot!(&context.filters(), context.lock(), @r###" + uv_snapshot!(&context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -10222,7 +10222,7 @@ fn lock_redact_git_pep508_non_project() -> Result<()> { ----- stderr ----- warning: No `requires-python` value found in the workspace. Defaulting to `>=3.12`. Resolved 1 package in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -10252,7 +10252,7 @@ fn lock_redact_git_pep508_non_project() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(&context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(&context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- @@ -10260,10 +10260,10 @@ fn lock_redact_git_pep508_non_project() -> Result<()> { ----- stderr ----- warning: No `requires-python` value found in the workspace. Defaulting to `>=3.12`. Resolved 1 package in [TIME] - "###); + "); // Install from the lockfile. - uv_snapshot!(&context.filters(), context.sync().arg("--frozen").arg("--reinstall").arg("--no-cache"), @r###" + uv_snapshot!(&context.filters(), context.sync().arg("--frozen").arg("--reinstall").arg("--no-cache"), @" success: true exit_code: 0 ----- stdout ----- @@ -10272,7 +10272,7 @@ fn lock_redact_git_pep508_non_project() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + uv-private-pypackage==0.1.0 (from git+https://github.com/astral-test/uv-private-pypackage@d780faf0ac91257d4d5a4f0c5a0e4509608c0071) - "###); + "); Ok(()) } @@ -10299,14 +10299,14 @@ fn lock_redact_index_sources() -> Result<()> { "#, )?; - uv_snapshot!(&context.filters(), context.lock(), @r###" + uv_snapshot!(&context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -10346,17 +10346,17 @@ fn lock_redact_index_sources() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(&context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(&context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); // Install from the lockfile. - uv_snapshot!(&context.filters(), context.sync().arg("--frozen").arg("--reinstall").arg("--no-cache"), @r###" + uv_snapshot!(&context.filters(), context.sync().arg("--frozen").arg("--reinstall").arg("--no-cache"), @" success: true exit_code: 0 ----- stdout ----- @@ -10365,7 +10365,7 @@ fn lock_redact_index_sources() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + iniconfig==2.0.0 - "###); + "); Ok(()) } @@ -10386,14 +10386,14 @@ fn lock_redact_url_sources() -> Result<()> { iniconfig = { url = "https://public:heron@pypi-proxy.fly.dev/basic-auth/files/packages/ef/a6/62565a6e1cf69e10f5727360368e451d4b7f58beeac6173dc9db836a5b46/iniconfig-2.0.0-py3-none-any.whl" } "#)?; - uv_snapshot!(&context.filters(), context.lock(), @r###" + uv_snapshot!(&context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -10433,17 +10433,17 @@ fn lock_redact_url_sources() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(&context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(&context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); // Install from the lockfile. - uv_snapshot!(&context.filters(), context.sync().arg("--frozen").arg("--reinstall").arg("--no-cache"), @r" + uv_snapshot!(&context.filters(), context.sync().arg("--frozen").arg("--reinstall").arg("--no-cache"), @" success: true exit_code: 0 ----- stdout ----- @@ -10479,7 +10479,7 @@ fn lock_env_credentials() -> Result<()> { )?; // Without credentials, the resolution should fail. - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: false exit_code: 1 ----- stdout ----- @@ -10494,7 +10494,7 @@ fn lock_env_credentials() -> Result<()> { // Provide credentials via environment variables. uv_snapshot!(context.filters(), context.lock() .env(EnvVars::index_username("INTERNAL_PROXY"), "public") - .env(EnvVars::index_password("INTERNAL_PROXY"), "heron"), @r" + .env(EnvVars::index_password("INTERNAL_PROXY"), "heron"), @" success: true exit_code: 0 ----- stdout ----- @@ -10579,14 +10579,14 @@ fn lock_multiple_indexes_same_realm_different_credentials() -> Result<()> { .env(EnvVars::index_username("INTERNAL_PROXY_HERON"), "public") .env(EnvVars::index_password("INTERNAL_PROXY_HERON"), "heron") .env(EnvVars::index_username("INTERNAL_PROXY_EAGLE"), "public") - .env(EnvVars::index_password("INTERNAL_PROXY_EAGLE"), "eagle"), @r###" + .env(EnvVars::index_password("INTERNAL_PROXY_EAGLE"), "eagle"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 5 packages in [TIME] - "###); + "); Ok(()) } @@ -10625,14 +10625,14 @@ fn lock_multiple_indexes_same_realm_different_credentials_trailing_slash() -> Re .env(EnvVars::index_username("INTERNAL_PROXY_HERON"), "public") .env(EnvVars::index_password("INTERNAL_PROXY_HERON"), "heron") .env(EnvVars::index_username("INTERNAL_PROXY_EAGLE"), "public") - .env(EnvVars::index_password("INTERNAL_PROXY_EAGLE"), "eagle"), @r###" + .env(EnvVars::index_password("INTERNAL_PROXY_EAGLE"), "eagle"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 5 packages in [TIME] - "###); + "); Ok(()) } @@ -10656,14 +10656,14 @@ fn lock_relative_index() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -10703,17 +10703,17 @@ fn lock_relative_index() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -10722,7 +10722,7 @@ fn lock_relative_index() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + iniconfig==2.0.0 - "###); + "); Ok(()) } @@ -10768,7 +10768,7 @@ fn lock_no_sources() -> Result<()> { )?; // Lock the root package with `tool.uv.sources` enabled. - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -10844,7 +10844,7 @@ fn lock_no_sources() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- @@ -10855,7 +10855,7 @@ fn lock_no_sources() -> Result<()> { "); // Lock the root package with `tool.uv.sources` disabled. - uv_snapshot!(context.filters(), context.lock().arg("--no-sources"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--no-sources"), @" success: true exit_code: 0 ----- stdout ----- @@ -10946,7 +10946,7 @@ fn lock_no_sources() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--no-sources").arg("--locked"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--no-sources").arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- @@ -11027,7 +11027,7 @@ fn lock_migrate() -> Result<()> { "# )?; - uv_snapshot!(context.filters(), context.lock().current_dir(&context.temp_dir), @r###" + uv_snapshot!(context.filters(), context.lock().current_dir(&context.temp_dir), @" success: true exit_code: 0 ----- stdout ----- @@ -11038,7 +11038,7 @@ fn lock_migrate() -> Result<()> { Added idna v3.6 Added project v0.1.0 Added sniffio v1.3.1 - "###); + "); let lock = context.read("uv.lock"); @@ -11120,24 +11120,24 @@ fn lock_upgrade_package() -> Result<()> { )?; // Lock the root package. - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -11215,7 +11215,7 @@ fn lock_upgrade_package() -> Result<()> { )?; // Upgrade `anyio`, but nothing else. - uv_snapshot!(context.filters(), context.lock().arg("--upgrade-package").arg("anyio"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--upgrade-package").arg("anyio"), @" success: true exit_code: 0 ----- stdout ----- @@ -11223,17 +11223,17 @@ fn lock_upgrade_package() -> Result<()> { ----- stderr ----- Resolved 4 packages in [TIME] Updated anyio v2.0.0 -> v4.3.0 - "###); + "); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -11299,7 +11299,7 @@ fn lock_upgrade_package() -> Result<()> { }); // Upgrade everything. - uv_snapshot!(context.filters(), context.lock().arg("--upgrade"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--upgrade"), @" success: true exit_code: 0 ----- stdout ----- @@ -11307,17 +11307,17 @@ fn lock_upgrade_package() -> Result<()> { ----- stderr ----- Resolved 4 packages in [TIME] Updated idna v3.0 -> v3.6 - "###); + "); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -11444,7 +11444,7 @@ fn lock_warn_missing_transitive_lower_bounds() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock().arg("--resolution").arg("lowest"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--resolution").arg("lowest"), @" success: true exit_code: 0 ----- stdout ----- @@ -11454,7 +11454,7 @@ fn lock_warn_missing_transitive_lower_bounds() -> Result<()> { warning: The transitive dependency `packaging` is unpinned. Consider setting a lower bound with a constraint when using `--resolution lowest` to avoid using outdated versions. warning: The transitive dependency `iniconfig` is unpinned. Consider setting a lower bound with a constraint when using `--resolution lowest` to avoid using outdated versions. warning: The transitive dependency `colorama` is unpinned. Consider setting a lower bound with a constraint when using `--resolution lowest` to avoid using outdated versions. - "###); + "); Ok(()) } @@ -11499,7 +11499,7 @@ fn lock_find_links_local_wheel() -> Result<()> { context.temp_dir.join("links/").portable_display(), })?; - uv_snapshot!(context.filters(), context.lock().current_dir(&workspace), @r" + uv_snapshot!(context.filters(), context.lock().current_dir(&workspace), @" success: true exit_code: 0 ----- stdout ----- @@ -11546,7 +11546,7 @@ fn lock_find_links_local_wheel() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked").current_dir(&workspace), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked").current_dir(&workspace), @" success: true exit_code: 0 ----- stdout ----- @@ -11554,10 +11554,10 @@ fn lock_find_links_local_wheel() -> Result<()> { ----- stderr ----- Using CPython 3.12.[X] interpreter at: [PYTHON-3.12] Resolved 2 packages in [TIME] - "###); + "); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen").current_dir(&workspace), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen").current_dir(&workspace), @" success: true exit_code: 0 ----- stdout ----- @@ -11568,7 +11568,7 @@ fn lock_find_links_local_wheel() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + tqdm==1000.0.0 - "###); + "); Ok(()) } @@ -11620,7 +11620,7 @@ fn lock_find_links_ignore_explicit_index() -> Result<()> { context.temp_dir.join("links/").portable_display(), })?; - uv_snapshot!(context.filters(), context.lock().current_dir(&workspace), @r" + uv_snapshot!(context.filters(), context.lock().current_dir(&workspace), @" success: true exit_code: 0 ----- stdout ----- @@ -11680,7 +11680,7 @@ fn lock_find_links_ignore_explicit_index() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked").current_dir(&workspace), @r" + uv_snapshot!(context.filters(), context.lock().arg("--locked").current_dir(&workspace), @" success: true exit_code: 0 ----- stdout ----- @@ -11737,7 +11737,7 @@ fn lock_find_links_relative_url() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock().current_dir(&workspace), @r" + uv_snapshot!(context.filters(), context.lock().current_dir(&workspace), @" success: true exit_code: 0 ----- stdout ----- @@ -11797,7 +11797,7 @@ fn lock_find_links_relative_url() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked").current_dir(&workspace), @r" + uv_snapshot!(context.filters(), context.lock().arg("--locked").current_dir(&workspace), @" success: true exit_code: 0 ----- stdout ----- @@ -11850,7 +11850,7 @@ fn lock_find_links_local_sdist() -> Result<()> { context.temp_dir.join("links/").portable_display(), })?; - uv_snapshot!(context.filters(), context.lock().current_dir(&workspace), @r" + uv_snapshot!(context.filters(), context.lock().current_dir(&workspace), @" success: true exit_code: 0 ----- stdout ----- @@ -11895,7 +11895,7 @@ fn lock_find_links_local_sdist() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked").current_dir(&workspace), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked").current_dir(&workspace), @" success: true exit_code: 0 ----- stdout ----- @@ -11903,10 +11903,10 @@ fn lock_find_links_local_sdist() -> Result<()> { ----- stderr ----- Using CPython 3.12.[X] interpreter at: [PYTHON-3.12] Resolved 2 packages in [TIME] - "###); + "); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen").current_dir(&workspace), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen").current_dir(&workspace), @" success: true exit_code: 0 ----- stdout ----- @@ -11917,7 +11917,7 @@ fn lock_find_links_local_sdist() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + tqdm==999.0.0 - "###); + "); Ok(()) } @@ -11942,7 +11942,7 @@ fn lock_find_links_http_wheel() -> Result<()> { build_vendor_links_url() })?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -11989,17 +11989,17 @@ fn lock_find_links_http_wheel() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -12008,7 +12008,7 @@ fn lock_find_links_http_wheel() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + packaging==23.2 - "###); + "); Ok(()) } @@ -12033,7 +12033,7 @@ fn lock_find_links_http_sdist() -> Result<()> { build_vendor_links_url() })?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -12080,17 +12080,17 @@ fn lock_find_links_http_sdist() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -12099,7 +12099,7 @@ fn lock_find_links_http_sdist() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + packaging==23.2 - "###); + "); Ok(()) } @@ -12150,7 +12150,7 @@ fn lock_find_links_explicit_index() -> Result<()> { Url::from_file_path(context.temp_dir.join("links/")).unwrap() })?; - uv_snapshot!(context.filters(), context.lock().current_dir(&workspace), @r" + uv_snapshot!(context.filters(), context.lock().current_dir(&workspace), @" success: true exit_code: 0 ----- stdout ----- @@ -12197,7 +12197,7 @@ fn lock_find_links_explicit_index() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked").current_dir(&workspace), @r" + uv_snapshot!(context.filters(), context.lock().arg("--locked").current_dir(&workspace), @" success: true exit_code: 0 ----- stdout ----- @@ -12252,7 +12252,7 @@ fn lock_find_links_higher_priority_index() -> Result<()> { Url::from_file_path(context.temp_dir.join("links/")).unwrap() })?; - uv_snapshot!(context.filters(), context.lock().current_dir(&workspace), @r" + uv_snapshot!(context.filters(), context.lock().current_dir(&workspace), @" success: true exit_code: 0 ----- stdout ----- @@ -12347,7 +12347,7 @@ fn lock_find_links_lower_priority_index() -> Result<()> { Url::from_file_path(context.temp_dir.join("links/")).unwrap() })?; - uv_snapshot!(context.filters(), context.lock().current_dir(&workspace), @r" + uv_snapshot!(context.filters(), context.lock().current_dir(&workspace), @" success: true exit_code: 0 ----- stdout ----- @@ -12478,7 +12478,7 @@ fn lock_local_index() -> Result<()> { Url::from_file_path(&root).unwrap().as_str() })?; - uv_snapshot!(context.filters(), context.lock().env_remove(EnvVars::UV_EXCLUDE_NEWER), @r" + uv_snapshot!(context.filters(), context.lock().env_remove(EnvVars::UV_EXCLUDE_NEWER), @" success: true exit_code: 0 ----- stdout ----- @@ -12528,17 +12528,17 @@ fn lock_local_index() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked").env_remove(EnvVars::UV_EXCLUDE_NEWER), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked").env_remove(EnvVars::UV_EXCLUDE_NEWER), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen").env_remove(EnvVars::UV_EXCLUDE_NEWER), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen").env_remove(EnvVars::UV_EXCLUDE_NEWER), @" success: true exit_code: 0 ----- stdout ----- @@ -12572,14 +12572,14 @@ fn lock_sources_url() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 5 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -12653,17 +12653,17 @@ fn lock_sources_url() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 5 packages in [TIME] - "###); + "); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -12675,7 +12675,7 @@ fn lock_sources_url() -> Result<()> { + idna==3.6 + sniffio==1.3.1 + workspace==0.1.0 (from https://github.com/user-attachments/files/16592193/workspace.zip) - "###); + "); Ok(()) } @@ -12708,14 +12708,14 @@ fn lock_sources_archive() -> Result<()> { Url::from_file_path(&workspace_archive).unwrap(), })?; - uv_snapshot!( context.lock(), @r###" + uv_snapshot!( context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 5 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -12789,17 +12789,17 @@ fn lock_sources_archive() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 5 packages in [TIME] - "###); + "); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -12811,7 +12811,7 @@ fn lock_sources_archive() -> Result<()> { + idna==3.6 + sniffio==1.3.1 + workspace==0.1.0 (from file://[TEMP_DIR]/workspace.zip) - "###); + "); Ok(()) } @@ -12859,14 +12859,14 @@ fn lock_sources_source_tree() -> Result<()> { context.temp_dir.child("workspace").portable_display() })?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 3 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -12913,17 +12913,17 @@ fn lock_sources_source_tree() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 3 packages in [TIME] - "###); + "); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -12934,7 +12934,7 @@ fn lock_sources_source_tree() -> Result<()> { + anyio==0.1.0 (from file://[TEMP_DIR]/workspace/anyio) + project==0.1.0 (from file://[TEMP_DIR]/) + workspace==0.1.0 (from file://[TEMP_DIR]/workspace) - "###); + "); Ok(()) } @@ -12996,14 +12996,14 @@ fn lock_editable() -> Result<()> { library.child("src/__init__.py").touch()?; // First, lock without marking the dependency as editable from either member. - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 3 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -13056,14 +13056,14 @@ fn lock_editable() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 3 packages in [TIME] - "###); + "); // Next, mark the dependency as editable from one member. leaf.child("pyproject.toml").write_str(indoc! {r#" @@ -13080,7 +13080,7 @@ fn lock_editable() -> Result<()> { library = { path = "../../library", editable = true } "#})?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: false exit_code: 1 ----- stdout ----- @@ -13178,7 +13178,7 @@ fn lock_mixed_extras() -> Result<()> { leaf2.child("src/leaf2/__init__.py").touch()?; // Lock the first workspace. - uv_snapshot!(context.filters(), context.lock().current_dir(&workspace1), @r" + uv_snapshot!(context.filters(), context.lock().current_dir(&workspace1), @" success: true exit_code: 0 ----- stdout ----- @@ -13286,7 +13286,7 @@ fn lock_mixed_extras() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked").current_dir(&workspace1), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked").current_dir(&workspace1), @" success: true exit_code: 0 ----- stdout ----- @@ -13294,11 +13294,11 @@ fn lock_mixed_extras() -> Result<()> { ----- stderr ----- Using CPython 3.12.[X] interpreter at: [PYTHON-3.12] Resolved 6 packages in [TIME] - "###); + "); // Install from the lockfile. This should include the first-party packages, but no third-party // packages, since they all rely on extras. - uv_snapshot!(context.filters(), context.sync().arg("--frozen").current_dir(&workspace1), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen").current_dir(&workspace1), @" success: true exit_code: 0 ----- stdout ----- @@ -13311,12 +13311,12 @@ fn lock_mixed_extras() -> Result<()> { + leaf1==0.1.0 (from file://[TEMP_DIR]/workspace1/packages/leaf1) + leaf2==0.1.0 (from file://[TEMP_DIR]/workspace2/packages/leaf2) + workspace2==0.1.0 (from file://[TEMP_DIR]/workspace2) - "###); + "); // Install from the lockfile with the `async` extra. This should include `typing-extensions`, // but not `iniconfig` or `packaging`, since we're installing the root package, whereas // `iniconfig` is an extra on another package, and `packaging` is an extra in another workspace. - uv_snapshot!(context.filters(), context.sync().arg("--extra").arg("async").arg("--frozen").current_dir(&workspace1), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--extra").arg("async").arg("--frozen").current_dir(&workspace1), @" success: true exit_code: 0 ----- stdout ----- @@ -13325,7 +13325,7 @@ fn lock_mixed_extras() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + typing-extensions==4.10.0 - "###); + "); Ok(()) } @@ -13375,7 +13375,7 @@ fn lock_transitive_extra() -> Result<()> { leaf.child("src/leaf/__init__.py").touch()?; // Lock the workspace. - uv_snapshot!(context.filters(), context.lock().current_dir(&workspace), @r###" + uv_snapshot!(context.filters(), context.lock().current_dir(&workspace), @" success: true exit_code: 0 ----- stdout ----- @@ -13383,7 +13383,7 @@ fn lock_transitive_extra() -> Result<()> { ----- stderr ----- Using CPython 3.12.[X] interpreter at: [PYTHON-3.12] Resolved 4 packages in [TIME] - "###); + "); let lock = fs_err::read_to_string(workspace.join("uv.lock")).unwrap(); @@ -13463,7 +13463,7 @@ fn lock_transitive_extra() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked").current_dir(&workspace), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked").current_dir(&workspace), @" success: true exit_code: 0 ----- stdout ----- @@ -13471,11 +13471,11 @@ fn lock_transitive_extra() -> Result<()> { ----- stderr ----- Using CPython 3.12.[X] interpreter at: [PYTHON-3.12] Resolved 4 packages in [TIME] - "###); + "); // Install from the lockfile. This should include the first-party packages, but no third-party // packages, since they all rely on extras. - uv_snapshot!(context.filters(), context.sync().arg("--frozen").current_dir(&workspace), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen").current_dir(&workspace), @" success: true exit_code: 0 ----- stdout ----- @@ -13486,11 +13486,11 @@ fn lock_transitive_extra() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + leaf==0.1.0 (from file://[TEMP_DIR]/workspace/packages/leaf) - "###); + "); // Install from the lockfile with the `async` extra. This should include `typing-extensions` // and `iniconfig`. - uv_snapshot!(context.filters(), context.sync().arg("--extra").arg("async").arg("--frozen").current_dir(&workspace), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--extra").arg("async").arg("--frozen").current_dir(&workspace), @" success: true exit_code: 0 ----- stdout ----- @@ -13500,7 +13500,7 @@ fn lock_transitive_extra() -> Result<()> { Installed 2 packages in [TIME] + iniconfig==2.0.0 + typing-extensions==4.10.0 - "###); + "); Ok(()) } @@ -13527,14 +13527,14 @@ fn lock_mismatched_sources() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -13570,7 +13570,7 @@ fn lock_mismatched_sources() -> Result<()> { }); // If we run with `--no-sources`, we should use the URL provided in `project.dependencies`. - uv_snapshot!(context.filters(), context.lock().arg("--no-sources"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--no-sources"), @" success: true exit_code: 0 ----- stdout ----- @@ -13639,14 +13639,14 @@ fn lock_mismatched_versions() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -13682,17 +13682,17 @@ fn lock_mismatched_versions() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -13701,7 +13701,7 @@ fn lock_mismatched_versions() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + uv-public-pypackage==0.1.0 (from git+https://github.com/astral-test/uv-public-pypackage@0dacfd662c64cb4ceb16e6cf65a157a8b715b979) - "###); + "); Ok(()) } @@ -13726,7 +13726,7 @@ fn unconditional_overlapping_marker_disjoint_version_constraints() -> Result<()> "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: false exit_code: 1 ----- stdout ----- @@ -13756,7 +13756,7 @@ fn check_no_lock() -> Result<()> { )?; uv_snapshot!(context.filters(), context.lock() - .arg("--check"), @r" + .arg("--check"), @" success: false exit_code: 2 ----- stdout ----- @@ -13784,7 +13784,7 @@ fn check_outdated_lock() -> Result<()> { )?; // Generate the lock - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -13795,7 +13795,7 @@ fn check_outdated_lock() -> Result<()> { // Check the --check returns fine uv_snapshot!(context.filters(), context.lock() - .arg("--check"), @r" + .arg("--check"), @" success: true exit_code: 0 ----- stdout ----- @@ -13816,7 +13816,7 @@ fn check_outdated_lock() -> Result<()> { )?; uv_snapshot!(context.filters(), context.lock() - .arg("--check"), @r" + .arg("--check"), @" success: false exit_code: 1 ----- stdout ----- @@ -13828,7 +13828,7 @@ fn check_outdated_lock() -> Result<()> { // Providing both `--check` and `--locked` is okay uv_snapshot!(context.filters(), context.lock() - .arg("--check").arg("--locked"), @r" + .arg("--check").arg("--locked"), @" success: false exit_code: 1 ----- stdout ----- @@ -13862,7 +13862,7 @@ fn normalize_false_marker_dependency_groups() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -13871,7 +13871,7 @@ fn normalize_false_marker_dependency_groups() -> Result<()> { Resolved 1 package in [TIME] "); - uv_snapshot!(context.filters(), context.lock().arg("--check"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--check"), @" success: true exit_code: 0 ----- stdout ----- @@ -13930,7 +13930,7 @@ fn normalize_false_marker_requires_dist() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -13939,7 +13939,7 @@ fn normalize_false_marker_requires_dist() -> Result<()> { Resolved 1 package in [TIME] "); - uv_snapshot!(context.filters(), context.lock().arg("--check"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--check"), @" success: true exit_code: 0 ----- stdout ----- @@ -13992,7 +13992,7 @@ fn lock_change_index() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock().arg("--index-url").arg("https://public:heron@pypi-proxy.fly.dev/basic-auth/simple"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--index-url").arg("https://public:heron@pypi-proxy.fly.dev/basic-auth/simple"), @" success: true exit_code: 0 ----- stdout ----- @@ -14039,14 +14039,14 @@ fn lock_change_index() -> Result<()> { }); // Re-run against PyPI. - uv_snapshot!(context.filters(), context.lock().arg("--index-url").arg("https://pypi.org/simple"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--index-url").arg("https://pypi.org/simple"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -14086,14 +14086,14 @@ fn lock_change_index() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); Ok(()) } @@ -14133,14 +14133,14 @@ fn lock_remove_member() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 5 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -14219,7 +14219,7 @@ fn lock_remove_member() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- @@ -14246,7 +14246,7 @@ fn lock_remove_member() -> Result<()> { )?; // Re-run with `--locked`. This should fail. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: false exit_code: 1 ----- stdout ----- @@ -14257,7 +14257,7 @@ fn lock_remove_member() -> Result<()> { "); // Re-run without `--locked`. - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -14348,7 +14348,7 @@ fn lock_remove_member() -> Result<()> { )?; // Re-run with `--locked`. This should fail. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: false exit_code: 1 ----- stdout ----- @@ -14359,7 +14359,7 @@ fn lock_remove_member() -> Result<()> { "); // Re-run without `--locked`. - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -14370,7 +14370,7 @@ fn lock_remove_member() -> Result<()> { Removed idna v3.6 Removed leaf v0.1.0 Removed sniffio v1.3.1 - "###); + "); let lock = context.read("uv.lock"); @@ -14421,14 +14421,14 @@ fn lock_add_member_with_build_system() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 1 package in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -14453,14 +14453,14 @@ fn lock_add_member_with_build_system() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 1 package in [TIME] - "###); + "); // Create a workspace member. let leaf = context.temp_dir.child("leaf"); @@ -14493,7 +14493,7 @@ fn lock_add_member_with_build_system() -> Result<()> { )?; // Re-run with `--locked`. This should fail. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: false exit_code: 1 ----- stdout ----- @@ -14504,7 +14504,7 @@ fn lock_add_member_with_build_system() -> Result<()> { "); // Re-run with `--offline`. This should also fail, during the resolve phase. - uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline").arg("--no-cache"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline").arg("--no-cache"), @" success: false exit_code: 1 ----- stdout ----- @@ -14515,10 +14515,10 @@ fn lock_add_member_with_build_system() -> Result<()> { And because your workspace requires leaf, we can conclude that your workspace's requirements are unsatisfiable. hint: Packages were unavailable because the network was disabled. When the network is disabled, registry packages may only be read from the cache. - "###); + "); // Re-run without `--locked`. - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -14532,7 +14532,7 @@ fn lock_add_member_with_build_system() -> Result<()> { "); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- @@ -14633,14 +14633,14 @@ fn lock_add_member_without_build_system() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 1 package in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -14665,14 +14665,14 @@ fn lock_add_member_without_build_system() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 1 package in [TIME] - "###); + "); // Create a workspace member. let leaf = context.temp_dir.child("leaf"); @@ -14701,7 +14701,7 @@ fn lock_add_member_without_build_system() -> Result<()> { )?; // Re-run with `--locked`. This should fail. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: false exit_code: 1 ----- stdout ----- @@ -14712,7 +14712,7 @@ fn lock_add_member_without_build_system() -> Result<()> { "); // Re-run with `--offline`. This should also fail, during the resolve phase. - uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline").arg("--no-cache"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline").arg("--no-cache"), @" success: false exit_code: 1 ----- stdout ----- @@ -14723,10 +14723,10 @@ fn lock_add_member_without_build_system() -> Result<()> { And because your workspace requires leaf, we can conclude that your workspace's requirements are unsatisfiable. hint: Packages were unavailable because the network was disabled. When the network is disabled, registry packages may only be read from the cache. - "###); + "); // Re-run without `--locked`. - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -14740,7 +14740,7 @@ fn lock_add_member_without_build_system() -> Result<()> { "); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- @@ -14837,7 +14837,7 @@ fn lock_add_member_without_build_system() -> Result<()> { )?; // Re-run with `--locked`. This should fail. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: false exit_code: 1 ----- stdout ----- @@ -14848,7 +14848,7 @@ fn lock_add_member_without_build_system() -> Result<()> { "); // Re-run without `--locked`. - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -14858,7 +14858,7 @@ fn lock_add_member_without_build_system() -> Result<()> { "); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- @@ -14969,14 +14969,14 @@ fn lock_redundant_add_member() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -15038,14 +15038,14 @@ fn lock_redundant_add_member() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); // Add a dependency that's already included in the lockfile. pyproject_toml.write_str( @@ -15063,7 +15063,7 @@ fn lock_redundant_add_member() -> Result<()> { // Re-run with `--locked`. This will fail, though in theory it could succeed, since the current // _resolution_ satisfies the requirements, even if the inputs are not identical - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: false exit_code: 1 ----- stdout ----- @@ -15074,14 +15074,14 @@ fn lock_redundant_add_member() -> Result<()> { "); // Re-run without `--locked`. - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -15166,14 +15166,14 @@ fn lock_new_constraints() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -15235,14 +15235,14 @@ fn lock_new_constraints() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); // Add a constraint. pyproject_toml.write_str( @@ -15261,7 +15261,7 @@ fn lock_new_constraints() -> Result<()> { )?; // Re-run with `--locked`. This should fail. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: false exit_code: 1 ----- stdout ----- @@ -15272,7 +15272,7 @@ fn lock_new_constraints() -> Result<()> { "); // Re-run without `--locked`. - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -15280,7 +15280,7 @@ fn lock_new_constraints() -> Result<()> { ----- stderr ----- Resolved 4 packages in [TIME] Updated anyio v4.3.0 -> v4.2.0 - "###); + "); let lock = context.read("uv.lock"); @@ -15378,14 +15378,14 @@ fn lock_remove_member_non_project() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -15452,14 +15452,14 @@ fn lock_remove_member_non_project() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); // Remove the member. pyproject_toml.write_str( @@ -15470,7 +15470,7 @@ fn lock_remove_member_non_project() -> Result<()> { )?; // Re-run with `--locked`. This should fail. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: false exit_code: 1 ----- stdout ----- @@ -15482,7 +15482,7 @@ fn lock_remove_member_non_project() -> Result<()> { "); // Re-run without `--locked`. - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -15494,7 +15494,7 @@ fn lock_remove_member_non_project() -> Result<()> { Removed idna v3.6 Removed leaf v0.1.0 Removed sniffio v1.3.1 - "###); + "); let lock = context.read("uv.lock"); @@ -15534,14 +15534,14 @@ fn lock_rename_project() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -15581,14 +15581,14 @@ fn lock_rename_project() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); // Rename the project. pyproject_toml.write_str( @@ -15602,7 +15602,7 @@ fn lock_rename_project() -> Result<()> { )?; // Re-run with `--locked`. This should fail. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: false exit_code: 1 ----- stdout ----- @@ -15613,7 +15613,7 @@ fn lock_rename_project() -> Result<()> { "); // Re-run without `--locked`. - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -15622,7 +15622,7 @@ fn lock_rename_project() -> Result<()> { Resolved 2 packages in [TIME] Removed project v0.1.0 Added renamed v0.1.0 - "###); + "); let lock = context.read("uv.lock"); @@ -15732,14 +15732,14 @@ fn lock_missing_metadata() -> Result<()> { "#)?; // Re-locking should add `[package.metadata]`. - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -15860,7 +15860,7 @@ fn lock_dev_dependencies_alias() -> Result<()> { "#)?; // Re-locking should be a no-op. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- @@ -15884,7 +15884,7 @@ fn lock_dev_dependencies_alias() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -15969,14 +15969,14 @@ fn lock_reorder() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 5 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -16051,14 +16051,14 @@ fn lock_reorder() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 5 packages in [TIME] - "###); + "); // Reorder the dependencies. pyproject_toml.write_str( @@ -16072,14 +16072,14 @@ fn lock_reorder() -> Result<()> { )?; // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 5 packages in [TIME] - "###); + "); Ok(()) } @@ -16119,14 +16119,14 @@ fn lock_narrowed_python_version_upper() -> Result<()> { let lockfile = context.temp_dir.join("uv.lock"); - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 3 packages in [TIME] - "###); + "); let lock = fs_err::read_to_string(&lockfile).unwrap(); @@ -16183,14 +16183,14 @@ fn lock_narrowed_python_version_upper() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 3 packages in [TIME] - "###); + "); Ok(()) } @@ -16230,14 +16230,14 @@ fn lock_narrowed_python_version() -> Result<()> { let lockfile = context.temp_dir.join("uv.lock"); - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 3 packages in [TIME] - "###); + "); let lock = fs_err::read_to_string(&lockfile).unwrap(); @@ -16296,14 +16296,14 @@ fn lock_narrowed_python_version() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 3 packages in [TIME] - "###); + "); Ok(()) } @@ -16330,7 +16330,7 @@ fn lock_exclude_unnecessary_python_forks() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -16406,14 +16406,14 @@ fn lock_exclude_unnecessary_python_forks() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); Ok(()) } @@ -16437,7 +16437,7 @@ fn lock_constrained_environment() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -16546,25 +16546,25 @@ fn lock_constrained_environment() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 7 packages in [TIME] - "###); + "); // Re-run with `--offline`. We shouldn't need a network connection to validate an // already-correct lockfile with immutable metadata. - uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline").arg("--no-cache"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline").arg("--no-cache"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 7 packages in [TIME] - "###); + "); // Rewrite with a list, rather than a string. let pyproject_toml = context.temp_dir.child("pyproject.toml"); @@ -16582,14 +16582,14 @@ fn lock_constrained_environment() -> Result<()> { )?; // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 7 packages in [TIME] - "###); + "); // Re-lock without the environment constraint. let pyproject_toml = context.temp_dir.child("pyproject.toml"); @@ -16604,7 +16604,7 @@ fn lock_constrained_environment() -> Result<()> { )?; // Re-run with `--locked`. This should fail. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: false exit_code: 1 ----- stdout ----- @@ -16614,7 +16614,7 @@ fn lock_constrained_environment() -> Result<()> { The lockfile at `uv.lock` needs to be updated, but `--locked` was provided. To update the lockfile, run `uv lock`. "); - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -16622,7 +16622,7 @@ fn lock_constrained_environment() -> Result<()> { ----- stderr ----- Resolved 8 packages in [TIME] Added colorama v0.4.6 - "###); + "); let lock = context.read("uv.lock"); @@ -16761,7 +16761,7 @@ fn lock_constrained_environment_legacy() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -16875,25 +16875,25 @@ fn lock_constrained_environment_legacy() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 7 packages in [TIME] - "###); + "); // Re-run with `--offline`. We shouldn't need a network connection to validate an // already-correct lockfile with immutable metadata. - uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline").arg("--no-cache"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline").arg("--no-cache"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 7 packages in [TIME] - "###); + "); Ok(()) } @@ -16917,7 +16917,7 @@ fn lock_overlapping_environment() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: false exit_code: 2 ----- stdout ----- @@ -16926,7 +16926,7 @@ fn lock_overlapping_environment() -> Result<()> { error: Supported environments must be disjoint, but the following markers overlap: `sys_platform != 'win32'` and `python_full_version >= '3.11'`. hint: replace `python_full_version >= '3.11'` with `python_full_version >= '3.11' and sys_platform == 'win32'`. - "###); + "); Ok(()) } @@ -16950,7 +16950,7 @@ fn lock_non_project_fork() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -16958,7 +16958,7 @@ fn lock_non_project_fork() -> Result<()> { ----- stderr ----- warning: No `requires-python` value found in the workspace. Defaulting to `>=3.10`. Resolved 6 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -17060,7 +17060,7 @@ fn lock_non_project_fork() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- @@ -17068,11 +17068,11 @@ fn lock_non_project_fork() -> Result<()> { ----- stderr ----- warning: No `requires-python` value found in the workspace. Defaulting to `>=3.10`. Resolved 6 packages in [TIME] - "###); + "); // Re-run with `--offline`. We shouldn't need a network connection to validate an // already-correct lockfile with immutable metadata. - uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline").arg("--no-cache"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline").arg("--no-cache"), @" success: true exit_code: 0 ----- stdout ----- @@ -17080,7 +17080,7 @@ fn lock_non_project_fork() -> Result<()> { ----- stderr ----- warning: No `requires-python` value found in the workspace. Defaulting to `>=3.10`. Resolved 6 packages in [TIME] - "###); + "); // Add `iniconfig`. pyproject_toml.write_str( @@ -17097,7 +17097,7 @@ fn lock_non_project_fork() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -17106,9 +17106,9 @@ fn lock_non_project_fork() -> Result<()> { warning: No `requires-python` value found in the workspace. Defaulting to `>=3.10`. Resolved 7 packages in [TIME] Added iniconfig v2.0.0 - "###); + "); - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -17122,7 +17122,7 @@ fn lock_non_project_fork() -> Result<()> { + iniconfig==2.0.0 + sniffio==1.3.1 + typing-extensions==4.10.0 - "###); + "); Ok(()) } @@ -17143,7 +17143,7 @@ fn lock_non_project_conditional() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -17151,7 +17151,7 @@ fn lock_non_project_conditional() -> Result<()> { ----- stderr ----- warning: No `requires-python` value found in the workspace. Defaulting to `>=3.12`. Resolved 3 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -17207,7 +17207,7 @@ fn lock_non_project_conditional() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- @@ -17215,11 +17215,11 @@ fn lock_non_project_conditional() -> Result<()> { ----- stderr ----- warning: No `requires-python` value found in the workspace. Defaulting to `>=3.12`. Resolved 3 packages in [TIME] - "###); + "); // Re-run with `--offline`. We shouldn't need a network connection to validate an // already-correct lockfile with immutable metadata. - uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline").arg("--no-cache"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline").arg("--no-cache"), @" success: true exit_code: 0 ----- stdout ----- @@ -17227,7 +17227,7 @@ fn lock_non_project_conditional() -> Result<()> { ----- stderr ----- warning: No `requires-python` value found in the workspace. Defaulting to `>=3.12`. Resolved 3 packages in [TIME] - "###); + "); Ok(()) } @@ -17252,7 +17252,7 @@ fn lock_non_project_group() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -17260,7 +17260,7 @@ fn lock_non_project_group() -> Result<()> { ----- stderr ----- warning: No `requires-python` value found in the workspace. Defaulting to `>=3.10`. Resolved 6 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -17349,7 +17349,7 @@ fn lock_non_project_group() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- @@ -17357,11 +17357,11 @@ fn lock_non_project_group() -> Result<()> { ----- stderr ----- warning: No `requires-python` value found in the workspace. Defaulting to `>=3.10`. Resolved 6 packages in [TIME] - "###); + "); // Re-run with `--offline`. We shouldn't need a network connection to validate an // already-correct lockfile with immutable metadata. - uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline").arg("--no-cache"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline").arg("--no-cache"), @" success: true exit_code: 0 ----- stdout ----- @@ -17369,7 +17369,7 @@ fn lock_non_project_group() -> Result<()> { ----- stderr ----- warning: No `requires-python` value found in the workspace. Defaulting to `>=3.10`. Resolved 6 packages in [TIME] - "###); + "); Ok(()) } @@ -17393,7 +17393,7 @@ fn lock_non_project_sources() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -17401,7 +17401,7 @@ fn lock_non_project_sources() -> Result<()> { ----- stderr ----- warning: No `requires-python` value found in the workspace. Defaulting to `>=3.12`. Resolved 1 package in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -17434,7 +17434,7 @@ fn lock_non_project_sources() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- @@ -17442,11 +17442,11 @@ fn lock_non_project_sources() -> Result<()> { ----- stderr ----- warning: No `requires-python` value found in the workspace. Defaulting to `>=3.12`. Resolved 1 package in [TIME] - "###); + "); // Re-run with `--offline`. We shouldn't need a network connection to validate an // already-correct lockfile with immutable metadata. - uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline").arg("--no-cache"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline").arg("--no-cache"), @" success: true exit_code: 0 ----- stdout ----- @@ -17454,7 +17454,7 @@ fn lock_non_project_sources() -> Result<()> { ----- stderr ----- warning: No `requires-python` value found in the workspace. Defaulting to `>=3.12`. Resolved 1 package in [TIME] - "###); + "); Ok(()) } @@ -17477,7 +17477,7 @@ fn lock_dropped_dev_extra() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -17538,7 +17538,7 @@ fn lock_dropped_dev_extra() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- @@ -17550,7 +17550,7 @@ fn lock_dropped_dev_extra() -> Result<()> { // Re-run with `--offline`. We shouldn't need a network connection to validate an // already-correct lockfile with immutable metadata. - uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline").arg("--no-cache"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline").arg("--no-cache"), @" success: true exit_code: 0 ----- stdout ----- @@ -17561,7 +17561,7 @@ fn lock_dropped_dev_extra() -> Result<()> { "); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -17595,7 +17595,7 @@ fn lock_empty_dev_dependencies() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -17646,7 +17646,7 @@ fn lock_empty_dev_dependencies() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- @@ -17658,7 +17658,7 @@ fn lock_empty_dev_dependencies() -> Result<()> { // Re-run with `--offline`. We shouldn't need a network connection to validate an // already-correct lockfile with immutable metadata. - uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline").arg("--no-cache"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline").arg("--no-cache"), @" success: true exit_code: 0 ----- stdout ----- @@ -17669,7 +17669,7 @@ fn lock_empty_dev_dependencies() -> Result<()> { "); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -17703,7 +17703,7 @@ fn lock_empty_dependency_group() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -17753,28 +17753,28 @@ fn lock_empty_dependency_group() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); // Re-run with `--offline`. We shouldn't need a network connection to validate an // already-correct lockfile with immutable metadata. - uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline").arg("--no-cache"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline").arg("--no-cache"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -17783,7 +17783,7 @@ fn lock_empty_dependency_group() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + iniconfig==2.0.0 - "###); + "); Ok(()) } @@ -17804,7 +17804,7 @@ fn lock_add_empty_dependency_group() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -17851,14 +17851,14 @@ fn lock_add_empty_dependency_group() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); // Add an empty group. pyproject_toml.write_str( @@ -17875,7 +17875,7 @@ fn lock_add_empty_dependency_group() -> Result<()> { )?; // Re-run with `--locked`; this should fail. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: false exit_code: 1 ----- stdout ----- @@ -17886,14 +17886,14 @@ fn lock_add_empty_dependency_group() -> Result<()> { "); // Re-lock the project. - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -17936,14 +17936,14 @@ fn lock_add_empty_dependency_group() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); // Remove the empty group. pyproject_toml.write_str( @@ -17957,7 +17957,7 @@ fn lock_add_empty_dependency_group() -> Result<()> { )?; // Re-run with `--locked`; this should fail. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: false exit_code: 1 ----- stdout ----- @@ -17968,14 +17968,14 @@ fn lock_add_empty_dependency_group() -> Result<()> { "); // Re-lock the project. - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -18015,14 +18015,14 @@ fn lock_add_empty_dependency_group() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); Ok(()) } @@ -18046,14 +18046,14 @@ fn lock_trailing_slash_index_url() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -18115,28 +18115,28 @@ fn lock_trailing_slash_index_url() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); // Re-run with `--offline`. We shouldn't need a network connection to validate an // already-correct lockfile with immutable metadata. - uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline").arg("--no-cache"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline").arg("--no-cache"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -18147,7 +18147,7 @@ fn lock_trailing_slash_index_url() -> Result<()> { + anyio==3.7.0 + idna==3.6 + sniffio==1.3.1 - "###); + "); Ok(()) } @@ -18175,7 +18175,7 @@ fn lock_invalid_index() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @r#" success: false exit_code: 2 ----- stdout ----- @@ -18194,7 +18194,7 @@ fn lock_invalid_index() -> Result<()> { 9 | iniconfig = { index = "internal proxy" } | ^^^^^^^^^^^^^^^^ Index names may only contain letters, digits, hyphens, underscores, and periods, but found unsupported character (` `) in: `internal proxy` - "###); + "#); Ok(()) } @@ -18222,7 +18222,7 @@ fn lock_explicit_index() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -18330,7 +18330,7 @@ fn lock_explicit_default_index() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -18495,14 +18495,14 @@ fn lock_named_index() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap(); @@ -18564,7 +18564,7 @@ fn lock_default_index() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -18626,7 +18626,7 @@ fn lock_default_index() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: false exit_code: 1 ----- stdout ----- @@ -18634,7 +18634,7 @@ fn lock_default_index() -> Result<()> { ----- stderr ----- × No solution found when resolving dependencies: ╰─▶ Because iniconfig was not found in the package registry and your project depends on iniconfig, we can conclude that your project's requirements are unsatisfiable. - "###); + "); let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap(); @@ -18695,7 +18695,7 @@ fn lock_named_index_cli() -> Result<()> { )?; // The package references a non-existent index. - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: false exit_code: 1 ----- stdout ----- @@ -18704,17 +18704,17 @@ fn lock_named_index_cli() -> Result<()> { × Failed to build `project @ file://[TEMP_DIR]/` ├─▶ Failed to parse entry: `jinja2` ╰─▶ Package `jinja2` references an undeclared index: `pytorch` - "###); + "); // But it's fine if it comes from the CLI. - uv_snapshot!(context.filters(), context.lock().arg("--index").arg("pytorch=https://astral-sh.github.io/pytorch-mirror/whl/cu121"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--index").arg("pytorch=https://astral-sh.github.io/pytorch-mirror/whl/cu121"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 3 packages in [TIME] - "###); + "); let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap(); @@ -18790,7 +18790,7 @@ fn lock_repeat_named_index() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: false exit_code: 2 ----- stdout ----- @@ -18802,7 +18802,7 @@ fn lock_repeat_named_index() -> Result<()> { 8 | [[tool.uv.index]] | ^^^^^^^^^^^^^^^^^ duplicate index name `pytorch` - "###); + "); Ok(()) } @@ -18857,14 +18857,14 @@ fn lock_repeat_named_index_member() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 3 packages in [TIME] - "###); + "); let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap(); @@ -18946,14 +18946,14 @@ fn lock_unique_named_index() -> Result<()> { )?; // Fall back to PyPI, since `iniconfig` doesn't exist on the PyTorch index. - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap(); @@ -19020,14 +19020,14 @@ fn lock_repeat_named_index_cli() -> Result<()> { )?; // Resolve to the PyTorch index. - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 3 packages in [TIME] - "###); + "); let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap(); @@ -19087,14 +19087,14 @@ fn lock_repeat_named_index_cli() -> Result<()> { // Resolve to PyPI, since the PyTorch index is replaced by the Packse index, which doesn't // include `jinja2`. - uv_snapshot!(context.filters(), context.lock().arg("--index").arg(format!("pytorch={}", packse_index_url())), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--index").arg(format!("pytorch={}", packse_index_url())), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 3 packages in [TIME] - "###); + "); let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap(); @@ -19186,14 +19186,14 @@ fn lock_named_index_overlap() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap(); @@ -19268,7 +19268,7 @@ fn lock_explicit_virtual_project() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -19423,7 +19423,7 @@ fn lock_explicit_virtual_project() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- @@ -19435,7 +19435,7 @@ fn lock_explicit_virtual_project() -> Result<()> { // Re-run with `--offline`. We shouldn't need a network connection to validate an // already-correct lockfile with immutable metadata. - uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline").arg("--no-cache"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline").arg("--no-cache"), @" success: true exit_code: 0 ----- stdout ----- @@ -19446,7 +19446,7 @@ fn lock_explicit_virtual_project() -> Result<()> { "); // Install from the lockfile. The virtual project should _not_ be installed. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -19490,7 +19490,7 @@ fn lock_implicit_virtual_project() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -19645,7 +19645,7 @@ fn lock_implicit_virtual_project() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- @@ -19657,7 +19657,7 @@ fn lock_implicit_virtual_project() -> Result<()> { // Re-run with `--offline`. We shouldn't need a network connection to validate an // already-correct lockfile with immutable metadata. - uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline").arg("--no-cache"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline").arg("--no-cache"), @" success: true exit_code: 0 ----- stdout ----- @@ -19668,7 +19668,7 @@ fn lock_implicit_virtual_project() -> Result<()> { "); // Install from the lockfile. The virtual project should _not_ be installed. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -19722,7 +19722,7 @@ fn lock_implicit_package_path() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -19815,28 +19815,28 @@ fn lock_implicit_package_path() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 6 packages in [TIME] - "###); + "); // Re-run with `--offline`. We shouldn't need a network connection to validate an // already-correct lockfile with immutable metadata. - uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline").arg("--no-cache"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline").arg("--no-cache"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 6 packages in [TIME] - "###); + "); // Install from the lockfile. The path dependency should be installed. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -19872,14 +19872,14 @@ fn lock_conflicting_environment() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: Environment markers `python_full_version < '3.11'` don't overlap with Python requirement `>=3.12` - "###); + "); Ok(()) } @@ -19906,14 +19906,14 @@ fn lock_split_python_environment() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -19976,25 +19976,25 @@ fn lock_split_python_environment() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); // Re-run with `--offline`. We shouldn't need a network connection to validate an // already-correct lockfile with immutable metadata. - uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline").arg("--no-cache"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline").arg("--no-cache"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); Ok(()) } @@ -20017,14 +20017,14 @@ fn lock_python_upper_bound() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 18 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -20344,25 +20344,25 @@ fn lock_python_upper_bound() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 18 packages in [TIME] - "###); + "); // Re-run with `--offline`. We shouldn't need a network connection to validate an // already-correct lockfile with immutable metadata. - uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline").arg("--no-cache"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline").arg("--no-cache"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 18 packages in [TIME] - "###); + "); Ok(()) } @@ -20389,14 +20389,14 @@ fn lock_simplified_environments() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -20444,28 +20444,28 @@ fn lock_simplified_environments() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); // Re-run with `--offline`. We shouldn't need a network connection to validate an // already-correct lockfile with immutable metadata. - uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline").arg("--no-cache"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline").arg("--no-cache"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -20474,7 +20474,7 @@ fn lock_simplified_environments() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + iniconfig==2.0.0 - "###); + "); Ok(()) } @@ -20499,7 +20499,7 @@ fn lock_dependency_metadata() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -20565,28 +20565,28 @@ fn lock_dependency_metadata() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 3 packages in [TIME] - "###); + "); // Re-run with `--offline`. We shouldn't need a network connection to validate an // already-correct lockfile with immutable metadata. - uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline").arg("--no-cache"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline").arg("--no-cache"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 3 packages in [TIME] - "###); + "); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -20596,7 +20596,7 @@ fn lock_dependency_metadata() -> Result<()> { Installed 2 packages in [TIME] + anyio==3.7.0 + iniconfig==2.0.0 - "###); + "); // Update the static metadata. pyproject_toml.write_str( @@ -20615,7 +20615,7 @@ fn lock_dependency_metadata() -> Result<()> { )?; // The lockfile should update. - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -20624,7 +20624,7 @@ fn lock_dependency_metadata() -> Result<()> { Resolved 3 packages in [TIME] Removed iniconfig v2.0.0 Added typing-extensions v4.10.0 - "###); + "); // Remove the static metadata. pyproject_toml.write_str( @@ -20638,7 +20638,7 @@ fn lock_dependency_metadata() -> Result<()> { )?; // The lockfile should update. - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -20648,7 +20648,7 @@ fn lock_dependency_metadata() -> Result<()> { Added idna v3.6 Added sniffio v1.3.1 Removed typing-extensions v4.10.0 - "###); + "); // Use a blanket match. pyproject_toml.write_str( @@ -20666,7 +20666,7 @@ fn lock_dependency_metadata() -> Result<()> { )?; // The lockfile should update. - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -20676,7 +20676,7 @@ fn lock_dependency_metadata() -> Result<()> { Removed idna v3.6 Added iniconfig v2.0.0 Removed sniffio v1.3.1 - "###); + "); // Update the static metadata. pyproject_toml.write_str( @@ -20741,7 +20741,7 @@ fn lock_dependency_metadata_git() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -20803,28 +20803,28 @@ fn lock_dependency_metadata_git() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 3 packages in [TIME] - "###); + "); // Re-run with `--offline`. We shouldn't need a network connection to validate an // already-correct lockfile with immutable metadata. - uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline").arg("--no-cache"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline").arg("--no-cache"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 3 packages in [TIME] - "###); + "); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -20834,7 +20834,7 @@ fn lock_dependency_metadata_git() -> Result<()> { Installed 2 packages in [TIME] + anyio==4.6.2 (from git+https://github.com/agronholm/anyio@c4844254e6db0cb804c240ba07405db73d810e0b) + iniconfig==2.0.0 - "###); + "); Ok(()) } @@ -20854,14 +20854,14 @@ fn lock_strip_fragment() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -20900,17 +20900,17 @@ fn lock_strip_fragment() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -20918,7 +20918,7 @@ fn lock_strip_fragment() -> Result<()> { ----- stderr ----- Installed 1 package in [TIME] + iniconfig==2.0.0 (from https://files.pythonhosted.org/packages/ef/a6/62565a6e1cf69e10f5727360368e451d4b7f58beeac6173dc9db836a5b46/iniconfig-2.0.0-py3-none-any.whl) - "###); + "); Ok(()) } @@ -20939,7 +20939,7 @@ fn lock_request_requires_python() -> Result<()> { )?; // Request a version that conflicts with `--requires-python`. - uv_snapshot!(context.filters(), context.lock().arg("--python").arg("3.12"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--python").arg("3.12"), @" success: false exit_code: 2 ----- stdout ----- @@ -20953,7 +20953,7 @@ fn lock_request_requires_python() -> Result<()> { let python_version = context.temp_dir.child(".python-version"); python_version.write_str("3.12")?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: false exit_code: 2 ----- stdout ----- @@ -21020,7 +21020,7 @@ fn lock_duplicate_sources() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: false exit_code: 2 ----- stdout ----- @@ -21032,8 +21032,7 @@ fn lock_duplicate_sources() -> Result<()> { 7 | [tool.uv.sources] | ^^^^^^^^^^^^^^^^^ duplicate sources for package `python-multipart` - - "###); + "); Ok(()) } @@ -21064,7 +21063,7 @@ fn lock_invalid_project_table() -> Result<()> { ", )?; - uv_snapshot!(context.filters(), context.lock().current_dir(context.temp_dir.join("a")), @r###" + uv_snapshot!(context.filters(), context.lock().current_dir(context.temp_dir.join("a")), @" success: false exit_code: 1 ----- stdout ----- @@ -21078,7 +21077,7 @@ fn lock_invalid_project_table() -> Result<()> { 2 | [project.urls] | ^^^^^^^ `pyproject.toml` is using the `[project]` table, but the required `project.name` field is not set - "###); + "); Ok(()) } @@ -21097,7 +21096,7 @@ fn lock_missing_name() -> Result<()> { "#, })?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: false exit_code: 2 ----- stdout ----- @@ -21109,7 +21108,7 @@ fn lock_missing_name() -> Result<()> { 1 | [project] | ^^^^^^^^^ `pyproject.toml` is using the `[project]` table, but the required `project.name` field is not set - "###); + "); Ok(()) } @@ -21128,7 +21127,7 @@ fn lock_missing_version() -> Result<()> { "#, })?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: false exit_code: 2 ----- stdout ----- @@ -21140,7 +21139,7 @@ fn lock_missing_version() -> Result<()> { 1 | [project] | ^^^^^^^^^ `pyproject.toml` is using the `[project]` table, but the required `project.version` field is neither set nor present in the `project.dynamic` list - "###); + "); Ok(()) } @@ -21191,14 +21190,14 @@ fn lock_unsupported_version() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--frozen"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: The lockfile at `uv.lock` uses an unsupported schema version (v2, but only v1 is supported). Downgrade to a compatible uv version, or remove the `uv.lock` prior to running `uv lock` or `uv sync`. - "###); + "); // Invalid schema (`iniconfig` is referenced, but missing), invalid version. context.temp_dir.child("uv.lock").write_str( @@ -21222,7 +21221,7 @@ fn lock_unsupported_version() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--frozen"), @" success: false exit_code: 2 ----- stdout ----- @@ -21230,7 +21229,7 @@ fn lock_unsupported_version() -> Result<()> { ----- stderr ----- error: Failed to parse `uv.lock`, which uses an unsupported schema version (v2, but only v1 is supported). Downgrade to a compatible uv version, or remove the `uv.lock` prior to running `uv lock` or `uv sync`. Caused by: Dependency `iniconfig` has missing `source` field but has more than one matching package - "###); + "); Ok(()) } @@ -21254,7 +21253,7 @@ fn lock_change_requires_python() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -21364,14 +21363,14 @@ fn lock_change_requires_python() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 5 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -21506,7 +21505,7 @@ fn lock_keyring_credentials() -> Result<()> { uv_snapshot!(context.filters(), context.lock() .env(EnvVars::index_username("PROXY"), "public") .env(EnvVars::KEYRING_TEST_CREDENTIALS, r#"{"pypi-proxy.fly.dev": {"public": "heron"}}"#) - .env(EnvVars::PATH, venv_bin_path(&keyring_context.venv)), @r" + .env(EnvVars::PATH, venv_bin_path(&keyring_context.venv)), @" success: true exit_code: 0 ----- stdout ----- @@ -21611,7 +21610,7 @@ fn lock_keyring_explicit_always() -> Result<()> { // First, try some invalid credentials — we should not fall back to the default index uv_snapshot!(context.filters(), context.lock() .env(EnvVars::KEYRING_TEST_CREDENTIALS, r#"{"pypi-proxy.fly.dev": {"public": "frog"}}"#) - .env(EnvVars::PATH, venv_bin_path(&keyring_context.venv)), @r" + .env(EnvVars::PATH, venv_bin_path(&keyring_context.venv)), @" success: false exit_code: 1 ----- stdout ----- @@ -21628,7 +21627,7 @@ fn lock_keyring_explicit_always() -> Result<()> { // With valid credentials, we should succeed uv_snapshot!(context.filters(), context.lock() .env(EnvVars::KEYRING_TEST_CREDENTIALS, r#"{"pypi-proxy.fly.dev": {"public": "heron"}}"#) - .env(EnvVars::PATH, venv_bin_path(&keyring_context.venv)), @r" + .env(EnvVars::PATH, venv_bin_path(&keyring_context.venv)), @" success: true exit_code: 0 ----- stdout ----- @@ -21694,7 +21693,7 @@ fn lock_keyring_credentials_always_authenticate_fetches_username() -> Result<()> uv_snapshot!(context.filters(), context.lock() .env(EnvVars::KEYRING_TEST_CREDENTIALS, r#"{"pypi-proxy.fly.dev": {"public": "heron"}}"#) - .env(EnvVars::PATH, venv_bin_path(&keyring_context.venv)), @r" + .env(EnvVars::PATH, venv_bin_path(&keyring_context.venv)), @" success: true exit_code: 0 ----- stdout ----- @@ -21789,7 +21788,7 @@ fn lock_keyring_credentials_always_authenticate_unsupported_mode() -> Result<()> uv_snapshot!(context.filters(), context.lock() .env(EnvVars::KEYRING_TEST_CREDENTIALS, r#"{"pypi-proxy.fly.dev": {"public": "heron"}}"#) - .env(EnvVars::PATH, venv_bin_path(&keyring_context.venv)), @r" + .env(EnvVars::PATH, venv_bin_path(&keyring_context.venv)), @" success: false exit_code: 2 ----- stdout ----- @@ -21824,14 +21823,14 @@ fn lock_multiple_sources() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 3 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -21890,14 +21889,14 @@ fn lock_multiple_sources() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 3 packages in [TIME] - "###); + "); Ok(()) } @@ -21923,7 +21922,7 @@ fn lock_multiple_sources_conflict() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: false exit_code: 2 ----- stdout ----- @@ -21937,7 +21936,7 @@ fn lock_multiple_sources_conflict() -> Result<()> { Source markers must be disjoint, but the following markers overlap: `python_full_version == '3.12.*' and sys_platform == 'win32'` and `sys_platform == 'win32'`. hint: replace `sys_platform == 'win32'` with `python_full_version != '3.12.*' and sys_platform == 'win32'`. - "###); + "); Ok(()) } @@ -21963,7 +21962,7 @@ fn lock_multiple_sources_no_marker() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @r#" success: false exit_code: 2 ----- stdout ----- @@ -21975,7 +21974,7 @@ fn lock_multiple_sources_no_marker() -> Result<()> { 9 | iniconfig = [ | ^ When multiple sources are provided, each source must include a platform marker (e.g., `marker = "sys_platform == 'linux'"`) - "###); + "#); Ok(()) } @@ -22012,14 +22011,14 @@ fn lock_multiple_sources_index_disjoint_markers() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap(); @@ -22103,14 +22102,14 @@ fn lock_multiple_sources_index_disjoint_markers() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); Ok(()) } @@ -22143,14 +22142,14 @@ fn lock_multiple_sources_index_mixed() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap(); @@ -22241,14 +22240,14 @@ fn lock_multiple_sources_index_mixed() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); Ok(()) } @@ -22277,14 +22276,14 @@ fn lock_multiple_sources_index_non_total() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 3 packages in [TIME] - "###); + "); let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap(); @@ -22341,14 +22340,14 @@ fn lock_multiple_sources_index_non_total() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 3 packages in [TIME] - "###); + "); Ok(()) } @@ -22378,14 +22377,14 @@ fn lock_multiple_sources_index_explicit() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap(); @@ -22492,14 +22491,14 @@ fn lock_multiple_sources_index_explicit() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); Ok(()) } @@ -22524,14 +22523,14 @@ fn lock_multiple_sources_non_total() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 3 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -22593,14 +22592,14 @@ fn lock_multiple_sources_non_total() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 3 packages in [TIME] - "###); + "); Ok(()) } @@ -22625,14 +22624,14 @@ fn lock_multiple_sources_respect_marker() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -22672,14 +22671,14 @@ fn lock_multiple_sources_respect_marker() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); Ok(()) } @@ -22707,14 +22706,14 @@ fn lock_multiple_sources_extra() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -22759,14 +22758,14 @@ fn lock_multiple_sources_extra() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); Ok(()) } @@ -22809,7 +22808,7 @@ fn lock_multiple_sources_index_overlapping_extras() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: false exit_code: 1 ----- stdout ----- @@ -22850,7 +22849,7 @@ fn lock_multiple_index_with_missing_extra() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @r#" success: false exit_code: 1 ----- stdout ----- @@ -22858,7 +22857,7 @@ fn lock_multiple_index_with_missing_extra() -> Result<()> { ----- stderr ----- × Failed to build `project @ file://[TEMP_DIR]/` ╰─▶ Source entry for `jinja2` only applies to extra `cu118`, but the `cu118` extra does not exist. When an extra is present on a source (e.g., `extra = "cu118"`), the relevant package must be included in the `project.optional-dependencies` section for that extra (e.g., `project.optional-dependencies = { "cu118" = ["jinja2"] }`). - "###); + "#); Ok(()) } @@ -22893,7 +22892,7 @@ fn lock_multiple_index_with_absent_extra() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @r#" success: false exit_code: 1 ----- stdout ----- @@ -22901,7 +22900,7 @@ fn lock_multiple_index_with_absent_extra() -> Result<()> { ----- stderr ----- × Failed to build `project @ file://[TEMP_DIR]/` ╰─▶ Source entry for `jinja2` only applies to extra `cu118`, but `jinja2` was not found under the `project.optional-dependencies` section for that extra. When an extra is present on a source (e.g., `extra = "cu118"`), the relevant package must be included in the `project.optional-dependencies` section for that extra (e.g., `project.optional-dependencies = { "cu118" = ["jinja2"] }`). - "###); + "#); Ok(()) } @@ -22932,7 +22931,7 @@ fn lock_multiple_index_with_missing_group() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @r#" success: false exit_code: 1 ----- stdout ----- @@ -22940,7 +22939,7 @@ fn lock_multiple_index_with_missing_group() -> Result<()> { ----- stderr ----- × Failed to build `project @ file://[TEMP_DIR]/` ╰─▶ Source entry for `jinja2` only applies to dependency group `cu118`, but the `cu118` group does not exist. When a group is present on a source (e.g., `group = "cu118"`), the relevant package must be included in the `dependency-groups` section for that extra (e.g., `dependency-groups = { "cu118" = ["jinja2"] }`). - "###); + "#); Ok(()) } @@ -22975,7 +22974,7 @@ fn lock_multiple_index_with_absent_group() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @r#" success: false exit_code: 1 ----- stdout ----- @@ -22983,7 +22982,7 @@ fn lock_multiple_index_with_absent_group() -> Result<()> { ----- stderr ----- × Failed to build `project @ file://[TEMP_DIR]/` ╰─▶ Source entry for `jinja2` only applies to dependency group `cu118`, but `jinja2` was not found under the `dependency-groups` section for that group. When a group is present on a source (e.g., `group = "cu118"`), the relevant package must be included in the `dependency-groups` section for that extra (e.g., `dependency-groups = { "cu118" = ["jinja2"] }`). - "###); + "#); Ok(()) } @@ -23007,7 +23006,7 @@ fn lock_dry_run() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -23029,7 +23028,7 @@ fn lock_dry_run() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock().arg("--dry-run"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--dry-run"), @" success: true exit_code: 0 ----- stdout ----- @@ -23073,7 +23072,7 @@ fn lock_dry_run_noop() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock().arg("--dry-run"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--dry-run"), @" success: true exit_code: 0 ----- stdout ----- @@ -23086,7 +23085,7 @@ fn lock_dry_run_noop() -> Result<()> { Add sniffio v1.3.1 "); - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -23095,7 +23094,7 @@ fn lock_dry_run_noop() -> Result<()> { Resolved 5 packages in [TIME] "); - uv_snapshot!(context.filters(), context.lock().arg("--dry-run"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--dry-run"), @" success: true exit_code: 0 ----- stdout ----- @@ -23105,7 +23104,7 @@ fn lock_dry_run_noop() -> Result<()> { No lockfile changes detected "); - uv_snapshot!(context.filters(), context.lock().arg("--dry-run").arg("-U"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--dry-run").arg("-U"), @" success: true exit_code: 0 ----- stdout ----- @@ -23137,7 +23136,7 @@ fn lock_group_include() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -23324,7 +23323,7 @@ fn lock_group_requires_python() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -23446,7 +23445,7 @@ fn lock_group_includes_requires_python() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -23592,7 +23591,7 @@ fn lock_group_requires_undefined_group() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: false exit_code: 2 ----- stdout ----- @@ -23626,7 +23625,7 @@ fn lock_group_requires_dev_dep() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: false exit_code: 2 ----- stdout ----- @@ -23662,7 +23661,7 @@ fn lock_group_includes_requires_python_contradiction() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -23782,7 +23781,7 @@ fn lock_group_include_cycle() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: false exit_code: 2 ----- stdout ----- @@ -23848,7 +23847,7 @@ fn lock_group_include_missing() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: false exit_code: 2 ----- stdout ----- @@ -23926,7 +23925,7 @@ fn lock_group_invalid_entry_group_name() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @r#" success: false exit_code: 2 ----- stdout ----- @@ -23938,8 +23937,7 @@ fn lock_group_invalid_entry_group_name() -> Result<()> { 9 | foo = [{include-group = "invalid!"}] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Not a valid package or extra name: "invalid!". Names must start and end with a letter or digit and may only contain -, _, ., and alphanumeric characters. - - "###); + "#); Ok(()) } @@ -23963,7 +23961,7 @@ fn lock_group_invalid_duplicate_group_name() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: false exit_code: 2 ----- stdout ----- @@ -23975,7 +23973,7 @@ fn lock_group_invalid_duplicate_group_name() -> Result<()> { 8 | [dependency-groups] | ^^^^^^^^^^^^^^^^^^^ duplicate dependency group: `foo-bar` - "###); + "); Ok(()) } @@ -24029,7 +24027,7 @@ fn lock_group_invalid_entry_type() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: false exit_code: 2 ----- stdout ----- @@ -24041,8 +24039,7 @@ fn lock_group_invalid_entry_type() -> Result<()> { 9 | foo = [{include-group = true}] | ^^^^ invalid type: boolean `true`, expected a string - - "###); + "); Ok(()) } @@ -24065,7 +24062,7 @@ fn lock_group_empty_entry_table() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: false exit_code: 2 ----- stdout ----- @@ -24077,8 +24074,7 @@ fn lock_group_empty_entry_table() -> Result<()> { 9 | foo = [{}] | ^^ missing field `include-group` - - "###); + "); Ok(()) } @@ -24128,7 +24124,7 @@ fn lock_group_workspace() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -24319,14 +24315,14 @@ fn lock_transitive_git() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 6 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -24404,28 +24400,28 @@ fn lock_transitive_git() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 6 packages in [TIME] - "###); + "); // Re-run with `--offline`. We shouldn't need a network connection to validate an // already-correct lockfile with immutable metadata. - uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline").arg("--no-cache"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline").arg("--no-cache"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 6 packages in [TIME] - "###); + "); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -24438,7 +24434,7 @@ fn lock_transitive_git() -> Result<()> { + d==1.0.0 (from git+https://github.com/astral-sh/workspace-virtual-root-test@fac39c8d4c5d0ef32744e2bb309bbe34a759fd46#subdirectory=packages/d) + idna==3.6 + sniffio==1.3.1 - "###); + "); Ok(()) } @@ -24482,7 +24478,7 @@ fn lock_dynamic_version() -> Result<()> { .child("__init__.py") .write_str("__version__ = '0.1.0'")?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -24521,14 +24517,14 @@ fn lock_dynamic_version() -> Result<()> { .write_str("__version__ = '0.1.1'")?; // Re-run with `--locked`. We should accept the lockfile, since dynamic versions are omitted. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 1 package in [TIME] - "###); + "); let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap(); @@ -24592,7 +24588,7 @@ fn lock_dynamic_version_dependencies() -> Result<()> { .child("__init__.py") .write_str("__version__ = '0.1.0'")?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -24631,14 +24627,14 @@ fn lock_dynamic_version_dependencies() -> Result<()> { .write_str("__version__ = '0.1.1'")?; // Re-run with `--locked`. We should accept the lockfile, since dynamic versions are omitted. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 1 package in [TIME] - "###); + "); let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap(); @@ -24719,14 +24715,14 @@ fn lock_dynamic_version_no_build() -> Result<()> { "#})?; // Validate the lockfile with `--offline` to ensure that the package itself isn't built. - uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 1 package in [TIME] - "###); + "); Ok(()) } @@ -24788,7 +24784,7 @@ fn lock_dynamic_version_workspace_member() -> Result<()> { .child("__init__.py") .write_str("__version__ = '0.1.0'")?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -24858,14 +24854,14 @@ fn lock_dynamic_version_workspace_member() -> Result<()> { .write_str("__version__ = '0.1.1'")?; // Re-run with `--locked`. We should accept the lockfile, since dynamic versions are omitted. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 3 packages in [TIME] - "###); + "); let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap(); @@ -24976,7 +24972,7 @@ fn lock_dynamic_version_path_dependency() -> Result<()> { .child("__init__.py") .write_str("__version__ = '0.1.0'")?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -25040,14 +25036,14 @@ fn lock_dynamic_version_path_dependency() -> Result<()> { .write_str("__version__ = '0.1.1'")?; // Re-run with `--locked`. We should accept the lockfile, since dynamic versions are omitted. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 3 packages in [TIME] - "###); + "); let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap(); @@ -25140,7 +25136,7 @@ fn lock_dynamic_version_self_extra_hatchling() -> Result<()> { .child("__about__.py") .write_str("__version__ = '0.1.0'")?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -25227,26 +25223,26 @@ fn lock_dynamic_version_self_extra_hatchling() -> Result<()> { }); // Re-run with `--locked`. We should accept the lockfile, since the metadata is unchanged. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 5 packages in [TIME] - "###); + "); fs_err::remove_dir_all(&context.cache_dir)?; // Running with `--offline` should also succeed. - uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 5 packages in [TIME] - "###); + "); Ok(()) } @@ -25300,7 +25296,7 @@ fn lock_dynamic_version_self_extra_setuptools() -> Result<()> { .child("__init__.py") .write_str("__version__ = '0.1.0'")?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -25387,26 +25383,26 @@ fn lock_dynamic_version_self_extra_setuptools() -> Result<()> { }); // Re-run with `--locked`. We should accept the lockfile, since the metadata is unchanged. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 5 packages in [TIME] - "###); + "); fs_err::remove_dir_all(&context.cache_dir)?; // Running with `--offline` should also succeed. - uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 5 packages in [TIME] - "###); + "); Ok(()) } @@ -25452,7 +25448,7 @@ fn lock_dynamic_built_cache() -> Result<()> { .touch()?; // Lock the project, which should omit the dynamic version. - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -25483,7 +25479,7 @@ fn lock_dynamic_built_cache() -> Result<()> { }); // Install the project, to force a build. - uv_snapshot!(context.filters(), context.sync(), @r###" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -25493,20 +25489,20 @@ fn lock_dynamic_built_cache() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + project==0.1.0 (from file://[TEMP_DIR]/) - "###); + "); // Remove the lockfile. fs_err::remove_file(context.temp_dir.join("uv.lock"))?; // Lock the project, which should omit the dynamic version. - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 1 package in [TIME] - "###); + "); let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap(); @@ -25574,14 +25570,14 @@ fn lock_shared_build_dependency() -> Result<()> { uv_snapshot!(context.filters(), context.lock() .arg("--no-build-package") - .arg("libcst"), @r###" + .arg("libcst"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 7 packages in [TIME] - "###); + "); let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap(); @@ -25802,14 +25798,14 @@ fn lock_shared_build_dependency() -> Result<()> { }); uv_snapshot!(context.filters(), context.lock() - .arg("--locked"), @r###" + .arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 7 packages in [TIME] - "###); + "); Ok(()) } @@ -25853,7 +25849,7 @@ fn lock_dynamic_to_static() -> Result<()> { .child("__init__.py") .write_str("__version__ = '0.1.0'")?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -25899,7 +25895,7 @@ fn lock_dynamic_to_static() -> Result<()> { )?; // Rerunning with `--locked` should fail, since the project is no longer dynamic. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: false exit_code: 1 ----- stdout ----- @@ -25909,7 +25905,7 @@ fn lock_dynamic_to_static() -> Result<()> { The lockfile at `uv.lock` needs to be updated, but `--locked` was provided. To update the lockfile, run `uv lock`. "); - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -25917,7 +25913,7 @@ fn lock_dynamic_to_static() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] Updated project (dynamic) -> v0.1.0 - "###); + "); let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap(); @@ -25964,14 +25960,14 @@ fn lock_static_to_dynamic() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 1 package in [TIME] - "###); + "); let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap(); @@ -26030,7 +26026,7 @@ fn lock_static_to_dynamic() -> Result<()> { .write_str("__version__ = '0.1.0'")?; // Rerunning with `--locked` should fail, since the project is no longer static. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: false exit_code: 1 ----- stdout ----- @@ -26040,7 +26036,7 @@ fn lock_static_to_dynamic() -> Result<()> { The lockfile at `uv.lock` needs to be updated, but `--locked` was provided. To update the lockfile, run `uv lock`. "); - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -26048,7 +26044,7 @@ fn lock_static_to_dynamic() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] Updated project v0.1.0 -> (dynamic) - "###); + "); let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap(); @@ -26089,14 +26085,14 @@ fn lock_bump_static_version() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 1 package in [TIME] - "###); + "); let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap(); @@ -26132,7 +26128,7 @@ fn lock_bump_static_version() -> Result<()> { )?; // Rerunning with `--locked` should fail. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: false exit_code: 1 ----- stdout ----- @@ -26142,7 +26138,7 @@ fn lock_bump_static_version() -> Result<()> { The lockfile at `uv.lock` needs to be updated, but `--locked` was provided. To update the lockfile, run `uv lock`. "); - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -26150,7 +26146,7 @@ fn lock_bump_static_version() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] Updated project v0.1.0 -> v0.2.0 - "###); + "); let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap(); @@ -26440,7 +26436,7 @@ fn mismatched_name_self_editable() -> Result<()> { )?; // Running `uv sync` should generate a lockfile. - uv_snapshot!(context.filters(), context.sync(), @r###" + uv_snapshot!(context.filters(), context.sync(), @" success: false exit_code: 1 ----- stdout ----- @@ -26450,7 +26446,7 @@ fn mismatched_name_self_editable() -> Result<()> { × Failed to build `foo @ file://[TEMP_DIR]/` ╰─▶ Package metadata name `project` does not match given name `foo` help: `foo` was included because `project` (v0.1.0) depends on `foo` - "###); + "); Ok(()) } @@ -26476,7 +26472,7 @@ fn lock_relative_project() -> Result<()> { let peer = context.temp_dir.child("peer"); fs_err::create_dir_all(&peer)?; - uv_snapshot!(context.filters(), context.lock().arg("--project").arg("../project").current_dir(&peer), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--project").arg("../project").current_dir(&peer), @" success: true exit_code: 0 ----- stdout ----- @@ -26484,7 +26480,7 @@ fn lock_relative_project() -> Result<()> { ----- stderr ----- Using CPython 3.12.[X] interpreter at: [PYTHON-3.12] Resolved 2 packages in [TIME] - "###); + "); let lock = context.read(context.temp_dir.child("project").child("uv.lock")); @@ -26524,7 +26520,7 @@ fn lock_relative_project() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--project").arg("../project").current_dir(&peer), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--project").arg("../project").current_dir(&peer), @" success: true exit_code: 0 ----- stdout ----- @@ -26532,7 +26528,7 @@ fn lock_relative_project() -> Result<()> { ----- stderr ----- Using CPython 3.12.[X] interpreter at: [PYTHON-3.12] Resolved 2 packages in [TIME] - "###); + "); // Create a virtual environment in the project directory. context @@ -26543,7 +26539,7 @@ fn lock_relative_project() -> Result<()> { .success(); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--project").arg("../project").current_dir(&peer), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--project").arg("../project").current_dir(&peer), @" success: true exit_code: 0 ----- stdout ----- @@ -26552,7 +26548,7 @@ fn lock_relative_project() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + typing-extensions==4.10.0 - "###); + "); Ok(()) } @@ -26579,14 +26575,14 @@ fn lock_recursive_extra() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -26647,14 +26643,14 @@ fn lock_recursive_extra() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); Ok(()) } @@ -26691,14 +26687,14 @@ fn no_lowest_warning_with_name_and_url() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 10 packages in [TIME] - "###); + "); Ok(()) } @@ -26718,14 +26714,14 @@ fn lock_no_build_static_metadata() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock().arg("--no-build"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--no-build"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -26765,28 +26761,28 @@ fn lock_no_build_static_metadata() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--no-build").arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--no-build").arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); // Re-run with `--offline`. We shouldn't need a network connection to validate an // already-correct lockfile with immutable metadata. - uv_snapshot!(context.filters(), context.lock().arg("--no-build").arg("--locked").arg("--offline").arg("--no-cache"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--no-build").arg("--locked").arg("--offline").arg("--no-cache"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--no-build").arg("--frozen"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--no-build").arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -26815,7 +26811,7 @@ fn lock_no_build_dynamic_metadata() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock().arg("--no-build"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--no-build"), @" success: false exit_code: 1 ----- stdout ----- @@ -26823,7 +26819,7 @@ fn lock_no_build_dynamic_metadata() -> Result<()> { ----- stderr ----- × Failed to build `dummy @ file://[TEMP_DIR]/` ╰─▶ Building source distributions for `dummy` is disabled - "###); + "); Ok(()) } @@ -26843,14 +26839,14 @@ fn lock_self_compatible() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -26893,28 +26889,28 @@ fn lock_self_compatible() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); // Re-run with `--offline`. We shouldn't need a network connection to validate an // already-correct lockfile with immutable metadata. - uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline").arg("--no-cache"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline").arg("--no-cache"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -26923,7 +26919,7 @@ fn lock_self_compatible() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + typing-extensions==4.10.0 - "###); + "); Ok(()) } @@ -26943,14 +26939,14 @@ fn lock_self_exact() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -26993,28 +26989,28 @@ fn lock_self_exact() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); // Re-run with `--offline`. We shouldn't need a network connection to validate an // already-correct lockfile with immutable metadata. - uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline").arg("--no-cache"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline").arg("--no-cache"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -27023,7 +27019,7 @@ fn lock_self_exact() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + typing-extensions==4.10.0 - "###); + "); Ok(()) } @@ -27043,7 +27039,7 @@ fn lock_self_incompatible() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: false exit_code: 1 ----- stdout ----- @@ -27076,14 +27072,14 @@ fn lock_self_extra_to_extra_compatible() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -27127,28 +27123,28 @@ fn lock_self_extra_to_extra_compatible() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); // Re-run with `--offline`. We shouldn't need a network connection to validate an // already-correct lockfile with immutable metadata. - uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline").arg("--no-cache"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline").arg("--no-cache"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -27157,7 +27153,7 @@ fn lock_self_extra_to_extra_compatible() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + typing-extensions==4.10.0 - "###); + "); Ok(()) } @@ -27180,7 +27176,7 @@ fn lock_self_extra_to_same_extra_incompatible() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: false exit_code: 1 ----- stdout ----- @@ -27214,7 +27210,7 @@ fn lock_self_extra_to_other_extra_incompatible() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: false exit_code: 1 ----- stdout ----- @@ -27247,14 +27243,14 @@ fn lock_self_extra_compatible() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -27298,28 +27294,28 @@ fn lock_self_extra_compatible() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); // Re-run with `--offline`. We shouldn't need a network connection to validate an // already-correct lockfile with immutable metadata. - uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline").arg("--no-cache"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline").arg("--no-cache"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -27328,7 +27324,7 @@ fn lock_self_extra_compatible() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + typing-extensions==4.10.0 - "###); + "); Ok(()) } @@ -27351,7 +27347,7 @@ fn lock_self_extra_incompatible() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: false exit_code: 1 ----- stdout ----- @@ -27381,14 +27377,14 @@ fn lock_self_marker_compatible() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -27431,28 +27427,28 @@ fn lock_self_marker_compatible() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); // Re-run with `--offline`. We shouldn't need a network connection to validate an // already-correct lockfile with immutable metadata. - uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline").arg("--no-cache"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline").arg("--no-cache"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -27461,7 +27457,7 @@ fn lock_self_marker_compatible() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + typing-extensions==4.10.0 - "###); + "); Ok(()) } @@ -27481,7 +27477,7 @@ fn lock_self_marker_incompatible() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: false exit_code: 1 ----- stdout ----- @@ -27516,14 +27512,14 @@ fn lock_split_on_windows() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 3 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -27608,7 +27604,7 @@ fn lock_missing_git_prefix() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @r#" success: false exit_code: 1 ----- stdout ----- @@ -27617,7 +27613,7 @@ fn lock_missing_git_prefix() -> Result<()> { × Failed to build `project @ file://[TEMP_DIR]/` ├─▶ Failed to parse entry: `workspace-in-root-test` ╰─▶ `workspace-in-root-test` is associated with a URL source, but references a Git repository. Consider using a Git source instead (e.g., `workspace-in-root-test = { git = "https://github.com/astral-sh/workspace-in-root-test" }`) - "###); + "#); Ok(()) } @@ -27640,7 +27636,7 @@ fn lock_arm() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -27715,14 +27711,14 @@ fn lock_x86_64() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -27791,14 +27787,14 @@ fn lock_x86() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -27863,14 +27859,14 @@ fn lock_script() -> Result<()> { "# })?; - uv_snapshot!(context.filters(), context.lock().arg("--script").arg("script.py"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--script").arg("script.py"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 3 packages in [TIME] - "###); + "); let lock = context.read("script.py.lock"); @@ -27924,14 +27920,14 @@ fn lock_script() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--script").arg("script.py").arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--script").arg("script.py").arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 3 packages in [TIME] - "###); + "); // Modify the script metadata. script.write_str(indoc! { r#" @@ -27948,7 +27944,7 @@ fn lock_script() -> Result<()> { })?; // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--script").arg("script.py").arg("--locked"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--script").arg("script.py").arg("--locked"), @" success: false exit_code: 1 ----- stdout ----- @@ -28000,14 +27996,14 @@ fn lock_script_path() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock().arg("--script").arg("script.py"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--script").arg("script.py"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 5 packages in [TIME] - "###); + "); let lock = context.read("script.py.lock"); @@ -28084,14 +28080,14 @@ fn lock_script_path() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--script").arg("script.py").arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--script").arg("script.py").arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 5 packages in [TIME] - "###); + "); Ok(()) } @@ -28101,7 +28097,7 @@ fn lock_script_path() -> Result<()> { fn lock_script_initialize() -> Result<()> { let context = TestContext::new("3.12").with_filtered_missing_file_error(); - uv_snapshot!(context.filters(), context.lock().arg("--script").arg("script.py"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--script").arg("script.py"), @" success: false exit_code: 2 ----- stdout ----- @@ -28116,14 +28112,14 @@ fn lock_script_initialize() -> Result<()> { " })?; - uv_snapshot!(context.filters(), context.lock().arg("--script").arg("script.py"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--script").arg("script.py"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved in [TIME] - "###); + "); let lock = context.read("script.py.lock"); @@ -28224,14 +28220,14 @@ fn lock_pytorch_cpu() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 33 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -28877,14 +28873,14 @@ fn lock_pytorch_index_preferences() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 25 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -29344,7 +29340,7 @@ fn lock_intel_mac() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -29735,14 +29731,14 @@ fn lock_pytorch_local_preference() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 15 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -30070,14 +30066,14 @@ fn windows_arm() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -30147,14 +30143,14 @@ fn windows_amd64_required() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -30221,14 +30217,14 @@ fn windows_arm64_required() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -30289,7 +30285,7 @@ fn lock_empty_extra() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -30350,7 +30346,7 @@ fn lock_empty_extra() -> Result<()> { )?; // Re-run with `--locked`. We expect this to fail, since we've added an extra. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: false exit_code: 1 ----- stdout ----- @@ -30360,7 +30356,7 @@ fn lock_empty_extra() -> Result<()> { The lockfile at `uv.lock` needs to be updated, but `--locked` was provided. To update the lockfile, run `uv lock`. "); - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -30368,7 +30364,7 @@ fn lock_empty_extra() -> Result<()> { ----- stderr ----- Resolved 3 packages in [TIME] Added typing-extensions v4.10.0 - "###); + "); // Add an empty extra. pyproject_toml.write_str( @@ -30386,7 +30382,7 @@ fn lock_empty_extra() -> Result<()> { )?; // Re-run with `--locked`. We expect this to fail, since we've added an extra. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: false exit_code: 1 ----- stdout ----- @@ -30396,14 +30392,14 @@ fn lock_empty_extra() -> Result<()> { The lockfile at `uv.lock` needs to be updated, but `--locked` was provided. To update the lockfile, run `uv lock`. "); - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 3 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -30520,7 +30516,7 @@ fn lock_invalid_fork_markers() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -30532,14 +30528,14 @@ fn lock_invalid_fork_markers() -> Result<()> { "); // Check that the lockfile got updated and we don't show the warning anymore. - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); Ok(()) } @@ -30559,7 +30555,7 @@ fn lock_omit_wheels_exclude_newer() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -30611,7 +30607,7 @@ fn lock_omit_wheels_exclude_newer() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- @@ -30622,7 +30618,7 @@ fn lock_omit_wheels_exclude_newer() -> Result<()> { // Re-run with `--offline`. We shouldn't need a network connection to validate an // already-correct lockfile with immutable metadata. - uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline").arg("--no-cache"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline").arg("--no-cache"), @" success: true exit_code: 0 ----- stdout ----- @@ -30653,7 +30649,7 @@ fn lock_conflict_for_disjoint_python_version() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: false exit_code: 1 ----- stdout ----- @@ -30680,7 +30676,7 @@ fn lock_conflict_for_disjoint_python_version() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -30875,7 +30871,7 @@ fn lock_conflict_for_disjoint_platform() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: false exit_code: 1 ----- stdout ----- @@ -30906,7 +30902,7 @@ fn lock_conflict_for_disjoint_platform() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -30939,7 +30935,7 @@ fn lock_trailing_slash_index_url_in_pyproject_not_index_argument() -> Result<()> let no_trailing_slash_url = "https://pypi-proxy.fly.dev/simple"; - uv_snapshot!(context.filters(), context.add().arg("anyio").arg("--index").arg(no_trailing_slash_url), @r" + uv_snapshot!(context.filters(), context.add().arg("anyio").arg("--index").arg(no_trailing_slash_url), @" success: true exit_code: 0 ----- stdout ----- @@ -31035,7 +31031,7 @@ fn lock_trailing_slash_index_url_in_pyproject_not_index_argument() -> Result<()> }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- @@ -31125,7 +31121,7 @@ fn lock_trailing_slash_index_url_in_lockfile_not_pyproject() -> Result<()> { )?; // Run `uv lock --locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: false exit_code: 1 ----- stdout ----- @@ -31216,7 +31212,7 @@ fn lock_trailing_slash_index_url_in_pyproject_and_not_lockfile() -> Result<()> { )?; // Run `uv lock --locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: false exit_code: 1 ----- stdout ----- @@ -31307,7 +31303,7 @@ fn lock_trailing_slash_index_url_in_lockfile_and_pyproject_toml() -> Result<()> )?; // Run `uv lock --locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- @@ -31336,7 +31332,7 @@ fn lock_trailing_slash_find_links() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -31382,7 +31378,7 @@ fn lock_trailing_slash_find_links() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- @@ -31407,7 +31403,7 @@ fn lock_trailing_slash_find_links() -> Result<()> { )?; // Re-run with `--locked` - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: false exit_code: 1 ----- stdout ----- @@ -31417,7 +31413,7 @@ fn lock_trailing_slash_find_links() -> Result<()> { The lockfile at `uv.lock` needs to be updated, but `--locked` was provided. To update the lockfile, run `uv lock`. "); - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -31480,7 +31476,7 @@ fn lock_prefix_match() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: false exit_code: 1 ----- stdout ----- @@ -31512,7 +31508,7 @@ fn test_tilde_equals_python_version() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -31547,14 +31543,14 @@ fn lock_exclude_newer_package_disable() -> Result<()> { .arg("--exclude-newer") .arg("2022-04-04T12:00:00Z") .arg("--exclude-newer-package") - .arg("idna=false"), @r###" + .arg("idna=false"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 3 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -31635,14 +31631,14 @@ fn lock_exclude_newer_package() -> Result<()> { .arg("--exclude-newer") .arg("2022-04-04T12:00:00Z") .arg("--exclude-newer-package") - .arg("tqdm=2022-09-04T00:00:00Z"), @r###" + .arg("tqdm=2022-09-04T00:00:00Z"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 8 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -31807,7 +31803,7 @@ fn lock_path_dependency_explicit_index() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock().current_dir(&pkg_b), @r" + uv_snapshot!(context.filters(), context.lock().current_dir(&pkg_b), @" success: true exit_code: 0 ----- stdout ----- @@ -31817,7 +31813,7 @@ fn lock_path_dependency_explicit_index() -> Result<()> { Resolved 3 packages in [TIME] "); - uv_snapshot!(context.filters(), context.lock().arg("--check").current_dir(&pkg_b), @r" + uv_snapshot!(context.filters(), context.lock().arg("--check").current_dir(&pkg_b), @" success: true exit_code: 0 ----- stdout ----- @@ -31907,7 +31903,7 @@ fn lock_path_dependency_explicit_index_workspace_member() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -31916,7 +31912,7 @@ fn lock_path_dependency_explicit_index_workspace_member() -> Result<()> { Resolved 4 packages in [TIME] "); - uv_snapshot!(context.filters(), context.lock().arg("--check"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--check"), @" success: true exit_code: 0 ----- stdout ----- @@ -31986,7 +31982,7 @@ fn lock_path_dependency_mixed_indexes() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock().current_dir(&pkg_b), @r" + uv_snapshot!(context.filters(), context.lock().current_dir(&pkg_b), @" success: true exit_code: 0 ----- stdout ----- @@ -31996,7 +31992,7 @@ fn lock_path_dependency_mixed_indexes() -> Result<()> { Resolved 6 packages in [TIME] "); - uv_snapshot!(context.filters(), context.lock().arg("--check").current_dir(&pkg_b), @r" + uv_snapshot!(context.filters(), context.lock().arg("--check").current_dir(&pkg_b), @" success: true exit_code: 0 ----- stdout ----- @@ -32047,7 +32043,7 @@ fn lock_path_dependency_no_index() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock().current_dir(&pkg_b), @r" + uv_snapshot!(context.filters(), context.lock().current_dir(&pkg_b), @" success: true exit_code: 0 ----- stdout ----- @@ -32057,7 +32053,7 @@ fn lock_path_dependency_no_index() -> Result<()> { Resolved 7 packages in [TIME] "); - uv_snapshot!(context.filters(), context.lock().arg("--check").current_dir(&pkg_b), @r" + uv_snapshot!(context.filters(), context.lock().arg("--check").current_dir(&pkg_b), @" success: true exit_code: 0 ----- stdout ----- @@ -32140,7 +32136,7 @@ fn lock_nested_path_dependency_explicit_index() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock().current_dir(&pkg_c), @r" + uv_snapshot!(context.filters(), context.lock().current_dir(&pkg_c), @" success: true exit_code: 0 ----- stdout ----- @@ -32150,7 +32146,7 @@ fn lock_nested_path_dependency_explicit_index() -> Result<()> { Resolved 4 packages in [TIME] "); - uv_snapshot!(context.filters(), context.lock().arg("--check").current_dir(&pkg_c), @r" + uv_snapshot!(context.filters(), context.lock().arg("--check").current_dir(&pkg_c), @" success: true exit_code: 0 ----- stdout ----- @@ -32218,7 +32214,7 @@ fn lock_circular_path_dependency_explicit_index() -> Result<()> { )?; // This should not hang or crash due to the circular dependency. - uv_snapshot!(context.filters(), context.lock().current_dir(&pkg_a), @r" + uv_snapshot!(context.filters(), context.lock().current_dir(&pkg_a), @" success: true exit_code: 0 ----- stdout ----- @@ -32228,7 +32224,7 @@ fn lock_circular_path_dependency_explicit_index() -> Result<()> { Resolved 8 packages in [TIME] "); - uv_snapshot!(context.filters(), context.lock().arg("--check").current_dir(&pkg_a), @r" + uv_snapshot!(context.filters(), context.lock().arg("--check").current_dir(&pkg_a), @" success: true exit_code: 0 ----- stdout ----- @@ -32261,7 +32257,7 @@ fn lock_android() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -32315,7 +32311,7 @@ fn lock_android() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- @@ -32326,14 +32322,14 @@ fn lock_android() -> Result<()> { // Re-run with `--offline`. We shouldn't need a network connection to validate an // already-correct lockfile with immutable metadata. - uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline").arg("--no-cache"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline").arg("--no-cache"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); Ok(()) } @@ -32361,7 +32357,7 @@ fn lock_required_intersection() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -32418,7 +32414,7 @@ fn lock_required_intersection() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- @@ -32429,14 +32425,14 @@ fn lock_required_intersection() -> Result<()> { // Re-run with `--offline`. We shouldn't need a network connection to validate an // already-correct lockfile with immutable metadata. - uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline").arg("--no-cache"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline").arg("--no-cache"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); Ok(()) } @@ -32456,14 +32452,14 @@ fn lock_refresh() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); // Write a `uv.lock` that accidentally omits the `anyio` wheel, and uses an outdated revision. context.temp_dir.child("uv.lock").write_str( @@ -32517,14 +32513,14 @@ fn lock_refresh() -> Result<()> { )?; // Run `uv lock`. - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -32534,6 +32530,7 @@ fn lock_refresh() -> Result<()> { }, { assert_snapshot!( lock, @r#" + version = 1 revision = 2 requires-python = ">=3.12" @@ -32584,7 +32581,7 @@ fn lock_refresh() -> Result<()> { }); // Re-run with `--refresh`. - uv_snapshot!(context.filters(), context.lock().arg("--refresh"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--refresh"), @" success: true exit_code: 0 ----- stdout ----- @@ -32654,7 +32651,7 @@ fn lock_refresh() -> Result<()> { }); // Re-run with `--refresh --locked`. - uv_snapshot!(context.filters(), context.lock().arg("--refresh").arg("--locked"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--refresh").arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- @@ -32686,7 +32683,7 @@ fn collapsed_error_with_marker_packages() -> Result<()> { .child("pyproject.toml") .write_str(pyproject_toml)?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: false exit_code: 1 ----- stdout ----- @@ -32720,7 +32717,7 @@ fn no_warning_without_and_with_lower_bound() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock().arg("--resolution").arg("lowest-direct"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--resolution").arg("lowest-direct"), @" success: true exit_code: 0 ----- stdout ----- @@ -32747,7 +32744,7 @@ fn lock_unsupported_wheel_url_requires_python() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: false exit_code: 1 ----- stdout ----- @@ -32779,7 +32776,7 @@ fn lock_unsupported_wheel_url_required_platform() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: false exit_code: 1 ----- stdout ----- @@ -32828,7 +32825,7 @@ fn lock_check_multiple_default_indexes_explicit_assignment_dependency_group() -> "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -32878,7 +32875,7 @@ fn lock_check_multiple_default_indexes_explicit_assignment_dependency_group() -> ); }); - uv_snapshot!(context.filters(), context.lock().arg("--check"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--check"), @" success: true exit_code: 0 ----- stdout ----- diff --git a/crates/uv/tests/it/lock_conflict.rs b/crates/uv/tests/it/lock_conflict.rs index 335b0b9fe..ffb9bda9c 100644 --- a/crates/uv/tests/it/lock_conflict.rs +++ b/crates/uv/tests/it/lock_conflict.rs @@ -38,7 +38,7 @@ fn extra_basic() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: false exit_code: 1 ----- stdout ----- @@ -47,7 +47,7 @@ fn extra_basic() -> Result<()> { × No solution found when resolving dependencies: ╰─▶ Because project[extra2] depends on sortedcontainers==2.4.0 and project[extra1] depends on sortedcontainers==2.3.0, we can conclude that project[extra1] and project[extra2] are incompatible. And because your project requires project[extra1] and project[extra2], we can conclude that your project's requirements are unsatisfiable. - "###); + "); // And now with the same extra configuration, we tell uv about // the conflicting extras, which forces it to resolve each in @@ -74,14 +74,14 @@ fn extra_basic() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 3 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -143,26 +143,26 @@ fn extra_basic() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 3 packages in [TIME] - "###); + "); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Audited in [TIME] - "###); + "); // Another install, but with one of the extras enabled. - uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--extra=extra1"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--extra=extra1"), @" success: true exit_code: 0 ----- stdout ----- @@ -171,9 +171,9 @@ fn extra_basic() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + sortedcontainers==2.3.0 - "###); + "); // Another install, but with the other extra enabled. - uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--extra=extra2"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--extra=extra2"), @" success: true exit_code: 0 ----- stdout ----- @@ -184,25 +184,25 @@ fn extra_basic() -> Result<()> { Installed 1 package in [TIME] - sortedcontainers==2.3.0 + sortedcontainers==2.4.0 - "###); + "); // And finally, installing both extras should error. - uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--all-extras"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--all-extras"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: Extras `extra1` and `extra2` are incompatible with the declared conflicts: {`project[extra1]`, `project[extra2]`} - "###); + "); // As should exporting them. - uv_snapshot!(context.filters(), context.export().arg("--frozen").arg("--all-extras"), @r###" + uv_snapshot!(context.filters(), context.export().arg("--frozen").arg("--all-extras"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: Extras `extra1` and `extra2` are incompatible with the declared conflicts: {`project[extra1]`, `project[extra2]`} - "###); + "); Ok(()) } @@ -230,7 +230,7 @@ fn extra_basic_three_extras() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: false exit_code: 1 ----- stdout ----- @@ -239,7 +239,7 @@ fn extra_basic_three_extras() -> Result<()> { × No solution found when resolving dependencies: ╰─▶ Because project[extra2] depends on sortedcontainers==2.3.0 and project[extra1] depends on sortedcontainers==2.2.0, we can conclude that project[extra1] and project[extra2] are incompatible. And because your project requires project[extra1] and project[extra2], we can conclude that your project's requirements are unsatisfiable. - "###); + "); // And now with the same extra configuration, we tell uv about // the conflicting extras, which forces it to resolve each in @@ -268,14 +268,14 @@ fn extra_basic_three_extras() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -387,96 +387,96 @@ fn extra_multiple_not_conflicting1() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 1 package in [TIME] - "###); + "); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Audited in [TIME] - "###); + "); // extra1/extra2 conflict! uv_snapshot!( context.filters(), context.sync().arg("--frozen").arg("--extra=extra1").arg("--extra=extra2"), - @r###" + @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: Extras `extra1` and `extra2` are incompatible with the declared conflicts: {`project[extra1]`, `project[extra2]`} - "###); + "); // project3/project4 conflict! uv_snapshot!( context.filters(), context.sync().arg("--frozen").arg("--extra=project3").arg("--extra=project4"), - @r###" + @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: Extras `project3` and `project4` are incompatible with the declared conflicts: {`project[project3]`, `project[project4]`} - "###); + "); // ... but extra1/project3 does not. uv_snapshot!( context.filters(), context.sync().arg("--frozen").arg("--extra=extra1").arg("--extra=project3"), - @r###" + @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Audited in [TIME] - "###); + "); // ... and neither does extra2/project3. uv_snapshot!( context.filters(), context.sync().arg("--frozen").arg("--extra=extra2").arg("--extra=project3"), - @r###" + @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Audited in [TIME] - "###); + "); // And similarly, with project 4. uv_snapshot!( context.filters(), context.sync().arg("--frozen").arg("--extra=extra1").arg("--extra=project4"), - @r###" + @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Audited in [TIME] - "###); + "); // ... and neither does extra2/project3. uv_snapshot!( context.filters(), context.sync().arg("--frozen").arg("--extra=extra2").arg("--extra=project4"), - @r###" + @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Audited in [TIME] - "###); + "); Ok(()) } @@ -506,7 +506,7 @@ fn extra_multiple_not_conflicting2() -> Result<()> { )?; // Fails, as expected. - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: false exit_code: 1 ----- stdout ----- @@ -515,7 +515,7 @@ fn extra_multiple_not_conflicting2() -> Result<()> { × No solution found when resolving dependencies: ╰─▶ Because project[extra2] depends on sortedcontainers==2.4.0 and project[extra1] depends on sortedcontainers==2.3.0, we can conclude that project[extra1] and project[extra2] are incompatible. And because your project requires project[extra1] and project[extra2], we can conclude that your project's requirements are unsatisfiable. - "###); + "); // If we define extra1/extra2 as conflicting and project3/project4 // as conflicting, that still isn't enough! That's because extra1 @@ -546,7 +546,7 @@ fn extra_multiple_not_conflicting2() -> Result<()> { project4 = ["sortedcontainers==2.4.0"] "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: false exit_code: 1 ----- stdout ----- @@ -596,14 +596,14 @@ fn extra_multiple_not_conflicting2() -> Result<()> { project4 = ["sortedcontainers==2.4.0"] "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 3 packages in [TIME] - "###); + "); // We can also fix this by just putting them all in one big // group, even though extra1/project3 don't conflict and @@ -632,14 +632,14 @@ fn extra_multiple_not_conflicting2() -> Result<()> { project4 = ["sortedcontainers==2.4.0"] "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 3 packages in [TIME] - "###); + "); Ok(()) } @@ -667,7 +667,7 @@ fn extra_multiple_independent() -> Result<()> { project4 = ["anyio==4.2.0"] "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: false exit_code: 1 ----- stdout ----- @@ -676,7 +676,7 @@ fn extra_multiple_independent() -> Result<()> { × No solution found when resolving dependencies: ╰─▶ Because project[extra2] depends on sortedcontainers==2.4.0 and project[extra1] depends on sortedcontainers==2.3.0, we can conclude that project[extra1] and project[extra2] are incompatible. And because your project requires project[extra1] and project[extra2], we can conclude that your project's requirements are unsatisfiable. - "###); + "); // OK, responding to the error, we declare our anyio extras // as conflicting. But now we should see sortedcontainers as @@ -703,7 +703,7 @@ fn extra_multiple_independent() -> Result<()> { project4 = ["anyio==4.2.0"] "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: false exit_code: 1 ----- stdout ----- @@ -743,14 +743,14 @@ fn extra_multiple_independent() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 7 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -894,14 +894,14 @@ fn extra_config_change_ignore_lockfile() -> Result<()> { extra2 = ["sortedcontainers==2.4.0"] "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 3 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); insta::with_settings!({ @@ -962,14 +962,14 @@ fn extra_config_change_ignore_lockfile() -> Result<()> { }); // Re-run with `--locked` to check it's okay. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 3 packages in [TIME] - "###); + "); // Now get rid of the conflicting group config, and check that `--locked` // fails. @@ -987,7 +987,7 @@ fn extra_config_change_ignore_lockfile() -> Result<()> { )?; // Re-run with `--locked`, which should now fail because of // the conflicting group config removal. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: false exit_code: 1 ----- stdout ----- @@ -996,7 +996,7 @@ fn extra_config_change_ignore_lockfile() -> Result<()> { × No solution found when resolving dependencies: ╰─▶ Because project[extra2] depends on sortedcontainers==2.4.0 and project[extra1] depends on sortedcontainers==2.3.0, we can conclude that project[extra1] and project[extra2] are incompatible. And because your project requires project[extra1] and project[extra2], we can conclude that your project's requirements are unsatisfiable. - "###); + "); Ok(()) } @@ -1049,7 +1049,7 @@ fn extra_unconditional() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -1059,7 +1059,7 @@ fn extra_unconditional() -> Result<()> { "); // This should error since we're enabling two conflicting extras. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: false exit_code: 2 ----- stdout ----- @@ -1085,7 +1085,7 @@ fn extra_unconditional() -> Result<()> { proxy1 = { workspace = true } "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -1095,7 +1095,7 @@ fn extra_unconditional() -> Result<()> { "); // This is fine because we are only enabling one // extra, and thus, there is no conflict. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -1127,7 +1127,7 @@ fn extra_unconditional() -> Result<()> { proxy1 = { workspace = true } "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -1137,7 +1137,7 @@ fn extra_unconditional() -> Result<()> { "); // This is fine because we are only enabling one // extra, and thus, there is no conflict. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -1203,7 +1203,7 @@ fn extra_unconditional_non_conflicting() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -1217,7 +1217,7 @@ fn extra_unconditional_non_conflicting() -> Result<()> { // `uv sync` wasn't correctly propagating extras in a way // that would satisfy the conflict markers that got added // to the `proxy1[extra1]` dependency. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -1284,27 +1284,27 @@ fn extra_unconditional_in_optional() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); // This shouldn't install anything. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Audited in [TIME] - "###); + "); // This should install `sortedcontainers==2.3.0`. - uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--extra=x1"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--extra=x1"), @" success: true exit_code: 0 ----- stdout ----- @@ -1317,7 +1317,7 @@ fn extra_unconditional_in_optional() -> Result<()> { "); // This should install `sortedcontainers==2.4.0`. - uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--extra=x2"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--extra=x2"), @" success: true exit_code: 0 ----- stdout ----- @@ -1328,20 +1328,20 @@ fn extra_unconditional_in_optional() -> Result<()> { Installed 1 package in [TIME] - sortedcontainers==2.3.0 + sortedcontainers==2.4.0 - "###); + "); // This should error! uv_snapshot!( context.filters(), context.sync().arg("--frozen").arg("--extra=x1").arg("--extra=x2"), - @r###" + @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: Found conflicting extras `proxy1[nested-x1]` and `proxy1[nested-x2]` enabled simultaneously - "###); + "); Ok(()) } @@ -1426,7 +1426,7 @@ fn extra_unconditional_non_local_conflict() -> Result<()> { // that can never be installed! Namely, because two different // conflicting extras are enabled unconditionally in all // configurations. - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -1438,7 +1438,7 @@ fn extra_unconditional_non_local_conflict() -> Result<()> { // This should fail. If it doesn't and we generated a lock // file above, then this will likely result in the installation // of two different versions of the same package. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: false exit_code: 2 ----- stdout ----- @@ -1551,7 +1551,7 @@ fn extra_nested_across_workspace() -> Result<()> { // `dummy[extra1]` conflicts with `dummysub[extra2]` and that // `dummy[extra2]` conflicts with `dummysub[extra1]`. So we end // up with a resolution failure. - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: false exit_code: 1 ----- stdout ----- @@ -1641,14 +1641,14 @@ fn extra_nested_across_workspace() -> Result<()> { "#, )?; // And now things should work. - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 7 packages in [TIME] - "###); + "); Ok(()) } @@ -1690,7 +1690,7 @@ fn extra_depends_on_conflicting_extra() -> Result<()> { // This should fail to resolve, because the extras are always required together and // `example[foo]` is unusable. - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: false exit_code: 1 ----- stdout ----- @@ -1770,7 +1770,7 @@ fn extra_depends_on_conflicting_extra_transitive() -> Result<()> { // This succeeds, but probably shouldn't. There's an unconditional conflict in `example[foo] // -> indirection[bar] -> example[bar]`, which means `example[foo]` can never be used. - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -1859,7 +1859,7 @@ fn extra_depends_on_conflicting_extra_transitive() -> Result<()> { }); // Install from the lockfile - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -1871,7 +1871,7 @@ fn extra_depends_on_conflicting_extra_transitive() -> Result<()> { "); // Install with `foo` - uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--extra").arg("foo"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--extra").arg("foo"), @" success: false exit_code: 2 ----- stdout ----- @@ -1881,7 +1881,7 @@ fn extra_depends_on_conflicting_extra_transitive() -> Result<()> { "); // Install the child package - uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--package").arg("indirection"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--package").arg("indirection"), @" success: true exit_code: 0 ----- stdout ----- @@ -1918,7 +1918,7 @@ fn group_basic() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: false exit_code: 1 ----- stdout ----- @@ -1927,7 +1927,7 @@ fn group_basic() -> Result<()> { × No solution found when resolving dependencies: ╰─▶ Because project:group2 depends on sortedcontainers==2.4.0 and project:group1 depends on sortedcontainers==2.3.0, we can conclude that project:group1 and project:group2 are incompatible. And because your project requires project:group1 and project:group2, we can conclude that your project's requirements are unsatisfiable. - "###); + "); // And now with the same group configuration, we tell uv about // the conflicting groups, which forces it to resolve each in @@ -1955,7 +1955,7 @@ fn group_basic() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -2023,26 +2023,26 @@ fn group_basic() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 3 packages in [TIME] - "###); + "); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Audited in [TIME] - "###); + "); // Another install, but with one of the groups enabled. - uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--group=group1"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--group=group1"), @" success: true exit_code: 0 ----- stdout ----- @@ -2051,9 +2051,9 @@ fn group_basic() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + sortedcontainers==2.3.0 - "###); + "); // Another install, but with the other group enabled. - uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--group=group2"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--group=group2"), @" success: true exit_code: 0 ----- stdout ----- @@ -2064,16 +2064,16 @@ fn group_basic() -> Result<()> { Installed 1 package in [TIME] - sortedcontainers==2.3.0 + sortedcontainers==2.4.0 - "###); + "); // And finally, installing both groups should error. - uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--group=group1").arg("--group=group2"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--group=group1").arg("--group=group2"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: Groups `group1` and `group2` are incompatible with the conflicts: {`project:group1`, `project:group2`} - "###); + "); Ok(()) } @@ -2110,7 +2110,7 @@ fn group_default() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -2178,17 +2178,17 @@ fn group_default() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 3 packages in [TIME] - "###); + "); // Install from the lockfile, which should include the `extra1` group by default. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -2197,53 +2197,53 @@ fn group_default() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + sortedcontainers==2.3.0 - "###); + "); // Another install, but with one of the groups enabled. - uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--group=group1"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--group=group1"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Audited 1 package in [TIME] - "###); + "); // Another install, but with the other group enabled. This should error, since `group1` is // enabled by default. - uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--group=group2"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--group=group2"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: Groups `group1` (enabled by default) and `group2` are incompatible with the conflicts: {`project:group1`, `project:group2`} - "###); + "); // If the group is explicitly requested, we should still fail, but shouldn't mark it as // "enabled by default". - uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--group=group1").arg("--group=group2"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--group=group1").arg("--group=group2"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: Groups `group1` and `group2` are incompatible with the conflicts: {`project:group1`, `project:group2`} - "###); + "); // If we install via `--all-groups`, we should also avoid marking the group as "enabled by // default". - uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--all-groups"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--all-groups"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: Groups `group1` and `group2` are incompatible with the conflicts: {`project:group1`, `project:group2`} - "###); + "); // Disabling the default group should succeed. - uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--no-group=group1").arg("--group=group2"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--no-group=group1").arg("--group=group2"), @" success: true exit_code: 0 ----- stdout ----- @@ -2254,7 +2254,7 @@ fn group_default() -> Result<()> { Installed 1 package in [TIME] - sortedcontainers==2.3.0 + sortedcontainers==2.4.0 - "###); + "); Ok(()) } @@ -2283,7 +2283,7 @@ fn mixed() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: false exit_code: 1 ----- stdout ----- @@ -2292,7 +2292,7 @@ fn mixed() -> Result<()> { × No solution found when resolving dependencies: ╰─▶ Because project:group1 depends on sortedcontainers==2.3.0 and project[extra1] depends on sortedcontainers==2.4.0, we can conclude that project:group1 and project[extra1] are incompatible. And because your project requires project[extra1] and project:group1, we can conclude that your project's requirements are unsatisfiable. - "###); + "); // And now with the same extra/group configuration, we tell uv // about the conflicting groups, which forces it to resolve each in @@ -2322,14 +2322,14 @@ fn mixed() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 3 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -2393,26 +2393,26 @@ fn mixed() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 3 packages in [TIME] - "###); + "); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Audited in [TIME] - "###); + "); // Another install, but with the group enabled. - uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--group=group1"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--group=group1"), @" success: true exit_code: 0 ----- stdout ----- @@ -2421,9 +2421,9 @@ fn mixed() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + sortedcontainers==2.3.0 - "###); + "); // Another install, but with the extra enabled. - uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--extra=extra1"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--extra=extra1"), @" success: true exit_code: 0 ----- stdout ----- @@ -2434,9 +2434,9 @@ fn mixed() -> Result<()> { Installed 1 package in [TIME] - sortedcontainers==2.3.0 + sortedcontainers==2.4.0 - "###); + "); // And finally, installing both the group and the extra should fail. - uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--group=group1").arg("--extra=extra1"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--group=group1").arg("--extra=extra1"), @" success: false exit_code: 2 ----- stdout ----- @@ -2492,14 +2492,14 @@ fn multiple_sources_index_disjoint_extras() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap(); @@ -2586,14 +2586,14 @@ fn multiple_sources_index_disjoint_extras() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); Ok(()) } @@ -2642,7 +2642,7 @@ fn multiple_sources_index_disjoint_groups() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -2735,14 +2735,14 @@ fn multiple_sources_index_disjoint_groups() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); Ok(()) } @@ -2791,14 +2791,14 @@ fn multiple_sources_index_disjoint_extras_with_extra() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 5 packages in [TIME] - "###); + "); let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap(); @@ -2904,14 +2904,14 @@ fn multiple_sources_index_disjoint_extras_with_extra() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 5 packages in [TIME] - "###); + "); Ok(()) } @@ -2960,14 +2960,14 @@ fn multiple_sources_index_disjoint_extras_with_marker() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 5 packages in [TIME] - "###); + "); let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap(); @@ -3080,14 +3080,14 @@ fn multiple_sources_index_disjoint_extras_with_marker() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 5 packages in [TIME] - "###); + "); Ok(()) } @@ -3125,7 +3125,7 @@ fn non_optional_dependency_extra() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -3172,7 +3172,7 @@ fn non_optional_dependency_group() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -3222,7 +3222,7 @@ fn non_optional_dependency_mixed() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -3282,7 +3282,7 @@ fn shared_optional_dependency_extra1() -> Result<()> { )?; // This shouldn't install two versions of `idna`, only one, `idna==3.5`. - uv_snapshot!(context.filters(), context.sync().arg("--extra=baz").arg("--extra=foo"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--extra=baz").arg("--extra=foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -3294,7 +3294,7 @@ fn shared_optional_dependency_extra1() -> Result<()> { + anyio==4.3.0 + idna==3.5 + sniffio==1.3.1 - "###); + "); let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap(); insta::with_settings!({ @@ -3422,7 +3422,7 @@ fn shared_optional_dependency_group1() -> Result<()> { )?; // This shouldn't install two versions of `idna`, only one, `idna==3.5`. - uv_snapshot!(context.filters(), context.sync().arg("--group=baz").arg("--group=foo"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--group=baz").arg("--group=foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -3563,7 +3563,7 @@ fn shared_optional_dependency_mixed1() -> Result<()> { )?; // This shouldn't install two versions of `idna`, only one, `idna==3.5`. - uv_snapshot!(context.filters(), context.sync().arg("--group=baz").arg("--extra=foo"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--group=baz").arg("--extra=foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -3575,7 +3575,7 @@ fn shared_optional_dependency_mixed1() -> Result<()> { + anyio==4.3.0 + idna==3.5 + sniffio==1.3.1 - "###); + "); let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap(); insta::with_settings!({ @@ -3708,7 +3708,7 @@ fn shared_optional_dependency_extra2() -> Result<()> { )?; // This shouldn't install two versions of `idna`, only one, `idna==3.5`. - uv_snapshot!(context.filters(), context.sync().arg("--extra=bar"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--extra=bar"), @" success: true exit_code: 0 ----- stdout ----- @@ -3720,7 +3720,7 @@ fn shared_optional_dependency_extra2() -> Result<()> { + anyio==4.3.0 + idna==3.6 + sniffio==1.3.1 - "###); + "); let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap(); insta::with_settings!({ @@ -3849,7 +3849,7 @@ fn shared_optional_dependency_group2() -> Result<()> { )?; // This shouldn't install two versions of `idna`, only one, `idna==3.5`. - uv_snapshot!(context.filters(), context.sync().arg("--group=bar"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--group=bar"), @" success: true exit_code: 0 ----- stdout ----- @@ -3995,7 +3995,7 @@ fn shared_optional_dependency_mixed2() -> Result<()> { )?; // This shouldn't install two versions of `idna`, only one, `idna==3.5`. - uv_snapshot!(context.filters(), context.sync().arg("--group=bar"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--group=bar"), @" success: true exit_code: 0 ----- stdout ----- @@ -4007,7 +4007,7 @@ fn shared_optional_dependency_mixed2() -> Result<()> { + anyio==4.3.0 + idna==3.6 + sniffio==1.3.1 - "###); + "); let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap(); insta::with_settings!({ @@ -4139,7 +4139,7 @@ fn shared_dependency_extra() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -4240,7 +4240,7 @@ fn shared_dependency_extra() -> Result<()> { // This shouldn't install two versions of `idna`, only one, `idna==3.5`. // So this should remove `idna==3.6` installed above. - uv_snapshot!(context.filters(), context.sync().arg("--extra=foo"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--extra=foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -4254,7 +4254,7 @@ fn shared_dependency_extra() -> Result<()> { + idna==3.5 "); - uv_snapshot!(context.filters(), context.sync().arg("--extra=bar"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--extra=bar"), @" success: true exit_code: 0 ----- stdout ----- @@ -4267,7 +4267,7 @@ fn shared_dependency_extra() -> Result<()> { + idna==3.6 "); - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -4314,7 +4314,7 @@ fn shared_dependency_group() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -4414,7 +4414,7 @@ fn shared_dependency_group() -> Result<()> { // This shouldn't install two versions of `idna`, only one, `idna==3.5`. // So this should remove `idna==3.6` installed above. - uv_snapshot!(context.filters(), context.sync().arg("--group=foo"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--group=foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -4426,9 +4426,9 @@ fn shared_dependency_group() -> Result<()> { Installed 1 package in [TIME] - idna==3.6 + idna==3.5 - "###); + "); - uv_snapshot!(context.filters(), context.sync().arg("--group=bar"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--group=bar"), @" success: true exit_code: 0 ----- stdout ----- @@ -4439,9 +4439,9 @@ fn shared_dependency_group() -> Result<()> { Installed 1 package in [TIME] - idna==3.5 + idna==3.6 - "###); + "); - uv_snapshot!(context.filters(), context.sync(), @r###" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -4449,7 +4449,7 @@ fn shared_dependency_group() -> Result<()> { ----- stderr ----- Resolved 5 packages in [TIME] Audited 3 packages in [TIME] - "###); + "); Ok(()) } @@ -4490,7 +4490,7 @@ fn shared_dependency_mixed() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -4595,7 +4595,7 @@ fn shared_dependency_mixed() -> Result<()> { // This shouldn't install two versions of `idna`, only one, `idna==3.5`. // So this should remove `idna==3.6` installed above. - uv_snapshot!(context.filters(), context.sync().arg("--extra=foo"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--extra=foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -4609,7 +4609,7 @@ fn shared_dependency_mixed() -> Result<()> { + idna==3.5 "); - uv_snapshot!(context.filters(), context.sync().arg("--group=bar"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--group=bar"), @" success: true exit_code: 0 ----- stdout ----- @@ -4622,7 +4622,7 @@ fn shared_dependency_mixed() -> Result<()> { + idna==3.6 "); - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -4697,7 +4697,7 @@ conflicts = [ )?; // Error out, as x2 extra is only on the child. - uv_snapshot!(context.filters(), context.sync().arg("--extra=x2"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--extra=x2"), @" success: false exit_code: 2 ----- stdout ----- @@ -4705,9 +4705,9 @@ conflicts = [ ----- stderr ----- Resolved 7 packages in [TIME] error: Extra `x2` is not defined in the project's `optional-dependencies` table - "###); + "); - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -4898,7 +4898,7 @@ fn jinja_no_conflict_markers1() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.sync(), @r###" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -4906,7 +4906,7 @@ fn jinja_no_conflict_markers1() -> Result<()> { ----- stderr ----- Resolved 5 packages in [TIME] Audited in [TIME] - "###); + "); let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap(); insta::with_settings!({ @@ -5060,7 +5060,7 @@ fn jinja_no_conflict_markers2() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.sync(), @r###" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -5068,7 +5068,7 @@ fn jinja_no_conflict_markers2() -> Result<()> { ----- stderr ----- Resolved 5 packages in [TIME] Audited in [TIME] - "###); + "); let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock")).unwrap(); insta::with_settings!({ @@ -5221,14 +5221,14 @@ fn collision_extra() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 6 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); insta::with_settings!({ @@ -5329,7 +5329,7 @@ fn collision_extra() -> Result<()> { ); }); - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -5340,7 +5340,7 @@ fn collision_extra() -> Result<()> { + anyio==4.3.0 + idna==3.6 + sniffio==1.3.1 - "###); + "); // The extra `extra-3-pkg-foo` is meant to collide with the encoded // extra name generated by the extra `foo`. When `foo` is enabled, @@ -5350,7 +5350,7 @@ fn collision_extra() -> Result<()> { uv_snapshot!( context.filters(), context.sync().arg("--frozen").arg("--extra=extra-3-pkg-foo"), - @r###" + @" success: true exit_code: 0 ----- stdout ----- @@ -5359,14 +5359,14 @@ fn collision_extra() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + sortedcontainers==2.4.0 - "### + " ); // Verify that activating `foo` does result in `idna==3.5`. uv_snapshot!( context.filters(), context.sync().arg("--frozen").arg("--extra=foo"), - @r###" + @" success: true exit_code: 0 ----- stdout ----- @@ -5378,7 +5378,7 @@ fn collision_extra() -> Result<()> { - idna==3.6 + idna==3.5 - sortedcontainers==2.4.0 - "### + " ); // And that activating both is fine and dandy. We get `idna==3.5` @@ -5386,7 +5386,7 @@ fn collision_extra() -> Result<()> { uv_snapshot!( context.filters(), context.sync().arg("--frozen").arg("--extra=extra-3-pkg-foo").arg("--extra=foo"), - @r###" + @" success: true exit_code: 0 ----- stdout ----- @@ -5394,7 +5394,7 @@ fn collision_extra() -> Result<()> { ----- stderr ----- Installed 1 package in [TIME] + sortedcontainers==2.4.0 - "### + " ); Ok(()) @@ -5450,14 +5450,14 @@ fn extra_inferences() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 137 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); insta::with_settings!({ @@ -7486,14 +7486,14 @@ fn deduplicate_resolution_markers() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 5 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); insta::with_settings!({ @@ -7640,14 +7640,14 @@ fn incorrect_extra_simplification_leads_to_multiple_torch_packages() -> Result<( "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 115 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); insta::with_settings!({ @@ -10415,7 +10415,7 @@ fn duplicate_torch_and_sympy_because_of_wrong_inferences() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -13637,14 +13637,14 @@ fn overlapping_resolution_markers() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 45 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); insta::with_settings!({ @@ -14320,14 +14320,14 @@ fn avoids_exponential_lock_file_growth() -> Result<()> { let pyproject_toml = context.temp_dir.child("pyproject.toml"); pyproject_toml.write_str(pyproject)?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 27 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); insta::with_settings!({ @@ -14734,7 +14734,7 @@ fn avoids_exponential_lock_file_growth() -> Result<()> { let pyproject = pyproject.replace(r#"version = "0.1.0""#, r#"version = "0.1.1""#); pyproject_toml.write_str(&pyproject)?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -14742,7 +14742,7 @@ fn avoids_exponential_lock_file_growth() -> Result<()> { ----- stderr ----- Resolved 27 packages in [TIME] Updated resolution-markers-for-days v0.1.0 -> v0.1.1 - "###); + "); let lock = context.read("uv.lock"); insta::with_settings!({ @@ -15184,7 +15184,7 @@ fn do_not_simplify_if_not_all_conflict_extras_satisfy_the_marker_by_themselves() let pyproject_toml = context.temp_dir.child("pyproject.toml"); pyproject_toml.write_str(pyproject)?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -15283,7 +15283,7 @@ fn do_not_simplify_if_not_all_conflict_extras_satisfy_the_marker_by_themselves() }); // The incorrect behavior was that only python-dateutil was installed and six was missing. - uv_snapshot!(context.filters(), context.sync().arg("--extra").arg("a").arg("--dry-run"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--extra").arg("a").arg("--dry-run"), @" success: true exit_code: 0 ----- stdout ----- diff --git a/crates/uv/tests/it/lock_exclude_newer_relative.rs b/crates/uv/tests/it/lock_exclude_newer_relative.rs index fe7ddf0c7..4eb7723ee 100644 --- a/crates/uv/tests/it/lock_exclude_newer_relative.rs +++ b/crates/uv/tests/it/lock_exclude_newer_relative.rs @@ -31,14 +31,14 @@ fn lock_exclude_newer_relative() -> Result<()> { .env_remove(EnvVars::UV_EXCLUDE_NEWER) .env(EnvVars::UV_TEST_CURRENT_TIMESTAMP, current_timestamp) .arg("--exclude-newer") - .arg("3 weeks"), @r###" + .arg("3 weeks"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); // Should resolve to idna 3.6 (released 2023-11-25, before cutoff of 2024-04-10) @@ -80,7 +80,7 @@ fn lock_exclude_newer_relative() -> Result<()> { .env(EnvVars::UV_TEST_CURRENT_TIMESTAMP, later_timestamp) .arg("--exclude-newer") .arg("3 weeks") - .arg("--locked"), @r" + .arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- @@ -96,7 +96,7 @@ fn lock_exclude_newer_relative() -> Result<()> { .env_remove(EnvVars::UV_EXCLUDE_NEWER) .env(EnvVars::UV_TEST_CURRENT_TIMESTAMP, current_timestamp) .arg("--exclude-newer") - .arg("2 weeks"), @r" + .arg("2 weeks"), @" success: true exit_code: 0 ----- stdout ----- @@ -147,7 +147,7 @@ fn lock_exclude_newer_relative() -> Result<()> { .env(EnvVars::UV_TEST_CURRENT_TIMESTAMP, current_timestamp) .arg("--exclude-newer") .arg("2 weeks") - .arg("--upgrade"), @r" + .arg("--upgrade"), @" success: true exit_code: 0 ----- stdout ----- @@ -196,7 +196,7 @@ fn lock_exclude_newer_relative() -> Result<()> { .env(EnvVars::UV_TEST_CURRENT_TIMESTAMP, current_timestamp) .arg("--exclude-newer") .arg("2 weeks") - .arg("--refresh"), @r" + .arg("--refresh"), @" success: true exit_code: 0 ----- stdout ----- @@ -234,7 +234,7 @@ fn lock_exclude_newer_package_relative() -> Result<()> { .env_remove(EnvVars::UV_EXCLUDE_NEWER) .env(EnvVars::UV_TEST_CURRENT_TIMESTAMP, current_timestamp) .arg("--exclude-newer-package") - .arg("idna=3 weeks"), @r" + .arg("idna=3 weeks"), @" success: true exit_code: 0 ----- stdout ----- @@ -284,7 +284,7 @@ fn lock_exclude_newer_package_relative() -> Result<()> { .env(EnvVars::UV_TEST_CURRENT_TIMESTAMP, later_timestamp) .arg("--exclude-newer-package") .arg("idna=3 weeks") - .arg("--locked"), @r" + .arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- @@ -300,7 +300,7 @@ fn lock_exclude_newer_package_relative() -> Result<()> { .env_remove(EnvVars::UV_EXCLUDE_NEWER) .env(EnvVars::UV_TEST_CURRENT_TIMESTAMP, current_timestamp) .arg("--exclude-newer-package") - .arg("idna=2 weeks"), @r" + .arg("idna=2 weeks"), @" success: true exit_code: 0 ----- stdout ----- @@ -352,7 +352,7 @@ fn lock_exclude_newer_package_relative() -> Result<()> { .env(EnvVars::UV_TEST_CURRENT_TIMESTAMP, current_timestamp) .arg("--exclude-newer-package") .arg("idna=2 weeks") - .arg("--upgrade"), @r" + .arg("--upgrade"), @" success: true exit_code: 0 ----- stdout ----- @@ -424,7 +424,7 @@ fn lock_exclude_newer_relative_pyproject() -> Result<()> { uv_snapshot!(context.filters(), context .lock() .env_remove(EnvVars::UV_EXCLUDE_NEWER) - .env(EnvVars::UV_TEST_CURRENT_TIMESTAMP, current_timestamp), @r" + .env(EnvVars::UV_TEST_CURRENT_TIMESTAMP, current_timestamp), @" success: true exit_code: 0 ----- stdout ----- @@ -495,7 +495,7 @@ fn lock_exclude_newer_package_relative_pyproject() -> Result<()> { uv_snapshot!(context.filters(), context .lock() .env_remove(EnvVars::UV_EXCLUDE_NEWER) - .env(EnvVars::UV_TEST_CURRENT_TIMESTAMP, current_timestamp), @r" + .env(EnvVars::UV_TEST_CURRENT_TIMESTAMP, current_timestamp), @" success: true exit_code: 0 ----- stdout ----- @@ -577,7 +577,7 @@ fn lock_exclude_newer_relative_global_and_package() -> Result<()> { .arg("--exclude-newer") .arg("3 weeks") .arg("--exclude-newer-package") - .arg("typing-extensions=2 weeks"), @r" + .arg("typing-extensions=2 weeks"), @" success: true exit_code: 0 ----- stdout ----- @@ -645,7 +645,7 @@ fn lock_exclude_newer_relative_global_and_package() -> Result<()> { .arg("3 weeks") .arg("--exclude-newer-package") .arg("typing-extensions=2 weeks") - .arg("--locked"), @r" + .arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- @@ -663,7 +663,7 @@ fn lock_exclude_newer_relative_global_and_package() -> Result<()> { .arg("--exclude-newer") .arg("2 weeks") .arg("--exclude-newer-package") - .arg("typing-extensions=2 weeks"), @r" + .arg("typing-extensions=2 weeks"), @" success: true exit_code: 0 ----- stdout ----- @@ -682,7 +682,7 @@ fn lock_exclude_newer_relative_global_and_package() -> Result<()> { .arg("--exclude-newer") .arg("2 weeks") .arg("--exclude-newer-package") - .arg("typing-extensions=3 days"), @r" + .arg("typing-extensions=3 days"), @" success: true exit_code: 0 ----- stdout ----- @@ -700,7 +700,7 @@ fn lock_exclude_newer_relative_global_and_package() -> Result<()> { .arg("--exclude-newer") .arg("2024-05-20T00:00:00Z") .arg("--exclude-newer-package") - .arg("typing-extensions=2 weeks"), @r" + .arg("typing-extensions=2 weeks"), @" success: true exit_code: 0 ----- stdout ----- @@ -766,7 +766,7 @@ fn lock_exclude_newer_relative_global_and_package() -> Result<()> { .arg("--exclude-newer") .arg("3 weeks") .arg("--exclude-newer-package") - .arg("typing-extensions=2024-04-01T00:00:00Z"), @r" + .arg("typing-extensions=2024-04-01T00:00:00Z"), @" success: true exit_code: 0 ----- stdout ----- @@ -849,20 +849,20 @@ fn lock_exclude_newer_relative_values() -> Result<()> { .lock() .env_remove(EnvVars::UV_EXCLUDE_NEWER) .arg("--exclude-newer") - .arg("1 day"), @r###" + .arg("1 day"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); uv_snapshot!(context.filters(), context .lock() .env_remove(EnvVars::UV_EXCLUDE_NEWER) .arg("--exclude-newer") - .arg("30days"), @r" + .arg("30days"), @" success: true exit_code: 0 ----- stdout ----- @@ -876,7 +876,7 @@ fn lock_exclude_newer_relative_values() -> Result<()> { .lock() .env_remove(EnvVars::UV_EXCLUDE_NEWER) .arg("--exclude-newer") - .arg("P1D"), @r" + .arg("P1D"), @" success: true exit_code: 0 ----- stdout ----- @@ -890,7 +890,7 @@ fn lock_exclude_newer_relative_values() -> Result<()> { .lock() .env_remove(EnvVars::UV_EXCLUDE_NEWER) .arg("--exclude-newer") - .arg("1 week"), @r" + .arg("1 week"), @" success: true exit_code: 0 ----- stdout ----- @@ -904,7 +904,7 @@ fn lock_exclude_newer_relative_values() -> Result<()> { .lock() .env_remove(EnvVars::UV_EXCLUDE_NEWER) .arg("--exclude-newer") - .arg("1 week ago"), @r" + .arg("1 week ago"), @" success: true exit_code: 0 ----- stdout ----- @@ -918,7 +918,7 @@ fn lock_exclude_newer_relative_values() -> Result<()> { .lock() .env_remove(EnvVars::UV_EXCLUDE_NEWER) .arg("--exclude-newer") - .arg("3 months"), @r" + .arg("3 months"), @" success: false exit_code: 2 ----- stdout ----- @@ -933,7 +933,7 @@ fn lock_exclude_newer_relative_values() -> Result<()> { .lock() .env_remove(EnvVars::UV_EXCLUDE_NEWER) .arg("--exclude-newer") - .arg("2 months ago"), @r" + .arg("2 months ago"), @" success: false exit_code: 2 ----- stdout ----- @@ -948,7 +948,7 @@ fn lock_exclude_newer_relative_values() -> Result<()> { .lock() .env_remove(EnvVars::UV_EXCLUDE_NEWER) .arg("--exclude-newer") - .arg("1 year"), @r" + .arg("1 year"), @" success: false exit_code: 2 ----- stdout ----- @@ -963,7 +963,7 @@ fn lock_exclude_newer_relative_values() -> Result<()> { .lock() .env_remove(EnvVars::UV_EXCLUDE_NEWER) .arg("--exclude-newer") - .arg("1 year ago"), @r" + .arg("1 year ago"), @" success: false exit_code: 2 ----- stdout ----- @@ -977,7 +977,7 @@ fn lock_exclude_newer_relative_values() -> Result<()> { uv_snapshot!(context.filters(), context .lock() .arg("--exclude-newer") - .arg("invalid span"), @r" + .arg("invalid span"), @" success: false exit_code: 2 ----- stdout ----- @@ -1005,7 +1005,7 @@ fn lock_exclude_newer_relative_values() -> Result<()> { uv_snapshot!(context.filters(), context .lock() .arg("--exclude-newer") - .arg("2006-12-02T02:07:43"), @r" + .arg("2006-12-02T02:07:43"), @" success: false exit_code: 1 ----- stdout ----- @@ -1019,7 +1019,7 @@ fn lock_exclude_newer_relative_values() -> Result<()> { uv_snapshot!(context.filters(), context .lock() .arg("--exclude-newer") - .arg("12/02/2006"), @r" + .arg("12/02/2006"), @" success: false exit_code: 2 ----- stdout ----- @@ -1047,7 +1047,7 @@ fn lock_exclude_newer_relative_values() -> Result<()> { uv_snapshot!(context.filters(), context .lock() .arg("--exclude-newer") - .arg("30"), @r" + .arg("30"), @" success: false exit_code: 2 ----- stdout ----- diff --git a/crates/uv/tests/it/lock_scenarios.rs b/crates/uv/tests/it/lock_scenarios.rs index 088fc18c3..31e5d069c 100644 --- a/crates/uv/tests/it/lock_scenarios.rs +++ b/crates/uv/tests/it/lock_scenarios.rs @@ -106,7 +106,7 @@ fn wrong_backtracking_basic() -> Result<()> { let mut cmd = context.lock(); cmd.env_remove(EnvVars::UV_EXCLUDE_NEWER); cmd.arg("--index-url").arg(packse_index_url()); - uv_snapshot!(filters, cmd, @r" + uv_snapshot!(filters, cmd, @" success: true exit_code: 0 ----- stdout ----- @@ -273,7 +273,7 @@ fn wrong_backtracking_indirect() -> Result<()> { let mut cmd = context.lock(); cmd.env_remove(EnvVars::UV_EXCLUDE_NEWER); cmd.arg("--index-url").arg(packse_index_url()); - uv_snapshot!(filters, cmd, @r" + uv_snapshot!(filters, cmd, @" success: true exit_code: 0 ----- stdout ----- @@ -418,7 +418,7 @@ fn fork_allows_non_conflicting_non_overlapping_dependencies() -> Result<()> { let mut cmd = context.lock(); cmd.env_remove(EnvVars::UV_EXCLUDE_NEWER); cmd.arg("--index-url").arg(packse_index_url()); - uv_snapshot!(filters, cmd, @r" + uv_snapshot!(filters, cmd, @" success: true exit_code: 0 ----- stdout ----- @@ -536,7 +536,7 @@ fn fork_allows_non_conflicting_repeated_dependencies() -> Result<()> { let mut cmd = context.lock(); cmd.env_remove(EnvVars::UV_EXCLUDE_NEWER); cmd.arg("--index-url").arg(packse_index_url()); - uv_snapshot!(filters, cmd, @r" + uv_snapshot!(filters, cmd, @" success: true exit_code: 0 ----- stdout ----- @@ -636,7 +636,7 @@ fn fork_basic() -> Result<()> { let mut cmd = context.lock(); cmd.env_remove(EnvVars::UV_EXCLUDE_NEWER); cmd.arg("--index-url").arg(packse_index_url()); - uv_snapshot!(filters, cmd, @r" + uv_snapshot!(filters, cmd, @" success: true exit_code: 0 ----- stdout ----- @@ -771,7 +771,7 @@ fn conflict_in_fork() -> Result<()> { let mut cmd = context.lock(); cmd.env_remove(EnvVars::UV_EXCLUDE_NEWER); cmd.arg("--index-url").arg(packse_index_url()); - uv_snapshot!(filters, cmd, @r" + uv_snapshot!(filters, cmd, @" success: false exit_code: 1 ----- stdout ----- @@ -841,7 +841,7 @@ fn fork_conflict_unsatisfiable() -> Result<()> { let mut cmd = context.lock(); cmd.env_remove(EnvVars::UV_EXCLUDE_NEWER); cmd.arg("--index-url").arg(packse_index_url()); - uv_snapshot!(filters, cmd, @r" + uv_snapshot!(filters, cmd, @" success: false exit_code: 1 ----- stdout ----- @@ -924,7 +924,7 @@ fn fork_filter_sibling_dependencies() -> Result<()> { let mut cmd = context.lock(); cmd.env_remove(EnvVars::UV_EXCLUDE_NEWER); cmd.arg("--index-url").arg(packse_index_url()); - uv_snapshot!(filters, cmd, @r" + uv_snapshot!(filters, cmd, @" success: true exit_code: 0 ----- stdout ----- @@ -1103,7 +1103,7 @@ fn fork_upgrade() -> Result<()> { let mut cmd = context.lock(); cmd.env_remove(EnvVars::UV_EXCLUDE_NEWER); cmd.arg("--index-url").arg(packse_index_url()); - uv_snapshot!(filters, cmd, @r" + uv_snapshot!(filters, cmd, @" success: true exit_code: 0 ----- stdout ----- @@ -1224,7 +1224,7 @@ fn fork_incomplete_markers() -> Result<()> { let mut cmd = context.lock(); cmd.env_remove(EnvVars::UV_EXCLUDE_NEWER); cmd.arg("--index-url").arg(packse_index_url()); - uv_snapshot!(filters, cmd, @r" + uv_snapshot!(filters, cmd, @" success: true exit_code: 0 ----- stdout ----- @@ -1378,7 +1378,7 @@ fn fork_marker_accrue() -> Result<()> { let mut cmd = context.lock(); cmd.env_remove(EnvVars::UV_EXCLUDE_NEWER); cmd.arg("--index-url").arg(packse_index_url()); - uv_snapshot!(filters, cmd, @r" + uv_snapshot!(filters, cmd, @" success: true exit_code: 0 ----- stdout ----- @@ -1512,7 +1512,7 @@ fn fork_marker_disjoint() -> Result<()> { let mut cmd = context.lock(); cmd.env_remove(EnvVars::UV_EXCLUDE_NEWER); cmd.arg("--index-url").arg(packse_index_url()); - uv_snapshot!(filters, cmd, @r" + uv_snapshot!(filters, cmd, @" success: false exit_code: 1 ----- stdout ----- @@ -1582,7 +1582,7 @@ fn fork_marker_inherit_combined_allowed() -> Result<()> { let mut cmd = context.lock(); cmd.env_remove(EnvVars::UV_EXCLUDE_NEWER); cmd.arg("--index-url").arg(packse_index_url()); - uv_snapshot!(filters, cmd, @r" + uv_snapshot!(filters, cmd, @" success: true exit_code: 0 ----- stdout ----- @@ -1763,7 +1763,7 @@ fn fork_marker_inherit_combined_disallowed() -> Result<()> { let mut cmd = context.lock(); cmd.env_remove(EnvVars::UV_EXCLUDE_NEWER); cmd.arg("--index-url").arg(packse_index_url()); - uv_snapshot!(filters, cmd, @r" + uv_snapshot!(filters, cmd, @" success: true exit_code: 0 ----- stdout ----- @@ -1933,7 +1933,7 @@ fn fork_marker_inherit_combined() -> Result<()> { let mut cmd = context.lock(); cmd.env_remove(EnvVars::UV_EXCLUDE_NEWER); cmd.arg("--index-url").arg(packse_index_url()); - uv_snapshot!(filters, cmd, @r" + uv_snapshot!(filters, cmd, @" success: true exit_code: 0 ----- stdout ----- @@ -2096,7 +2096,7 @@ fn fork_marker_inherit_isolated() -> Result<()> { let mut cmd = context.lock(); cmd.env_remove(EnvVars::UV_EXCLUDE_NEWER); cmd.arg("--index-url").arg(packse_index_url()); - uv_snapshot!(filters, cmd, @r" + uv_snapshot!(filters, cmd, @" success: true exit_code: 0 ----- stdout ----- @@ -2245,7 +2245,7 @@ fn fork_marker_inherit_transitive() -> Result<()> { let mut cmd = context.lock(); cmd.env_remove(EnvVars::UV_EXCLUDE_NEWER); cmd.arg("--index-url").arg(packse_index_url()); - uv_snapshot!(filters, cmd, @r" + uv_snapshot!(filters, cmd, @" success: true exit_code: 0 ----- stdout ----- @@ -2402,7 +2402,7 @@ fn fork_marker_inherit() -> Result<()> { let mut cmd = context.lock(); cmd.env_remove(EnvVars::UV_EXCLUDE_NEWER); cmd.arg("--index-url").arg(packse_index_url()); - uv_snapshot!(filters, cmd, @r" + uv_snapshot!(filters, cmd, @" success: true exit_code: 0 ----- stdout ----- @@ -2541,7 +2541,7 @@ fn fork_marker_limited_inherit() -> Result<()> { let mut cmd = context.lock(); cmd.env_remove(EnvVars::UV_EXCLUDE_NEWER); cmd.arg("--index-url").arg(packse_index_url()); - uv_snapshot!(filters, cmd, @r" + uv_snapshot!(filters, cmd, @" success: true exit_code: 0 ----- stdout ----- @@ -2697,7 +2697,7 @@ fn fork_marker_selection() -> Result<()> { let mut cmd = context.lock(); cmd.env_remove(EnvVars::UV_EXCLUDE_NEWER); cmd.arg("--index-url").arg(packse_index_url()); - uv_snapshot!(filters, cmd, @r" + uv_snapshot!(filters, cmd, @" success: true exit_code: 0 ----- stdout ----- @@ -2853,7 +2853,7 @@ fn fork_marker_track() -> Result<()> { let mut cmd = context.lock(); cmd.env_remove(EnvVars::UV_EXCLUDE_NEWER); cmd.arg("--index-url").arg(packse_index_url()); - uv_snapshot!(filters, cmd, @r" + uv_snapshot!(filters, cmd, @" success: true exit_code: 0 ----- stdout ----- @@ -3006,7 +3006,7 @@ fn fork_non_fork_marker_transitive() -> Result<()> { let mut cmd = context.lock(); cmd.env_remove(EnvVars::UV_EXCLUDE_NEWER); cmd.arg("--index-url").arg(packse_index_url()); - uv_snapshot!(filters, cmd, @r" + uv_snapshot!(filters, cmd, @" success: true exit_code: 0 ----- stdout ----- @@ -3141,7 +3141,7 @@ fn fork_non_local_fork_marker_direct() -> Result<()> { let mut cmd = context.lock(); cmd.env_remove(EnvVars::UV_EXCLUDE_NEWER); cmd.arg("--index-url").arg(packse_index_url()); - uv_snapshot!(filters, cmd, @r" + uv_snapshot!(filters, cmd, @" success: false exit_code: 1 ----- stdout ----- @@ -3213,7 +3213,7 @@ fn fork_non_local_fork_marker_transitive() -> Result<()> { let mut cmd = context.lock(); cmd.env_remove(EnvVars::UV_EXCLUDE_NEWER); cmd.arg("--index-url").arg(packse_index_url()); - uv_snapshot!(filters, cmd, @r" + uv_snapshot!(filters, cmd, @" success: false exit_code: 1 ----- stdout ----- @@ -3302,7 +3302,7 @@ fn fork_overlapping_markers_basic() -> Result<()> { let mut cmd = context.lock(); cmd.env_remove(EnvVars::UV_EXCLUDE_NEWER); cmd.arg("--index-url").arg(packse_index_url()); - uv_snapshot!(filters, cmd, @r" + uv_snapshot!(filters, cmd, @" success: true exit_code: 0 ----- stdout ----- @@ -3470,7 +3470,7 @@ fn preferences_dependent_forking_bistable() -> Result<()> { let mut cmd = context.lock(); cmd.env_remove(EnvVars::UV_EXCLUDE_NEWER); cmd.arg("--index-url").arg(packse_index_url()); - uv_snapshot!(filters, cmd, @r" + uv_snapshot!(filters, cmd, @" success: true exit_code: 0 ----- stdout ----- @@ -3707,7 +3707,7 @@ fn preferences_dependent_forking_conflicting() -> Result<()> { let mut cmd = context.lock(); cmd.env_remove(EnvVars::UV_EXCLUDE_NEWER); cmd.arg("--index-url").arg(packse_index_url()); - uv_snapshot!(filters, cmd, @r" + uv_snapshot!(filters, cmd, @" success: true exit_code: 0 ----- stdout ----- @@ -3849,7 +3849,7 @@ fn preferences_dependent_forking_tristable() -> Result<()> { let mut cmd = context.lock(); cmd.env_remove(EnvVars::UV_EXCLUDE_NEWER); cmd.arg("--index-url").arg(packse_index_url()); - uv_snapshot!(filters, cmd, @r" + uv_snapshot!(filters, cmd, @" success: true exit_code: 0 ----- stdout ----- @@ -4133,7 +4133,7 @@ fn preferences_dependent_forking() -> Result<()> { let mut cmd = context.lock(); cmd.env_remove(EnvVars::UV_EXCLUDE_NEWER); cmd.arg("--index-url").arg(packse_index_url()); - uv_snapshot!(filters, cmd, @r" + uv_snapshot!(filters, cmd, @" success: true exit_code: 0 ----- stdout ----- @@ -4308,7 +4308,7 @@ fn fork_remaining_universe_partitioning() -> Result<()> { let mut cmd = context.lock(); cmd.env_remove(EnvVars::UV_EXCLUDE_NEWER); cmd.arg("--index-url").arg(packse_index_url()); - uv_snapshot!(filters, cmd, @r" + uv_snapshot!(filters, cmd, @" success: true exit_code: 0 ----- stdout ----- @@ -4460,7 +4460,7 @@ fn fork_requires_python_full_prerelease() -> Result<()> { let mut cmd = context.lock(); cmd.env_remove(EnvVars::UV_EXCLUDE_NEWER); cmd.arg("--index-url").arg(packse_index_url()); - uv_snapshot!(filters, cmd, @r" + uv_snapshot!(filters, cmd, @" success: true exit_code: 0 ----- stdout ----- @@ -4544,7 +4544,7 @@ fn fork_requires_python_full() -> Result<()> { let mut cmd = context.lock(); cmd.env_remove(EnvVars::UV_EXCLUDE_NEWER); cmd.arg("--index-url").arg(packse_index_url()); - uv_snapshot!(filters, cmd, @r" + uv_snapshot!(filters, cmd, @" success: true exit_code: 0 ----- stdout ----- @@ -4633,7 +4633,7 @@ fn fork_requires_python_patch_overlap() -> Result<()> { let mut cmd = context.lock(); cmd.env_remove(EnvVars::UV_EXCLUDE_NEWER); cmd.arg("--index-url").arg(packse_index_url()); - uv_snapshot!(filters, cmd, @r" + uv_snapshot!(filters, cmd, @" success: true exit_code: 0 ----- stdout ----- @@ -4726,7 +4726,7 @@ fn fork_requires_python() -> Result<()> { let mut cmd = context.lock(); cmd.env_remove(EnvVars::UV_EXCLUDE_NEWER); cmd.arg("--index-url").arg(packse_index_url()); - uv_snapshot!(filters, cmd, @r" + uv_snapshot!(filters, cmd, @" success: true exit_code: 0 ----- stdout ----- @@ -4807,7 +4807,7 @@ fn requires_python_wheels() -> Result<()> { let mut cmd = context.lock(); cmd.env_remove(EnvVars::UV_EXCLUDE_NEWER); cmd.arg("--index-url").arg(packse_index_url()); - uv_snapshot!(filters, cmd, @r" + uv_snapshot!(filters, cmd, @" success: true exit_code: 0 ----- stdout ----- @@ -4904,7 +4904,7 @@ fn unreachable_package() -> Result<()> { let mut cmd = context.lock(); cmd.env_remove(EnvVars::UV_EXCLUDE_NEWER); cmd.arg("--index-url").arg(packse_index_url()); - uv_snapshot!(filters, cmd, @r" + uv_snapshot!(filters, cmd, @" success: true exit_code: 0 ----- stdout ----- @@ -5006,7 +5006,7 @@ fn unreachable_wheels() -> Result<()> { let mut cmd = context.lock(); cmd.env_remove(EnvVars::UV_EXCLUDE_NEWER); cmd.arg("--index-url").arg(packse_index_url()); - uv_snapshot!(filters, cmd, @r" + uv_snapshot!(filters, cmd, @" success: true exit_code: 0 ----- stdout ----- @@ -5137,7 +5137,7 @@ fn marker_variants_have_different_extras() -> Result<()> { let mut cmd = context.lock(); cmd.env_remove(EnvVars::UV_EXCLUDE_NEWER); cmd.arg("--index-url").arg(packse_index_url()); - uv_snapshot!(filters, cmd, @r" + uv_snapshot!(filters, cmd, @" success: true exit_code: 0 ----- stdout ----- @@ -5275,7 +5275,7 @@ fn virtual_package_extra_priorities() -> Result<()> { let mut cmd = context.lock(); cmd.env_remove(EnvVars::UV_EXCLUDE_NEWER); cmd.arg("--index-url").arg(packse_index_url()); - uv_snapshot!(filters, cmd, @r" + uv_snapshot!(filters, cmd, @" success: true exit_code: 0 ----- stdout ----- @@ -5395,7 +5395,7 @@ fn specific_architecture() -> Result<()> { let mut cmd = context.lock(); cmd.env_remove(EnvVars::UV_EXCLUDE_NEWER); cmd.arg("--index-url").arg(packse_index_url()); - uv_snapshot!(filters, cmd, @r" + uv_snapshot!(filters, cmd, @" success: true exit_code: 0 ----- stdout ----- diff --git a/crates/uv/tests/it/network.rs b/crates/uv/tests/it/network.rs index e01e00402..171fa5b14 100644 --- a/crates/uv/tests/it/network.rs +++ b/crates/uv/tests/it/network.rs @@ -181,7 +181,7 @@ async fn simple_http_500() { .arg("--index-url") .arg(&mock_server_uri) .env_remove(EnvVars::UV_HTTP_RETRIES) - .env(EnvVars::UV_TEST_NO_HTTP_RETRY_DELAY, "true"), @r" + .env(EnvVars::UV_TEST_NO_HTTP_RETRY_DELAY, "true"), @" success: false exit_code: 2 ----- stdout ----- @@ -207,7 +207,7 @@ async fn simple_io_err() { .arg("--index-url") .arg(&mock_server_uri) .env_remove(EnvVars::UV_HTTP_RETRIES) - .env(EnvVars::UV_TEST_NO_HTTP_RETRY_DELAY, "true"), @r" + .env(EnvVars::UV_TEST_NO_HTTP_RETRY_DELAY, "true"), @" success: false exit_code: 2 ----- stdout ----- @@ -236,7 +236,7 @@ async fn find_links_http_500() { .arg("--find-links") .arg(&mock_server_uri) .env_remove(EnvVars::UV_HTTP_RETRIES) - .env(EnvVars::UV_TEST_NO_HTTP_RETRY_DELAY, "true"), @r" + .env(EnvVars::UV_TEST_NO_HTTP_RETRY_DELAY, "true"), @" success: false exit_code: 2 ----- stdout ----- @@ -264,7 +264,7 @@ async fn find_links_io_error() { .arg("--find-links") .arg(&mock_server_uri) .env_remove(EnvVars::UV_HTTP_RETRIES) - .env(EnvVars::UV_TEST_NO_HTTP_RETRY_DELAY, "true"), @r" + .env(EnvVars::UV_TEST_NO_HTTP_RETRY_DELAY, "true"), @" success: false exit_code: 2 ----- stdout ----- @@ -295,7 +295,7 @@ async fn find_links_mixed_error() { .arg("--find-links") .arg(&mock_server_uri) .env_remove(EnvVars::UV_HTTP_RETRIES) - .env(EnvVars::UV_TEST_NO_HTTP_RETRY_DELAY, "true"), @r" + .env(EnvVars::UV_TEST_NO_HTTP_RETRY_DELAY, "true"), @" success: false exit_code: 2 ----- stdout ----- @@ -324,7 +324,7 @@ async fn direct_url_http_500() { .pip_install() .arg(format!("tqdm @ {tqdm_url}")) .env_remove(EnvVars::UV_HTTP_RETRIES) - .env(EnvVars::UV_TEST_NO_HTTP_RETRY_DELAY, "true"), @r" + .env(EnvVars::UV_TEST_NO_HTTP_RETRY_DELAY, "true"), @" success: false exit_code: 1 ----- stdout ----- @@ -352,7 +352,7 @@ async fn direct_url_io_error() { .pip_install() .arg(format!("tqdm @ {tqdm_url}")) .env_remove(EnvVars::UV_HTTP_RETRIES) - .env(EnvVars::UV_TEST_NO_HTTP_RETRY_DELAY, "true"), @r#" + .env(EnvVars::UV_TEST_NO_HTTP_RETRY_DELAY, "true"), @" success: false exit_code: 1 ----- stdout ----- @@ -364,7 +364,7 @@ async fn direct_url_io_error() { ├─▶ error sending request for url ([SERVER]/packages/d0/30/dc54f88dd4a2b5dc8a0279bdd7270e735851848b762aeb1c1184ed1f6b14/tqdm-4.67.1-py3-none-any.whl) ├─▶ client error (SendRequest) ╰─▶ connection closed before message completed - "#); + "); } /// Check the error message for direct package URL, a streaming request, when the server returns @@ -383,7 +383,7 @@ async fn direct_url_mixed_error() { .pip_install() .arg(format!("tqdm @ {tqdm_url}")) .env_remove(EnvVars::UV_HTTP_RETRIES) - .env(EnvVars::UV_TEST_NO_HTTP_RETRY_DELAY, "true"), @r" + .env(EnvVars::UV_TEST_NO_HTTP_RETRY_DELAY, "true"), @" success: false exit_code: 1 ----- stdout ----- @@ -442,7 +442,7 @@ async fn python_install_http_500() { .arg("--python-downloads-json-url") .arg(python_downloads_json.path()) .env_remove(EnvVars::UV_HTTP_RETRIES) - .env(EnvVars::UV_TEST_NO_HTTP_RETRY_DELAY, "true"), @r" + .env(EnvVars::UV_TEST_NO_HTTP_RETRY_DELAY, "true"), @" success: false exit_code: 1 ----- stdout ----- @@ -474,7 +474,7 @@ async fn python_install_io_error() { .arg("--python-downloads-json-url") .arg(python_downloads_json.path()) .env_remove(EnvVars::UV_HTTP_RETRIES) - .env(EnvVars::UV_TEST_NO_HTTP_RETRY_DELAY, "true"), @r" + .env(EnvVars::UV_TEST_NO_HTTP_RETRY_DELAY, "true"), @" success: false exit_code: 1 ----- stdout ----- @@ -506,7 +506,7 @@ async fn install_http_retries() { .arg("anyio") .arg("--index") .arg(server.uri()) - .env(EnvVars::UV_HTTP_RETRIES, "foo"), @r" + .env(EnvVars::UV_HTTP_RETRIES, "foo"), @" success: false exit_code: 2 ----- stdout ----- @@ -520,7 +520,7 @@ async fn install_http_retries() { .arg("anyio") .arg("--index") .arg(server.uri()) - .env(EnvVars::UV_HTTP_RETRIES, "-1"), @r" + .env(EnvVars::UV_HTTP_RETRIES, "-1"), @" success: false exit_code: 2 ----- stdout ----- @@ -534,7 +534,7 @@ async fn install_http_retries() { .arg("anyio") .arg("--index") .arg(server.uri()) - .env(EnvVars::UV_HTTP_RETRIES, "999999999999"), @r" + .env(EnvVars::UV_HTTP_RETRIES, "999999999999"), @" success: false exit_code: 2 ----- stdout ----- @@ -549,7 +549,7 @@ async fn install_http_retries() { .arg("--index") .arg(server.uri()) .env(EnvVars::UV_HTTP_RETRIES, "5") - .env(EnvVars::UV_TEST_NO_HTTP_RETRY_DELAY, "true"), @r" + .env(EnvVars::UV_TEST_NO_HTTP_RETRY_DELAY, "true"), @" success: false exit_code: 2 ----- stdout ----- @@ -581,7 +581,7 @@ async fn install_http_retry_low_level() { .arg("--index") .arg(server.uri()) .env(EnvVars::UV_HTTP_RETRIES, "1") - .env(EnvVars::UV_TEST_NO_HTTP_RETRY_DELAY, "true"), @r" + .env(EnvVars::UV_TEST_NO_HTTP_RETRY_DELAY, "true"), @" success: false exit_code: 2 ----- stdout ----- @@ -632,7 +632,7 @@ async fn rfc9457_problem_details_license_violation() { uv_snapshot!(filters, context .pip_install() .arg(format!("tqdm @ {tqdm_url}")) - .env_remove(EnvVars::UV_HTTP_RETRIES), @r" + .env_remove(EnvVars::UV_HTTP_RETRIES), @" success: false exit_code: 1 ----- stdout ----- @@ -744,7 +744,7 @@ async fn proxy_valid_url_in_uv_toml() { .env_remove(EnvVars::HTTP_PROXY) .env_remove(EnvVars::HTTPS_PROXY) .env_remove(EnvVars::ALL_PROXY) - .env_remove(EnvVars::NO_PROXY), @r" + .env_remove(EnvVars::NO_PROXY), @" success: true exit_code: 0 ----- stdout ----- @@ -790,7 +790,7 @@ fn proxy_https_proxy_in_uv_toml() { .env_remove(EnvVars::HTTP_PROXY) .env_remove(EnvVars::HTTPS_PROXY) .env_remove(EnvVars::ALL_PROXY) - .env_remove(EnvVars::NO_PROXY), @r" + .env_remove(EnvVars::NO_PROXY), @" success: true exit_code: 0 ----- stdout ----- @@ -849,7 +849,7 @@ no-proxy = ["{target_host}"] .env_remove(EnvVars::HTTP_PROXY) .env_remove(EnvVars::HTTPS_PROXY) .env_remove(EnvVars::ALL_PROXY) - .env_remove(EnvVars::NO_PROXY), @r" + .env_remove(EnvVars::NO_PROXY), @" success: true exit_code: 0 ----- stdout ----- @@ -914,7 +914,7 @@ async fn proxy_schemeless_url_in_uv_toml() { .env_remove(EnvVars::HTTP_PROXY) .env_remove(EnvVars::HTTPS_PROXY) .env_remove(EnvVars::ALL_PROXY) - .env_remove(EnvVars::NO_PROXY), @r" + .env_remove(EnvVars::NO_PROXY), @" success: true exit_code: 0 ----- stdout ----- diff --git a/crates/uv/tests/it/pip_check.rs b/crates/uv/tests/it/pip_check.rs index c23e9031a..6ececc130 100644 --- a/crates/uv/tests/it/pip_check.rs +++ b/crates/uv/tests/it/pip_check.rs @@ -16,7 +16,7 @@ fn check_compatible_packages() -> Result<()> { .pip_install() .arg("-r") .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -30,10 +30,10 @@ fn check_compatible_packages() -> Result<()> { + idna==3.6 + requests==2.31.0 + urllib3==2.2.1 - "### + " ); - uv_snapshot!(context.pip_check(), @r###" + uv_snapshot!(context.pip_check(), @" success: true exit_code: 0 ----- stdout ----- @@ -41,7 +41,7 @@ fn check_compatible_packages() -> Result<()> { ----- stderr ----- Checked 5 packages in [TIME] All installed packages are compatible - "### + " ); Ok(()) @@ -60,7 +60,7 @@ fn check_incompatible_packages() -> Result<()> { .pip_install() .arg("-r") .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -74,7 +74,7 @@ fn check_incompatible_packages() -> Result<()> { + idna==3.6 + requests==2.31.0 + urllib3==2.2.1 - "### + " ); let requirements_txt_idna = context.temp_dir.child("requirements_idna.txt"); @@ -84,7 +84,7 @@ fn check_incompatible_packages() -> Result<()> { .pip_install() .arg("-r") .arg("requirements_idna.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -97,10 +97,10 @@ fn check_incompatible_packages() -> Result<()> { - idna==3.6 + idna==2.4 warning: The package `requests` requires `idna>=2.5,<4`, but `2.4` is installed - "### + " ); - uv_snapshot!(context.pip_check(), @r###" + uv_snapshot!(context.pip_check(), @" success: false exit_code: 1 ----- stdout ----- @@ -109,7 +109,7 @@ fn check_incompatible_packages() -> Result<()> { Checked 5 packages in [TIME] Found 1 incompatibility The package `requests` requires `idna>=2.5,<4`, but `2.4` is installed - "### + " ); Ok(()) @@ -129,7 +129,7 @@ fn check_multiple_incompatible_packages() -> Result<()> { .pip_install() .arg("-r") .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -143,7 +143,7 @@ fn check_multiple_incompatible_packages() -> Result<()> { + idna==3.6 + requests==2.31.0 + urllib3==2.2.1 - "### + " ); let requirements_txt_two = context.temp_dir.child("requirements_two.txt"); @@ -153,7 +153,7 @@ fn check_multiple_incompatible_packages() -> Result<()> { .pip_install() .arg("-r") .arg("requirements_two.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -169,10 +169,10 @@ fn check_multiple_incompatible_packages() -> Result<()> { + urllib3==1.20 warning: The package `requests` requires `idna>=2.5,<4`, but `2.4` is installed warning: The package `requests` requires `urllib3>=1.21.1,<3`, but `1.20` is installed - "### + " ); - uv_snapshot!(context.pip_check(), @r###" + uv_snapshot!(context.pip_check(), @" success: false exit_code: 1 ----- stdout ----- @@ -182,7 +182,7 @@ fn check_multiple_incompatible_packages() -> Result<()> { Found 2 incompatibilities The package `requests` requires `idna>=2.5,<4`, but `2.4` is installed The package `requests` requires `urllib3>=1.21.1,<3`, but `1.20` is installed - "### + " ); Ok(()) @@ -195,7 +195,7 @@ fn check_python_version() { uv_snapshot!(context .pip_install() .arg("urllib3") - .arg("--strict"), @r" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -208,7 +208,7 @@ fn check_python_version() { " ); - uv_snapshot!(context.filters(), context.pip_check().arg("--python-version").arg("3.7"), @r" + uv_snapshot!(context.filters(), context.pip_check().arg("--python-version").arg("3.7"), @" success: false exit_code: 1 ----- stdout ----- diff --git a/crates/uv/tests/it/pip_compile.rs b/crates/uv/tests/it/pip_compile.rs index 6f948b114..7dd6a16d9 100644 --- a/crates/uv/tests/it/pip_compile.rs +++ b/crates/uv/tests/it/pip_compile.rs @@ -28,7 +28,7 @@ fn compile_requirements_in() -> Result<()> { uv_snapshot!(context .pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -43,7 +43,7 @@ fn compile_requirements_in() -> Result<()> { ----- stderr ----- Resolved 3 packages in [TIME] - "###); + "); Ok(()) } @@ -58,7 +58,7 @@ fn compile_requirements_in_annotation_line() -> Result<()> { uv_snapshot!(context .pip_compile() .arg("--annotation-style=line") - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -70,7 +70,7 @@ fn compile_requirements_in_annotation_line() -> Result<()> { ----- stderr ----- Resolved 3 packages in [TIME] - "###); + "); Ok(()) } @@ -86,7 +86,7 @@ fn compile_requirements_in_stdin() -> Result<()> { uv_snapshot!(context .pip_compile() .stdin(fs::File::open(requirements_in)?) - .arg("-"), @r###" + .arg("-"), @" success: true exit_code: 0 ----- stdout ----- @@ -100,7 +100,7 @@ fn compile_requirements_in_stdin() -> Result<()> { ----- stderr ----- Resolved 3 packages in [TIME] - "###); + "); Ok(()) } @@ -111,14 +111,14 @@ fn missing_requirements_in() { let requirements_in = context.temp_dir.child("requirements.in"); uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: File not found: `requirements.in` - "### + " ); requirements_in.assert(predicates::path::missing()); @@ -131,7 +131,7 @@ fn missing_venv() -> Result<()> { fs_err::remove_dir_all(context.venv.path())?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -141,7 +141,7 @@ fn missing_venv() -> Result<()> { ----- stderr ----- warning: Requirements file `requirements.in` does not contain any dependencies Resolved in [TIME] - "### + " ); context.venv.assert(predicates::path::missing()); @@ -161,7 +161,7 @@ fn empty_output() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") .arg("--output-file") - .arg("requirements.txt"), @r###" + .arg("requirements.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -172,7 +172,7 @@ fn empty_output() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); Ok(()) @@ -197,7 +197,7 @@ dependencies = [ )?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("pyproject.toml"), @r###" + .arg("pyproject.toml"), @" success: true exit_code: 0 ----- stdout ----- @@ -212,7 +212,7 @@ dependencies = [ ----- stderr ----- Resolved 3 packages in [TIME] - "### + " ); Ok(()) @@ -238,7 +238,7 @@ dependencies = [ )?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("pyproject.toml"), @r###" + .arg("pyproject.toml"), @" success: true exit_code: 0 ----- stdout ----- @@ -253,7 +253,7 @@ dependencies = [ ----- stderr ----- Resolved 3 packages in [TIME] - "### + " ); Ok(()) @@ -279,7 +279,7 @@ dependencies = [ uv_snapshot!(context.filters(), context.pip_compile() .arg("--annotation-style=line") - .arg("pyproject.toml"), @r###" + .arg("pyproject.toml"), @" success: true exit_code: 0 ----- stdout ----- @@ -291,7 +291,7 @@ dependencies = [ ----- stderr ----- Resolved 3 packages in [TIME] - "### + " ); Ok(()) @@ -315,7 +315,7 @@ fn compile_pyproject_toml_eager_validation() -> Result<()> { // This should fail without attempting to build the package. uv_snapshot!(context .pip_compile() - .arg("pyproject.toml"), @r###" + .arg("pyproject.toml"), @" success: false exit_code: 2 ----- stdout ----- @@ -323,7 +323,7 @@ fn compile_pyproject_toml_eager_validation() -> Result<()> { ----- stderr ----- error: Failed to parse entry: `anyio` Caused by: `anyio` references a workspace in `tool.uv.sources` (e.g., `anyio = { workspace = true }`), but is not a workspace member - "###); + "); Ok(()) } @@ -341,7 +341,7 @@ fn compile_constraints_txt() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") .arg("--constraint") - .arg("constraints.txt"), @r###" + .arg("constraints.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -358,7 +358,7 @@ fn compile_constraints_txt() -> Result<()> { ----- stderr ----- Resolved 3 packages in [TIME] - "### + " ); Ok(()) @@ -376,7 +376,7 @@ fn compile_constraints_inline() -> Result<()> { constraints_txt.write_str("idna<3.4")?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -385,7 +385,7 @@ fn compile_constraints_inline() -> Result<()> { ----- stderr ----- Resolved in [TIME] - "### + " ); Ok(()) @@ -408,7 +408,7 @@ fn compile_constraints_markers() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") .arg("--constraint") - .arg("constraints.txt"), @r###" + .arg("constraints.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -425,7 +425,7 @@ fn compile_constraints_markers() -> Result<()> { ----- stderr ----- Resolved 3 packages in [TIME] - "### + " ); Ok(()) @@ -447,7 +447,7 @@ fn compile_constraint_extra() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") .arg("--constraint") - .arg("constraints.txt"), @r###" + .arg("constraints.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -474,7 +474,7 @@ fn compile_constraint_extra() -> Result<()> { ----- stderr ----- Resolved 7 packages in [TIME] - "### + " ); Ok(()) @@ -528,7 +528,7 @@ portalocker==2.5.1 .arg("line") .arg("--python-version") .arg("3.10") - .arg("--universal"), @r###" + .arg("--universal"), @" success: true exit_code: 0 ----- stdout ----- @@ -684,7 +684,7 @@ portalocker==2.5.1 ----- stderr ----- Resolved 149 packages in [TIME] - "### + " ); Ok(()) @@ -712,7 +712,7 @@ optional-dependencies.foo = [ uv_snapshot!(context.filters(), context.pip_compile() .arg("pyproject.toml") .arg("--extra") - .arg("foo"), @r###" + .arg("foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -727,7 +727,7 @@ optional-dependencies.foo = [ ----- stderr ----- Resolved 3 packages in [TIME] - "### + " ); Ok(()) @@ -755,7 +755,7 @@ optional-dependencies."FrIeNdLy-._.-bArD" = [ uv_snapshot!(context.filters(), context.pip_compile() .arg("pyproject.toml") .arg("--extra") - .arg("FRiENDlY-...-_-BARd"), @r###" + .arg("FRiENDlY-...-_-BARd"), @" success: true exit_code: 0 ----- stdout ----- @@ -770,7 +770,7 @@ optional-dependencies."FrIeNdLy-._.-bArD" = [ ----- stderr ----- Resolved 3 packages in [TIME] - "### + " ); Ok(()) @@ -798,14 +798,14 @@ optional-dependencies.foo = [ uv_snapshot!(context.filters(), context.pip_compile() .arg("pyproject.toml") .arg("--extra") - .arg("bar"), @r###" + .arg("bar"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: Requested extra not found: bar - "### + " ); Ok(()) @@ -840,7 +840,7 @@ build-backend = "poetry.core.masonry.api" uv_snapshot!(context.filters(), context.pip_compile() .arg("pyproject.toml") .arg("--extra") - .arg("test"), @r###" + .arg("test"), @" success: true exit_code: 0 ----- stdout ----- @@ -863,7 +863,7 @@ build-backend = "poetry.core.masonry.api" ----- stderr ----- Resolved 7 packages in [TIME] - "### + " ); Ok(()) @@ -899,7 +899,7 @@ build-backend = "poetry.core.masonry.api" )?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("pyproject.toml"), @r###" + .arg("pyproject.toml"), @" success: true exit_code: 0 ----- stdout ----- @@ -914,7 +914,7 @@ build-backend = "poetry.core.masonry.api" ----- stderr ----- Resolved 3 packages in [TIME] - "### + " ); Ok(()) @@ -954,7 +954,7 @@ build-backend = "poetry.core.masonry.api" )?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("pyproject.toml"), @r###" + .arg("pyproject.toml"), @" success: false exit_code: 2 ----- stdout ----- @@ -966,8 +966,7 @@ build-backend = "poetry.core.masonry.api" 13 | [project.dependencies] | ^^^^^^^^^^^^^^^^^^^^^^ invalid type: map, expected a sequence - - "### + " ); Ok(()) @@ -1015,7 +1014,7 @@ setup( uv_snapshot!(context.filters(), context.pip_compile() .arg("pyproject.toml") .arg("--extra") - .arg("dev"), @r###" + .arg("dev"), @" success: true exit_code: 0 ----- stdout ----- @@ -1032,7 +1031,7 @@ setup( ----- stderr ----- Resolved 4 packages in [TIME] - "### + " ); Ok(()) @@ -1073,7 +1072,7 @@ setup( uv_snapshot!(context.filters(), context.pip_compile() .arg("setup.cfg") .arg("--extra") - .arg("dev"), @r###" + .arg("dev"), @" success: true exit_code: 0 ----- stdout ----- @@ -1090,7 +1089,7 @@ setup( ----- stderr ----- Resolved 4 packages in [TIME] - "### + " ); Ok(()) @@ -1121,7 +1120,7 @@ setup( uv_snapshot!(context.filters(), context.pip_compile() .arg("setup.py") .arg("--extra") - .arg("dev"), @r###" + .arg("dev"), @" success: true exit_code: 0 ----- stdout ----- @@ -1138,7 +1137,7 @@ setup( ----- stderr ----- Resolved 4 packages in [TIME] - "### + " ); Ok(()) @@ -1162,7 +1161,7 @@ dependencies = [ )?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("pyproject.toml"), @r###" + .arg("pyproject.toml"), @r#" success: false exit_code: 2 ----- stdout ----- @@ -1174,8 +1173,7 @@ dependencies = [ 5 | name = "!project" | ^^^^^^^^^^ Not a valid package or extra name: "!project". Names must start and end with a letter or digit and may only contain -, _, ., and alphanumeric characters. - - "### + "# ); Ok(()) @@ -1207,14 +1205,14 @@ optional-dependencies.foo = [ .arg("--extra") .arg("bar") .arg("--extra") - .arg("foobar"), @r###" + .arg("foobar"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: Requested extras not found: bar, foobar - "### + " ); Ok(()) @@ -1230,14 +1228,14 @@ fn compile_requirements_file_extra() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") .arg("--all-extras"), - @r###" + @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: Requesting extras requires a `pyproject.toml`, `setup.cfg`, or `setup.py` file. - "### + " ); Ok(()) @@ -1264,7 +1262,7 @@ optional-dependencies.foo = [ uv_snapshot!(context.filters(), context.pip_compile() .arg("pyproject.toml") .arg("--extra") - .arg("invalid name!"), @r###" + .arg("invalid name!"), @" success: false exit_code: 2 ----- stdout ----- @@ -1273,7 +1271,7 @@ optional-dependencies.foo = [ error: invalid value 'invalid name!' for '--extra ': Extra names must start and end with a letter or digit and may only contain -, _, ., and alphanumeric characters For more information, try '--help'. - "### + " ); Ok(()) @@ -1289,7 +1287,7 @@ fn compile_python_312() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") .arg("--python-version") - .arg("3.12"), @r###" + .arg("3.12"), @" success: true exit_code: 0 ----- stdout ----- @@ -1310,14 +1308,14 @@ fn compile_python_312() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] - "### + " ); // This should work with the short flag uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") .arg("-p") - .arg("3.12"), @r###" + .arg("3.12"), @" success: true exit_code: 0 ----- stdout ----- @@ -1338,14 +1336,14 @@ fn compile_python_312() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] - "### + " ); // And `--python` uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") .arg("--python") - .arg("3.12"), @r###" + .arg("3.12"), @" success: true exit_code: 0 ----- stdout ----- @@ -1366,13 +1364,13 @@ fn compile_python_312() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] - "### + " ); // And `UV_PYTHON` uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") - .env(EnvVars::UV_PYTHON, "3.12"), @r###" + .env(EnvVars::UV_PYTHON, "3.12"), @" success: true exit_code: 0 ----- stdout ----- @@ -1393,7 +1391,7 @@ fn compile_python_312() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] - "### + " ); Ok(()) @@ -1410,7 +1408,7 @@ fn compile_python_312_annotation_line() -> Result<()> { .arg("--annotation-style=line") .arg("requirements.in") .arg("--python-version") - .arg("3.12"), @r###" + .arg("3.12"), @" success: true exit_code: 0 ----- stdout ----- @@ -1425,7 +1423,7 @@ fn compile_python_312_annotation_line() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] - "### + " ); Ok(()) @@ -1441,7 +1439,7 @@ fn compile_fallback_interpreter() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") .arg("--python-version") - .arg("3.12"), @r###" + .arg("3.12"), @" success: true exit_code: 0 ----- stdout ----- @@ -1463,14 +1461,14 @@ fn compile_fallback_interpreter() -> Result<()> { ----- stderr ----- warning: The requested Python version 3.12 is not available; 3.10.[X] will be used to build dependencies instead. Resolved 6 packages in [TIME] - "### + " ); // This should work for the short flag too uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") .arg("-p") - .arg("3.12"), @r###" + .arg("3.12"), @" success: true exit_code: 0 ----- stdout ----- @@ -1492,13 +1490,13 @@ fn compile_fallback_interpreter() -> Result<()> { ----- stderr ----- warning: The requested Python version 3.12 is not available; 3.10.[X] will be used to build dependencies instead. Resolved 6 packages in [TIME] - "### + " ); // And for `UV_PYTHON` uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") - .env(EnvVars::UV_PYTHON, "3.12"), @r###" + .env(EnvVars::UV_PYTHON, "3.12"), @" success: true exit_code: 0 ----- stdout ----- @@ -1520,14 +1518,14 @@ fn compile_fallback_interpreter() -> Result<()> { ----- stderr ----- warning: The requested Python version 3.12 is not available; 3.10.[X] will be used to build dependencies instead. Resolved 6 packages in [TIME] - "### + " ); // And for `--python` uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") .arg("--python") - .arg("3.12"), @r###" + .arg("3.12"), @" success: true exit_code: 0 ----- stdout ----- @@ -1549,14 +1547,14 @@ fn compile_fallback_interpreter() -> Result<()> { ----- stderr ----- warning: The requested Python version 3.12 is not available; 3.10.[X] will be used to build dependencies instead. Resolved 6 packages in [TIME] - "### + " ); // We also allow requesting alternative implementations, but we should fail if we can't find it uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") .arg("-p") - .arg("pypy"), @r" + .arg("pypy"), @" success: false exit_code: 2 ----- stdout ----- @@ -1572,7 +1570,7 @@ fn compile_fallback_interpreter() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") .arg("-p") - .arg(">=3.12"), @r" + .arg(">=3.12"), @" success: false exit_code: 2 ----- stdout ----- @@ -1599,7 +1597,7 @@ fn compile_python_conflicts() -> Result<()> { .arg("--python") .arg("3.12") .arg("-p") - .arg("3.12"), @r" + .arg("3.12"), @" success: false exit_code: 2 ----- stdout ----- @@ -1618,7 +1616,7 @@ fn compile_python_conflicts() -> Result<()> { .arg("requirements.in") .arg("-p") .arg("3.12") - .env(EnvVars::UV_PYTHON, "3.11"), @r###" + .env(EnvVars::UV_PYTHON, "3.11"), @" success: true exit_code: 0 ----- stdout ----- @@ -1639,7 +1637,7 @@ fn compile_python_conflicts() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] - "### + " ); // `UV_PYTHON` should be usable with `--python` @@ -1647,7 +1645,7 @@ fn compile_python_conflicts() -> Result<()> { .arg("requirements.in") .arg("--python") .arg("3.12") - .env(EnvVars::UV_PYTHON, "3.11"), @r###" + .env(EnvVars::UV_PYTHON, "3.11"), @" success: true exit_code: 0 ----- stdout ----- @@ -1668,7 +1666,7 @@ fn compile_python_conflicts() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] - "### + " ); // `UV_PYTHON` should be usable with `--python-version` @@ -1676,7 +1674,7 @@ fn compile_python_conflicts() -> Result<()> { .arg("requirements.in") .arg("--python-version") .arg("3.12") - .env(EnvVars::UV_PYTHON, "3.11"), @r###" + .env(EnvVars::UV_PYTHON, "3.11"), @" success: true exit_code: 0 ----- stdout ----- @@ -1697,7 +1695,7 @@ fn compile_python_conflicts() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] - "### + " ); Ok(()) @@ -1717,7 +1715,7 @@ fn compile_python_build_version_different_than_target() -> Result<()> { .arg("3.12") .arg("-p") .arg("3.11") - .env_remove(EnvVars::VIRTUAL_ENV), @r###" + .env_remove(EnvVars::VIRTUAL_ENV), @" success: true exit_code: 0 ----- stdout ----- @@ -1738,7 +1736,7 @@ fn compile_python_build_version_different_than_target() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] - "### + " ); uv_snapshot!(context.filters(), context.pip_compile() @@ -1747,7 +1745,7 @@ fn compile_python_build_version_different_than_target() -> Result<()> { .arg("3.12") .arg("-p") .arg("cpython@3.11") - .env_remove(EnvVars::VIRTUAL_ENV), @r###" + .env_remove(EnvVars::VIRTUAL_ENV), @" success: true exit_code: 0 ----- stdout ----- @@ -1768,7 +1766,7 @@ fn compile_python_build_version_different_than_target() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] - "### + " ); // If we can't find the interpreter, we fail @@ -1778,7 +1776,7 @@ fn compile_python_build_version_different_than_target() -> Result<()> { .arg("3.12") .arg("-p") .arg("pypy@3.11") - .env_remove(EnvVars::VIRTUAL_ENV), @r" + .env_remove(EnvVars::VIRTUAL_ENV), @" success: false exit_code: 2 ----- stdout ----- @@ -1796,7 +1794,7 @@ fn compile_python_build_version_different_than_target() -> Result<()> { .arg("3.12") .arg("-p") .arg("3.13") - .env_remove(EnvVars::VIRTUAL_ENV), @r" + .env_remove(EnvVars::VIRTUAL_ENV), @" success: false exit_code: 2 ----- stdout ----- @@ -1814,7 +1812,7 @@ fn compile_python_build_version_different_than_target() -> Result<()> { .arg("--python-version") .arg("3.12") .env(EnvVars::UV_PYTHON, "3.11") - .env_remove(EnvVars::VIRTUAL_ENV), @r###" + .env_remove(EnvVars::VIRTUAL_ENV), @" success: true exit_code: 0 ----- stdout ----- @@ -1835,7 +1833,7 @@ fn compile_python_build_version_different_than_target() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] - "### + " ); // `UV_PYTHON` is ignored if `--python-version` is set @@ -1844,7 +1842,7 @@ fn compile_python_build_version_different_than_target() -> Result<()> { .arg("--python-version") .arg("3.12") .env(EnvVars::UV_PYTHON, "pypy") - .env_remove(EnvVars::VIRTUAL_ENV), @r###" + .env_remove(EnvVars::VIRTUAL_ENV), @" success: true exit_code: 0 ----- stdout ----- @@ -1865,7 +1863,7 @@ fn compile_python_build_version_different_than_target() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] - "### + " ); Ok(()) @@ -1900,7 +1898,7 @@ fn compile_fallback_interpreter_broken_in_path() -> Result<()> { .arg("--python-version") .arg("3.12") // In tests, we ignore `PATH` during Python discovery so we need to add the context `bin` - .env(EnvVars::UV_TEST_PYTHON_PATH, context.bin_dir.as_os_str()), @r###" + .env(EnvVars::UV_TEST_PYTHON_PATH, context.bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -1922,7 +1920,7 @@ fn compile_fallback_interpreter_broken_in_path() -> Result<()> { ----- stderr ----- warning: The requested Python version 3.12 is not available; 3.10.[X] will be used to build dependencies instead. Resolved 6 packages in [TIME] - "### + " ); Ok(()) @@ -1939,7 +1937,7 @@ fn compile_python_312_no_deps() -> Result<()> { .arg("requirements.in") .arg("--no-deps") .arg("--python-version") - .arg("3.12"), @r###" + .arg("3.12"), @" success: true exit_code: 0 ----- stdout ----- @@ -1950,7 +1948,7 @@ fn compile_python_312_no_deps() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); Ok(()) @@ -1978,7 +1976,7 @@ fn compile_python_37() -> Result<()> { uv_snapshot!(filters, context.pip_compile() .arg("requirements.in") .arg("--python-version") - .arg("3.7"), @r###" + .arg("3.7"), @" success: false exit_code: 1 ----- stdout ----- @@ -1989,7 +1987,7 @@ fn compile_python_37() -> Result<()> { And because you require black==23.10.1, we can conclude that your requirements are unsatisfiable. hint: The `--python-version` value (>=3.7) includes Python versions that are not supported by your dependencies (e.g., black==23.10.1 only supports >=3.8). Consider using a higher `--python-version` value. - "###); + "); Ok(()) } @@ -2006,7 +2004,7 @@ fn compile_sdist_resolution_lowest() -> Result<()> { .arg("requirements.in") .arg("--resolution=lowest-direct") .arg("--python-version") - .arg("3.12"), @r###" + .arg("3.12"), @" success: true exit_code: 0 ----- stdout ----- @@ -2021,7 +2019,7 @@ fn compile_sdist_resolution_lowest() -> Result<()> { ----- stderr ----- Resolved 3 packages in [TIME] - "### + " ); Ok(()) @@ -2037,7 +2035,7 @@ fn compile_python_invalid_version() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") .arg("--python-version") - .arg("3.7.x"), @r###" + .arg("3.7.x"), @" success: false exit_code: 2 ----- stdout ----- @@ -2046,7 +2044,7 @@ fn compile_python_invalid_version() -> Result<()> { error: invalid value '3.7.x' for '--python-version ': Python version `3.7.x` could not be parsed: after parsing `3.7`, found `.x`, which is not part of a valid version For more information, try '--help'. - "### + " ); Ok(()) @@ -2062,7 +2060,7 @@ fn compile_python_dev_version() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") .arg("--python-version") - .arg("3.7-dev"), @r###" + .arg("3.7-dev"), @" success: false exit_code: 2 ----- stdout ----- @@ -2071,7 +2069,7 @@ fn compile_python_dev_version() -> Result<()> { error: invalid value '3.7-dev' for '--python-version ': Python version `3.7-dev` is a development release For more information, try '--help'. - "### + " ); Ok(()) @@ -2091,7 +2089,7 @@ fn omit_non_matching_annotation() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") .arg("-c") - .arg("constraints.txt"), @r###" + .arg("constraints.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -2106,7 +2104,7 @@ fn omit_non_matching_annotation() -> Result<()> { ----- stderr ----- Resolved 3 packages in [TIME] - "### + " ); Ok(()) @@ -2124,7 +2122,7 @@ fn compile_numpy_py38() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") - .arg("--no-build"), @r###" + .arg("--no-build"), @" success: true exit_code: 0 ----- stdout ----- @@ -2135,7 +2133,7 @@ fn compile_numpy_py38() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); Ok(()) @@ -2149,7 +2147,7 @@ fn compile_wheel_url_dependency() -> Result<()> { requirements_in.write_str("flask @ https://files.pythonhosted.org/packages/36/42/015c23096649b908c809c69388a805a571a3bea44362fe87e33fc3afa01f/flask-3.0.0-py3-none-any.whl")?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -2174,7 +2172,7 @@ fn compile_wheel_url_dependency() -> Result<()> { ----- stderr ----- Resolved 7 packages in [TIME] - "### + " ); Ok(()) @@ -2190,7 +2188,7 @@ fn compile_sdist_url_dependency() -> Result<()> { requirements_in.write_str("flask @ https://files.pythonhosted.org/packages/d8/09/c1a7354d3925a3c6c8cfdebf4245bae67d633ffda1ba415add06ffc839c5/flask-3.0.0.tar.gz")?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -2215,7 +2213,7 @@ fn compile_sdist_url_dependency() -> Result<()> { ----- stderr ----- Resolved 7 packages in [TIME] - "### + " ); Ok(()) @@ -2238,7 +2236,7 @@ fn compile_git_https_dependency() -> Result<()> { .collect(); uv_snapshot!(filters, context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -2249,7 +2247,7 @@ fn compile_git_https_dependency() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "###); + "); Ok(()) } @@ -2265,7 +2263,7 @@ fn compile_git_branch_https_dependency() -> Result<()> { )?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -2276,7 +2274,7 @@ fn compile_git_branch_https_dependency() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); Ok(()) @@ -2293,7 +2291,7 @@ fn compile_git_tag_https_dependency() -> Result<()> { )?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -2304,7 +2302,7 @@ fn compile_git_tag_https_dependency() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); Ok(()) @@ -2323,7 +2321,7 @@ fn compile_git_date_tag_https_dependency() -> Result<()> { )?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -2334,7 +2332,7 @@ fn compile_git_date_tag_https_dependency() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); Ok(()) @@ -2351,7 +2349,7 @@ fn compile_git_long_commit_https_dependency() -> Result<()> { )?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -2362,7 +2360,7 @@ fn compile_git_long_commit_https_dependency() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); Ok(()) @@ -2379,7 +2377,7 @@ fn compile_git_short_commit_https_dependency() -> Result<()> { )?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -2390,7 +2388,7 @@ fn compile_git_short_commit_https_dependency() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); Ok(()) @@ -2406,7 +2404,7 @@ fn compile_git_refs_https_dependency() -> Result<()> { .write_str("uv-public-pypackage @ git+https://github.com/astral-test/uv-public-pypackage@refs/pull/4/head")?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -2417,7 +2415,7 @@ fn compile_git_refs_https_dependency() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); Ok(()) @@ -2432,7 +2430,7 @@ fn compile_git_subdirectory_dependency() -> Result<()> { requirements_in.write_str("example-pkg-a @ git+https://github.com/pypa/sample-namespace-packages.git@df7530eeb8fa0cb7dbb8ecb28363e8e36bfa2f45#subdirectory=pkg_resources/pkg_a")?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -2443,7 +2441,7 @@ fn compile_git_subdirectory_dependency() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); Ok(()) @@ -2459,7 +2457,7 @@ fn compile_git_concurrent_access() -> Result<()> { .write_str("example-pkg-a @ git+https://github.com/pypa/sample-namespace-packages.git@df7530eeb8fa0cb7dbb8ecb28363e8e36bfa2f45#subdirectory=pkg_resources/pkg_a\nexample-pkg-b @ git+https://github.com/pypa/sample-namespace-packages.git@df7530eeb8fa0cb7dbb8ecb28363e8e36bfa2f45#subdirectory=pkg_resources/pkg_b")?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -2472,7 +2470,7 @@ fn compile_git_concurrent_access() -> Result<()> { ----- stderr ----- Resolved 2 packages in [TIME] - "### + " ); Ok(()) @@ -2488,7 +2486,7 @@ fn compile_git_unnamed_concurrent_access() -> Result<()> { .write_str("git+https://github.com/pypa/sample-namespace-packages.git@df7530eeb8fa0cb7dbb8ecb28363e8e36bfa2f45#subdirectory=pkg_resources/pkg_a\ngit+https://github.com/pypa/sample-namespace-packages.git@df7530eeb8fa0cb7dbb8ecb28363e8e36bfa2f45#subdirectory=pkg_resources/pkg_b")?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -2501,7 +2499,7 @@ fn compile_git_unnamed_concurrent_access() -> Result<()> { ----- stderr ----- Resolved 2 packages in [TIME] - "### + " ); Ok(()) @@ -2517,7 +2515,7 @@ fn compile_git_mismatched_name() -> Result<()> { .write_str("flask @ git+https://github.com/pallets/flask.git@2.0.0\ndask @ git+https://github.com/pallets/flask.git@3.0.0")?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: false exit_code: 1 ----- stdout ----- @@ -2525,7 +2523,7 @@ fn compile_git_mismatched_name() -> Result<()> { ----- stderr ----- × Failed to download and build `dask @ git+https://github.com/pallets/flask.git@3.0.0` ╰─▶ Package metadata name `flask` does not match given name `dask` - "### + " ); Ok(()) @@ -2542,7 +2540,7 @@ fn compile_git_subdirectory_static_metadata() -> Result<()> { requirements_in.write_str("uv-public-pypackage @ git+https://github.com/astral-test/uv-workspace-pypackage#subdirectory=uv-public-pypackage")?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -2553,7 +2551,7 @@ fn compile_git_subdirectory_static_metadata() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); Ok(()) @@ -2568,7 +2566,7 @@ fn mixed_url_dependency() -> Result<()> { requirements_in.write_str("flask==3.0.0\nwerkzeug @ https://files.pythonhosted.org/packages/c3/fc/254c3e9b5feb89ff5b9076a23218dafbc99c96ac5941e900b71206e6313b/werkzeug-3.0.1-py3-none-any.whl")?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -2595,7 +2593,7 @@ fn mixed_url_dependency() -> Result<()> { ----- stderr ----- Resolved 7 packages in [TIME] - "### + " ); Ok(()) @@ -2610,7 +2608,7 @@ fn conflicting_direct_url_dependency() -> Result<()> { requirements_in.write_str("werkzeug==3.0.0\nwerkzeug @ https://files.pythonhosted.org/packages/ff/1d/960bb4017c68674a1cb099534840f18d3def3ce44aed12b5ed8b78e0153e/Werkzeug-2.0.0-py3-none-any.whl")?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: false exit_code: 1 ----- stdout ----- @@ -2618,7 +2616,7 @@ fn conflicting_direct_url_dependency() -> Result<()> { ----- stderr ----- × No solution found when resolving dependencies: ╰─▶ Because there is no version of werkzeug==3.0.0 and you require werkzeug==3.0.0, we can conclude that your requirements are unsatisfiable. - "### + " ); Ok(()) @@ -2633,7 +2631,7 @@ fn compatible_direct_url_dependency() -> Result<()> { requirements_in.write_str("werkzeug==2.0.0\nwerkzeug @ https://files.pythonhosted.org/packages/ff/1d/960bb4017c68674a1cb099534840f18d3def3ce44aed12b5ed8b78e0153e/Werkzeug-2.0.0-py3-none-any.whl")?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -2644,7 +2642,7 @@ fn compatible_direct_url_dependency() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); Ok(()) @@ -2658,7 +2656,7 @@ fn conflicting_repeated_url_dependency_version_mismatch() -> Result<()> { requirements_in.write_str("werkzeug @ https://files.pythonhosted.org/packages/bd/24/11c3ea5a7e866bf2d97f0501d0b4b1c9bbeade102bb4b588f0d2919a5212/Werkzeug-2.0.1-py3-none-any.whl\nwerkzeug @ https://files.pythonhosted.org/packages/ff/1d/960bb4017c68674a1cb099534840f18d3def3ce44aed12b5ed8b78e0153e/Werkzeug-2.0.0-py3-none-any.whl")?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: false exit_code: 2 ----- stdout ----- @@ -2667,7 +2665,7 @@ fn conflicting_repeated_url_dependency_version_mismatch() -> Result<()> { error: Requirements contain conflicting URLs for package `werkzeug`: - https://files.pythonhosted.org/packages/bd/24/11c3ea5a7e866bf2d97f0501d0b4b1c9bbeade102bb4b588f0d2919a5212/Werkzeug-2.0.1-py3-none-any.whl - https://files.pythonhosted.org/packages/ff/1d/960bb4017c68674a1cb099534840f18d3def3ce44aed12b5ed8b78e0153e/Werkzeug-2.0.0-py3-none-any.whl - "### + " ); Ok(()) @@ -2685,7 +2683,7 @@ fn conflicting_repeated_url_dependency_markers() -> Result<()> { "})?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -2696,7 +2694,7 @@ fn conflicting_repeated_url_dependency_markers() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); Ok(()) @@ -2713,7 +2711,7 @@ fn conflicting_repeated_url_dependency_version_match() -> Result<()> { requirements_in.write_str("werkzeug @ git+https://github.com/pallets/werkzeug.git@2.0.0\nwerkzeug @ https://files.pythonhosted.org/packages/ff/1d/960bb4017c68674a1cb099534840f18d3def3ce44aed12b5ed8b78e0153e/Werkzeug-2.0.0-py3-none-any.whl")?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: false exit_code: 2 ----- stdout ----- @@ -2722,7 +2720,7 @@ fn conflicting_repeated_url_dependency_version_match() -> Result<()> { error: Requirements contain conflicting URLs for package `werkzeug`: - git+https://github.com/pallets/werkzeug.git@2.0.0 - https://files.pythonhosted.org/packages/ff/1d/960bb4017c68674a1cb099534840f18d3def3ce44aed12b5ed8b78e0153e/Werkzeug-2.0.0-py3-none-any.whl - "### + " ); Ok(()) @@ -2736,7 +2734,7 @@ fn conflicting_transitive_url_dependency() -> Result<()> { requirements_in.write_str("flask==3.0.0\nwerkzeug @ https://files.pythonhosted.org/packages/ff/1d/960bb4017c68674a1cb099534840f18d3def3ce44aed12b5ed8b78e0153e/Werkzeug-2.0.0-py3-none-any.whl")?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: false exit_code: 1 ----- stdout ----- @@ -2745,7 +2743,7 @@ fn conflicting_transitive_url_dependency() -> Result<()> { × No solution found when resolving dependencies: ╰─▶ Because only werkzeug<3.0.0 is available and flask==3.0.0 depends on werkzeug>=3.0.0, we can conclude that flask==3.0.0 cannot be used. And because you require flask==3.0.0, we can conclude that your requirements are unsatisfiable. - "### + " ); Ok(()) @@ -2763,7 +2761,7 @@ fn compatible_repeated_url_dependency() -> Result<()> { "})?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -2774,7 +2772,7 @@ fn compatible_repeated_url_dependency() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); Ok(()) @@ -2793,7 +2791,7 @@ fn conflicting_repeated_url_dependency() -> Result<()> { "})?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: false exit_code: 2 ----- stdout ----- @@ -2802,7 +2800,7 @@ fn conflicting_repeated_url_dependency() -> Result<()> { error: Requirements contain conflicting URLs for package `uv-public-pypackage`: - git+https://github.com/astral-test/uv-public-pypackage.git@0.0.1 - git+https://github.com/astral-test/uv-public-pypackage.git@0.0.2 - "### + " ); Ok(()) @@ -2822,7 +2820,7 @@ fn compatible_narrowed_url_dependency() -> Result<()> { "})?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -2833,7 +2831,7 @@ fn compatible_narrowed_url_dependency() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); Ok(()) @@ -2853,7 +2851,7 @@ fn compatible_broader_url_dependency() -> Result<()> { "})?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -2864,7 +2862,7 @@ fn compatible_broader_url_dependency() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); Ok(()) @@ -2883,7 +2881,7 @@ fn compatible_repeated_narrowed_url_dependency() -> Result<()> { "})?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -2894,7 +2892,7 @@ fn compatible_repeated_narrowed_url_dependency() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); Ok(()) @@ -2917,7 +2915,7 @@ fn incompatible_narrowed_url_dependency() -> Result<()> { "})?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r" + .arg("requirements.in"), @" success: false exit_code: 2 ----- stdout ----- @@ -2942,7 +2940,7 @@ fn allowed_transitive_git_dependency() -> Result<()> { requirements_in.write_str("hatchling_editable @ https://github.com/astral-sh/uv/files/14762645/hatchling_editable.zip")?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -2955,7 +2953,7 @@ fn allowed_transitive_git_dependency() -> Result<()> { ----- stderr ----- Resolved 2 packages in [TIME] - "### + " ); Ok(()) @@ -2977,7 +2975,7 @@ fn allowed_transitive_url_dependency() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") .arg("--constraint") - .arg("constraints.txt"), @r###" + .arg("constraints.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -2992,7 +2990,7 @@ fn allowed_transitive_url_dependency() -> Result<()> { ----- stderr ----- Resolved 2 packages in [TIME] - "### + " ); Ok(()) @@ -3015,7 +3013,7 @@ fn allowed_transitive_canonical_url_dependency() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") .arg("--constraint") - .arg("constraints.txt"), @r###" + .arg("constraints.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -3030,7 +3028,7 @@ fn allowed_transitive_canonical_url_dependency() -> Result<()> { ----- stderr ----- Resolved 2 packages in [TIME] - "### + " ); Ok(()) @@ -3049,7 +3047,7 @@ fn allowed_transitive_url_path_dependency() -> Result<()> { let hatchling_path = current_dir()?.join("../../test/packages/hatchling_editable"); uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") - .env(EnvVars::HATCH_PATH, hatchling_path.as_os_str()), @r###" + .env(EnvVars::HATCH_PATH, hatchling_path.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -3062,7 +3060,7 @@ fn allowed_transitive_url_path_dependency() -> Result<()> { ----- stderr ----- Resolved 2 packages in [TIME] - "### + " ); Ok(()) @@ -3088,7 +3086,7 @@ fn requirement_constraint_override_url() -> Result<()> { .arg("--constraint") .arg("constraints.txt") .arg("--override") - .arg("overrides.txt"), @r###" + .arg("overrides.txt"), @" success: false exit_code: 1 ----- stdout ----- @@ -3096,7 +3094,7 @@ fn requirement_constraint_override_url() -> Result<()> { ----- stderr ----- × No solution found when resolving dependencies: ╰─▶ Because there is no version of anyio==3.7.0 and you require anyio==3.7.0, we can conclude that your requirements are unsatisfiable. - "### + " ); Ok(()) @@ -3118,7 +3116,7 @@ fn requirement_override_prerelease() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") .arg("--override") - .arg("overrides.txt"), @r###" + .arg("overrides.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -3141,7 +3139,7 @@ fn requirement_override_prerelease() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] - "### + " ); Ok(()) @@ -3171,7 +3169,7 @@ optional-dependencies.bar = [ uv_snapshot!(context.filters(), context.pip_compile() .arg("pyproject.toml") - .arg("--all-extras"), @r###" + .arg("--all-extras"), @" success: true exit_code: 0 ----- stdout ----- @@ -3198,7 +3196,7 @@ optional-dependencies.bar = [ ----- stderr ----- Resolved 7 packages in [TIME] - "### + " ); Ok(()) @@ -3228,7 +3226,7 @@ optional-dependencies.bar = [ uv_snapshot!(context.filters(), context.pip_compile() .arg("--annotation-style=line") .arg("pyproject.toml") - .arg("--all-extras"), @r###" + .arg("--all-extras"), @" success: true exit_code: 0 ----- stdout ----- @@ -3244,7 +3242,7 @@ optional-dependencies.bar = [ ----- stderr ----- Resolved 7 packages in [TIME] - "### + " ); Ok(()) @@ -3276,7 +3274,7 @@ optional-dependencies.bar = [ .arg("--all-extras") .arg("--extra") .arg("foo"), - @r" + @" success: false exit_code: 2 ----- stdout ----- @@ -3310,7 +3308,7 @@ dependencies = ["anyio==3.7.0", "anyio==4.0.0"] )?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("pyproject.toml"), @r###" + .arg("pyproject.toml"), @" success: false exit_code: 1 ----- stdout ----- @@ -3318,7 +3316,7 @@ dependencies = ["anyio==3.7.0", "anyio==4.0.0"] ----- stderr ----- × No solution found when resolving dependencies: ╰─▶ Because my-project depends on anyio==3.7.0 and anyio==4.0.0, we can conclude that your requirements are unsatisfiable. - "### + " ); Ok(()) @@ -3342,7 +3340,7 @@ dependencies = ["anyio==300.1.4"] )?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("pyproject.toml"), @r###" + .arg("pyproject.toml"), @" success: false exit_code: 1 ----- stdout ----- @@ -3350,7 +3348,7 @@ dependencies = ["anyio==300.1.4"] ----- stderr ----- × No solution found when resolving dependencies: ╰─▶ Because there is no version of anyio==300.1.4 and my-project depends on anyio==300.1.4, we can conclude that your requirements are unsatisfiable. - "### + " ); Ok(()) @@ -3370,7 +3368,7 @@ fn compile_exclude_newer() -> Result<()> { .arg("--exclude-newer") // 4.64.0: 2022-04-04T01:48:46.194635Z1 // 4.64.1: 2022-09-03T11:10:27.148080Z - .arg("2022-04-04T12:00:00Z"), @r" + .arg("2022-04-04T12:00:00Z"), @" success: true exit_code: 0 ----- stdout ----- @@ -3391,7 +3389,7 @@ fn compile_exclude_newer() -> Result<()> { .env_remove(EnvVars::UV_EXCLUDE_NEWER) .arg("requirements.in") .arg("--exclude-newer") - .arg("2022-04-04"), @r" + .arg("2022-04-04"), @" success: true exit_code: 0 ----- stdout ----- @@ -3461,7 +3459,7 @@ fn compile_exclude_newer_package() -> Result<()> { .env_remove(EnvVars::UV_EXCLUDE_NEWER) .arg("requirements.in") .arg("--exclude-newer") - .arg("2022-04-04T12:00:00Z"), @r" + .arg("2022-04-04T12:00:00Z"), @" success: true exit_code: 0 ----- stdout ----- @@ -3493,7 +3491,7 @@ fn compile_exclude_newer_package() -> Result<()> { .arg("--exclude-newer") .arg("2022-04-04T12:00:00Z") .arg("--exclude-newer-package") - .arg("tqdm=2022-09-04T00:00:00Z"), @r" + .arg("tqdm=2022-09-04T00:00:00Z"), @" success: true exit_code: 0 ----- stdout ----- @@ -3527,7 +3525,7 @@ fn compile_exclude_newer_package() -> Result<()> { .arg("--exclude-newer-package") .arg("tqdm=2022-09-04T00:00:00Z") .arg("--exclude-newer-package") - .arg("requests=2022-06-01T00:00:00Z"), @r" + .arg("requests=2022-06-01T00:00:00Z"), @" success: true exit_code: 0 ----- stdout ----- @@ -3567,7 +3565,7 @@ fn compile_exclude_newer_package_errors() -> Result<()> { .env_remove(EnvVars::UV_EXCLUDE_NEWER) .arg("requirements.in") .arg("--exclude-newer-package") - .arg("tqdm"), @r" + .arg("tqdm"), @" success: false exit_code: 2 ----- stdout ----- @@ -3585,7 +3583,7 @@ fn compile_exclude_newer_package_errors() -> Result<()> { .env_remove(EnvVars::UV_EXCLUDE_NEWER) .arg("requirements.in") .arg("--exclude-newer-package") - .arg("tqdm=invalid-date"), @r" + .arg("tqdm=invalid-date"), @" success: false exit_code: 2 ----- stdout ----- @@ -3619,7 +3617,7 @@ fn compile_wheel_path_dependency() -> Result<()> { ))?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -3644,14 +3642,14 @@ fn compile_wheel_path_dependency() -> Result<()> { ----- stderr ----- Resolved 7 packages in [TIME] - "###); + "); // Run the same operation, but this time with a relative path, omitting the `//`. let requirements_in = context.temp_dir.child("requirements.in"); requirements_in.write_str("flask @ file:flask-3.0.0-py3-none-any.whl")?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -3676,7 +3674,7 @@ fn compile_wheel_path_dependency() -> Result<()> { ----- stderr ----- Resolved 7 packages in [TIME] - "### + " ); // Run the same operation, but this time with a relative path, including the `//`. @@ -3684,7 +3682,7 @@ fn compile_wheel_path_dependency() -> Result<()> { requirements_in.write_str("flask @ file://flask-3.0.0-py3-none-any.whl")?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -3709,7 +3707,7 @@ fn compile_wheel_path_dependency() -> Result<()> { ----- stderr ----- Resolved 7 packages in [TIME] - "### + " ); // Run the same operation, but this time with a relative path, exclusive of any scheme. @@ -3717,7 +3715,7 @@ fn compile_wheel_path_dependency() -> Result<()> { requirements_in.write_str("flask @ ./flask-3.0.0-py3-none-any.whl")?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -3742,7 +3740,7 @@ fn compile_wheel_path_dependency() -> Result<()> { ----- stderr ----- Resolved 7 packages in [TIME] - "### + " ); // Run the same operation, but this time with an absolute path (rather than a URL). @@ -3750,7 +3748,7 @@ fn compile_wheel_path_dependency() -> Result<()> { requirements_in.write_str(&format!("flask @ {}", flask_wheel.path().display()))?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -3775,7 +3773,7 @@ fn compile_wheel_path_dependency() -> Result<()> { ----- stderr ----- Resolved 7 packages in [TIME] - "### + " ); // Run the same operation, but this time with an absolute path (rather than a URL), including @@ -3784,7 +3782,7 @@ fn compile_wheel_path_dependency() -> Result<()> { requirements_in.write_str(&format!("flask @ file://{}", flask_wheel.path().display()))?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -3809,7 +3807,7 @@ fn compile_wheel_path_dependency() -> Result<()> { ----- stderr ----- Resolved 7 packages in [TIME] - "### + " ); // Run the same operation, but this time with an absolute path (rather than a URL), including @@ -3821,7 +3819,7 @@ fn compile_wheel_path_dependency() -> Result<()> { ))?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -3846,7 +3844,7 @@ fn compile_wheel_path_dependency() -> Result<()> { ----- stderr ----- Resolved 7 packages in [TIME] - "### + " ); Ok(()) @@ -3870,7 +3868,7 @@ fn compile_source_distribution_path_dependency() -> Result<()> { ))?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -3895,7 +3893,7 @@ fn compile_source_distribution_path_dependency() -> Result<()> { ----- stderr ----- Resolved 7 packages in [TIME] - "###); + "); Ok(()) } @@ -3914,14 +3912,14 @@ fn compile_wheel_path_dependency_missing() -> Result<()> { ))?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: Distribution not found at: file://[TEMP_DIR]/flask-3.0.0-py3-none-any.whl - "###); + "); Ok(()) } @@ -3934,7 +3932,7 @@ fn compile_yanked_version_direct() -> Result<()> { requirements_in.write_str("attrs==21.1.0")?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @r#" success: true exit_code: 0 ----- stdout ----- @@ -3946,7 +3944,7 @@ fn compile_yanked_version_direct() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] warning: `attrs==21.1.0` is yanked (reason: "Installable but not importable on Python 3.4.") - "### + "# ); Ok(()) @@ -3960,7 +3958,7 @@ fn compile_yanked_version_indirect() -> Result<()> { requirements_in.write_str("attrs>20.3.0,<21.2.0")?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r" + .arg("requirements.in"), @" success: false exit_code: 1 ----- stdout ----- @@ -3993,7 +3991,7 @@ fn override_dependency() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") .arg("--override") - .arg("overrides.txt"), @r###" + .arg("overrides.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -4020,7 +4018,7 @@ fn override_dependency() -> Result<()> { ----- stderr ----- Resolved 7 packages in [TIME] - "### + " ); Ok(()) @@ -4049,7 +4047,7 @@ fn override_dependency_from_pyproject() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("pyproject.toml") .current_dir(&context.temp_dir) - , @r###" + , @" success: true exit_code: 0 ----- stdout ----- @@ -4076,7 +4074,7 @@ fn override_dependency_from_pyproject() -> Result<()> { ----- stderr ----- Resolved 7 packages in [TIME] - "### + " ); Ok(()) @@ -4103,7 +4101,7 @@ fn constraint_dependency_from_pyproject() -> Result<()> { )?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("pyproject.toml"), @r###" + .arg("pyproject.toml"), @" success: true exit_code: 0 ----- stdout ----- @@ -4120,7 +4118,7 @@ fn constraint_dependency_from_pyproject() -> Result<()> { ----- stderr ----- Resolved 3 packages in [TIME] - "### + " ); Ok(()) @@ -4157,7 +4155,7 @@ fn override_dependency_from_specific_uv_toml() -> Result<()> { .arg("--config-file") .arg("../uv/uv.toml") .current_dir(context.temp_dir.child("project")) - , @r###" + , @" success: true exit_code: 0 ----- stdout ----- @@ -4184,7 +4182,7 @@ fn override_dependency_from_specific_uv_toml() -> Result<()> { ----- stderr ----- Resolved 7 packages in [TIME] - "### + " ); Ok(()) @@ -4206,7 +4204,7 @@ fn override_multi_dependency() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") .arg("--override") - .arg("overrides.txt"), @r###" + .arg("overrides.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -4231,7 +4229,7 @@ fn override_multi_dependency() -> Result<()> { ----- stderr ----- Resolved 7 packages in [TIME] - "### + " ); Ok(()) @@ -4251,7 +4249,7 @@ fn dont_add_override_for_non_activated_extra() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") .arg("--override") - .arg("overrides.txt"), @r###" + .arg("overrides.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -4262,7 +4260,7 @@ fn dont_add_override_for_non_activated_extra() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); Ok(()) @@ -4291,7 +4289,7 @@ fn override_dependency_from_workspace_invalid_syntax() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("pyproject.toml") .current_dir(&context.temp_dir) - , @r###" + , @r#" success: false exit_code: 2 ----- stdout ----- @@ -4314,7 +4312,7 @@ fn override_dependency_from_workspace_invalid_syntax() -> Result<()> { no such comparison operator "=", must be one of ~= == != <= >= < > === werkzeug=2.3.0 ^^^^^^ - "### + "# ); Ok(()) @@ -4334,7 +4332,7 @@ fn override_dependency_url() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") .arg("--override") - .arg("overrides.txt"), @r###" + .arg("overrides.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -4359,7 +4357,7 @@ fn override_dependency_url() -> Result<()> { ----- stderr ----- Resolved 7 packages in [TIME] - "### + " ); Ok(()) @@ -4379,7 +4377,7 @@ fn override_dependency_unnamed_url() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") .arg("--override") - .arg("overrides.txt"), @r###" + .arg("overrides.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -4404,7 +4402,7 @@ fn override_dependency_unnamed_url() -> Result<()> { ----- stderr ----- Resolved 7 packages in [TIME] - "### + " ); Ok(()) @@ -4418,7 +4416,7 @@ fn missing_registry_extra() -> Result<()> { requirements_in.write_str("black[tensorboard]==23.10.1")?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -4440,7 +4438,7 @@ fn missing_registry_extra() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] warning: The package `black==23.10.1` does not have an extra named `tensorboard` - "### + " ); Ok(()) @@ -4454,7 +4452,7 @@ fn missing_url_extra() -> Result<()> { requirements_in.write_str("flask[tensorboard] @ https://files.pythonhosted.org/packages/36/42/015c23096649b908c809c69388a805a571a3bea44362fe87e33fc3afa01f/flask-3.0.0-py3-none-any.whl")?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -4480,7 +4478,7 @@ fn missing_url_extra() -> Result<()> { ----- stderr ----- Resolved 7 packages in [TIME] warning: The package `flask @ https://files.pythonhosted.org/packages/36/42/015c23096649b908c809c69388a805a571a3bea44362fe87e33fc3afa01f/flask-3.0.0-py3-none-any.whl` does not have an extra named `tensorboard` - "### + " ); Ok(()) @@ -4495,7 +4493,7 @@ fn preserve_url() -> Result<()> { requirements_in.write_str("flask @ https://files.PYTHONHOSTED.org/packages/36/42/015c23096649b908c809c69388a805a571a3bea44362fe87e33fc3afa01f/flask-3.0.0-py3-none-any.whl")?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -4520,7 +4518,7 @@ fn preserve_url() -> Result<()> { ----- stderr ----- Resolved 7 packages in [TIME] - "### + " ); Ok(()) @@ -4542,7 +4540,7 @@ fn preserve_project_root() -> Result<()> { requirements_in.write_str("flask @ file://${PROJECT_ROOT}/flask-3.0.0-py3-none-any.whl")?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -4567,7 +4565,7 @@ fn preserve_project_root() -> Result<()> { ----- stderr ----- Resolved 7 packages in [TIME] - "### + " ); Ok(()) @@ -4583,7 +4581,7 @@ fn respect_http_env_var() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") - .env(EnvVars::URL, "https://files.pythonhosted.org/packages/36/42/015c23096649b908c809c69388a805a571a3bea44362fe87e33fc3afa01f/flask-3.0.0-py3-none-any.whl"), @r###" + .env(EnvVars::URL, "https://files.pythonhosted.org/packages/36/42/015c23096649b908c809c69388a805a571a3bea44362fe87e33fc3afa01f/flask-3.0.0-py3-none-any.whl"), @" success: true exit_code: 0 ----- stdout ----- @@ -4608,7 +4606,7 @@ fn respect_http_env_var() -> Result<()> { ----- stderr ----- Resolved 7 packages in [TIME] - "### + " ); Ok(()) @@ -4624,7 +4622,7 @@ fn respect_unnamed_env_var() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") - .env(EnvVars::URL, "https://files.pythonhosted.org/packages/36/42/015c23096649b908c809c69388a805a571a3bea44362fe87e33fc3afa01f/flask-3.0.0-py3-none-any.whl"), @r###" + .env(EnvVars::URL, "https://files.pythonhosted.org/packages/36/42/015c23096649b908c809c69388a805a571a3bea44362fe87e33fc3afa01f/flask-3.0.0-py3-none-any.whl"), @" success: true exit_code: 0 ----- stdout ----- @@ -4649,7 +4647,7 @@ fn respect_unnamed_env_var() -> Result<()> { ----- stderr ----- Resolved 7 packages in [TIME] - "### + " ); Ok(()) @@ -4665,7 +4663,7 @@ fn error_missing_unnamed_env_var() -> Result<()> { requirements_in.write_str("${URL}")?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: false exit_code: 2 ----- stdout ----- @@ -4675,7 +4673,7 @@ fn error_missing_unnamed_env_var() -> Result<()> { Caused by: Expected package name starting with an alphanumeric character, found `$` ${URL} ^ - "### + " ); Ok(()) @@ -4697,7 +4695,7 @@ fn respect_file_env_var() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") - .env(EnvVars::FILE_PATH, context.temp_dir.join("flask-3.0.0-py3-none-any.whl")), @r###" + .env(EnvVars::FILE_PATH, context.temp_dir.join("flask-3.0.0-py3-none-any.whl")), @" success: true exit_code: 0 ----- stdout ----- @@ -4722,7 +4720,7 @@ fn respect_file_env_var() -> Result<()> { ----- stderr ----- Resolved 7 packages in [TIME] - "### + " ); Ok(()) @@ -4741,7 +4739,7 @@ fn compile_editable() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg(requirements_in.path()) - .current_dir(current_dir()?), @r###" + .current_dir(current_dir()?), @" success: true exit_code: 0 ----- stdout ----- @@ -4782,7 +4780,7 @@ fn compile_editable() -> Result<()> { ----- stderr ----- Resolved 13 packages in [TIME] - "###); + "); Ok(()) } @@ -4801,7 +4799,7 @@ fn deduplicate_editable() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg(requirements_in.path()) - .current_dir(current_dir()?), @r###" + .current_dir(current_dir()?), @" success: true exit_code: 0 ----- stdout ----- @@ -4832,7 +4830,7 @@ fn deduplicate_editable() -> Result<()> { ----- stderr ----- Resolved 9 packages in [TIME] - "###); + "); Ok(()) } @@ -4848,7 +4846,7 @@ fn strip_fragment_unnamed() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg(requirements_in.path()) - .current_dir(current_dir()?), @r###" + .current_dir(current_dir()?), @" success: true exit_code: 0 ----- stdout ----- @@ -4859,7 +4857,7 @@ fn strip_fragment_unnamed() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "###); + "); Ok(()) } @@ -4875,7 +4873,7 @@ fn strip_fragment_named() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg(requirements_in.path()) - .current_dir(current_dir()?), @r###" + .current_dir(current_dir()?), @" success: true exit_code: 0 ----- stdout ----- @@ -4886,7 +4884,7 @@ fn strip_fragment_named() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "###); + "); Ok(()) } @@ -4900,7 +4898,7 @@ fn recursive_extras_direct_url() -> Result<()> { uv_snapshot!(context.filters(), context .pip_compile() .arg(requirements_in.path()) - .current_dir(current_dir().unwrap()), @r###" + .current_dir(current_dir().unwrap()), @" success: true exit_code: 0 ----- stdout ----- @@ -4931,7 +4929,7 @@ fn recursive_extras_direct_url() -> Result<()> { ----- stderr ----- Resolved 9 packages in [TIME] - "###); + "); Ok(()) } @@ -4946,7 +4944,7 @@ fn compile_editable_url_requirement() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg(requirements_in.path()) - .current_dir(current_dir()?), @r###" + .current_dir(current_dir()?), @" success: true exit_code: 0 ----- stdout ----- @@ -4959,7 +4957,7 @@ fn compile_editable_url_requirement() -> Result<()> { ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); Ok(()) } @@ -4975,7 +4973,7 @@ fn compile_html() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") .arg("--index-url") - .arg("https://astral-sh.github.io/pytorch-mirror/whl/cpu"), @r###" + .arg("https://astral-sh.github.io/pytorch-mirror/whl/cpu"), @" success: true exit_code: 0 ----- stdout ----- @@ -4988,7 +4986,7 @@ fn compile_html() -> Result<()> { ----- stderr ----- Resolved 2 packages in [TIME] - "### + " ); Ok(()) @@ -5004,7 +5002,7 @@ fn trailing_slash() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") .arg("--index-url") - .arg("https://test.pypi.org/simple"), @r###" + .arg("https://test.pypi.org/simple"), @" success: true exit_code: 0 ----- stdout ----- @@ -5017,13 +5015,13 @@ fn trailing_slash() -> Result<()> { ----- stderr ----- Resolved 2 packages in [TIME] - "### + " ); uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") .arg("--index-url") - .arg("https://test.pypi.org/simple/"), @r###" + .arg("https://test.pypi.org/simple/"), @" success: true exit_code: 0 ----- stdout ----- @@ -5036,7 +5034,7 @@ fn trailing_slash() -> Result<()> { ----- stderr ----- Resolved 2 packages in [TIME] - "### + " ); Ok(()) @@ -5050,7 +5048,7 @@ fn compile_legacy_sdist_pep_517() -> Result<()> { requirements_in.write_str("flake8 @ https://files.pythonhosted.org/packages/66/53/3ad4a3b74d609b3b9008a10075c40e7c8909eae60af53623c3888f7a529a/flake8-6.0.0.tar.gz")?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -5067,7 +5065,7 @@ fn compile_legacy_sdist_pep_517() -> Result<()> { ----- stderr ----- Resolved 4 packages in [TIME] - "### + " ); Ok(()) @@ -5082,7 +5080,7 @@ fn generate_hashes_registry() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") - .arg("--generate-hashes"), @r###" + .arg("--generate-hashes"), @r" success: true exit_code: 0 ----- stdout ----- @@ -5103,7 +5101,7 @@ fn generate_hashes_registry() -> Result<()> { ----- stderr ----- Resolved 3 packages in [TIME] - "### + " ); Ok(()) @@ -5118,7 +5116,7 @@ fn generate_hashes_source_distribution_url() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") - .arg("--generate-hashes"), @r###" + .arg("--generate-hashes"), @r" success: true exit_code: 0 ----- stdout ----- @@ -5138,7 +5136,7 @@ fn generate_hashes_source_distribution_url() -> Result<()> { ----- stderr ----- Resolved 3 packages in [TIME] - "### + " ); Ok(()) @@ -5153,7 +5151,7 @@ fn generate_hashes_built_distribution_url() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") - .arg("--generate-hashes"), @r###" + .arg("--generate-hashes"), @r" success: true exit_code: 0 ----- stdout ----- @@ -5173,7 +5171,7 @@ fn generate_hashes_built_distribution_url() -> Result<()> { ----- stderr ----- Resolved 3 packages in [TIME] - "### + " ); Ok(()) @@ -5189,7 +5187,7 @@ fn generate_hashes_git() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") - .arg("--generate-hashes"), @r###" + .arg("--generate-hashes"), @r" success: true exit_code: 0 ----- stdout ----- @@ -5208,7 +5206,7 @@ fn generate_hashes_git() -> Result<()> { ----- stderr ----- Resolved 3 packages in [TIME] - "### + " ); Ok(()) @@ -5223,7 +5221,7 @@ fn generate_hashes_unnamed_url() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") - .arg("--generate-hashes"), @r###" + .arg("--generate-hashes"), @r" success: true exit_code: 0 ----- stdout ----- @@ -5243,7 +5241,7 @@ fn generate_hashes_unnamed_url() -> Result<()> { ----- stderr ----- Resolved 3 packages in [TIME] - "### + " ); Ok(()) @@ -5264,7 +5262,7 @@ fn generate_hashes_local_directory() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg(requirements_in.path()) .arg("--generate-hashes") - .current_dir(current_dir()?), @r###" + .current_dir(current_dir()?), @r" success: true exit_code: 0 ----- stdout ----- @@ -5287,7 +5285,7 @@ fn generate_hashes_local_directory() -> Result<()> { ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); Ok(()) } @@ -5307,7 +5305,7 @@ fn generate_hashes_editable() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg(requirements_in.path()) .arg("--generate-hashes") - .current_dir(current_dir()?), @r###" + .current_dir(current_dir()?), @r" success: true exit_code: 0 ----- stdout ----- @@ -5330,7 +5328,7 @@ fn generate_hashes_editable() -> Result<()> { ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); Ok(()) } @@ -5346,7 +5344,7 @@ fn generate_hashes_find_links_directory() -> Result<()> { .arg("requirements.in") .arg("--generate-hashes") .arg("--find-links") - .arg(context.workspace_root.join("test").join("links")), @r###" + .arg(context.workspace_root.join("test").join("links")), @r" success: true exit_code: 0 ----- stdout ----- @@ -5358,7 +5356,7 @@ fn generate_hashes_find_links_directory() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); Ok(()) @@ -5376,7 +5374,7 @@ fn generate_hashes_find_links_url() -> Result<()> { .arg("--generate-hashes") .arg("--no-index") .arg("--find-links") - .arg("https://astral-sh.github.io/pytorch-mirror/whl/torch_stable.html"), @r###" + .arg("https://astral-sh.github.io/pytorch-mirror/whl/torch_stable.html"), @r" success: true exit_code: 0 ----- stdout ----- @@ -5388,7 +5386,7 @@ fn generate_hashes_find_links_url() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); Ok(()) @@ -5408,7 +5406,7 @@ fn find_links_directory() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") .arg("--find-links") - .arg(context.workspace_root.join("test").join("links")), @r###" + .arg(context.workspace_root.join("test").join("links")), @" success: true exit_code: 0 ----- stdout ----- @@ -5425,7 +5423,7 @@ fn find_links_directory() -> Result<()> { ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); Ok(()) } @@ -5441,7 +5439,7 @@ fn find_links_url() -> Result<()> { .arg("requirements.in") .arg("--no-index") .arg("--find-links") - .arg("https://astral-sh.github.io/pytorch-mirror/whl/torch_stable.html"), @r###" + .arg("https://astral-sh.github.io/pytorch-mirror/whl/torch_stable.html"), @" success: true exit_code: 0 ----- stdout ----- @@ -5452,7 +5450,7 @@ fn find_links_url() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); Ok(()) @@ -5468,7 +5466,7 @@ fn find_links_env_var() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") .arg("--no-index") - .env(EnvVars::URL, "https://astral-sh.github.io/pytorch-mirror/whl/torch_stable.html"), @r###" + .env(EnvVars::URL, "https://astral-sh.github.io/pytorch-mirror/whl/torch_stable.html"), @" success: true exit_code: 0 ----- stdout ----- @@ -5479,7 +5477,7 @@ fn find_links_env_var() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); Ok(()) @@ -5497,7 +5495,7 @@ fn find_links_requirements_txt() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") .arg("--no-index") - .arg("--emit-find-links"), @r###" + .arg("--emit-find-links"), @" success: true exit_code: 0 ----- stdout ----- @@ -5510,7 +5508,7 @@ fn find_links_requirements_txt() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); Ok(()) @@ -5526,7 +5524,7 @@ fn find_links_uv_env_var() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") .arg("--no-index") - .env(EnvVars::UV_FIND_LINKS, "https://astral-sh.github.io/pytorch-mirror/whl/torch_stable.html"), @r###" + .env(EnvVars::UV_FIND_LINKS, "https://astral-sh.github.io/pytorch-mirror/whl/torch_stable.html"), @" success: true exit_code: 0 ----- stdout ----- @@ -5537,7 +5535,7 @@ fn find_links_uv_env_var() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); Ok(()) @@ -5558,7 +5556,7 @@ fn avoid_irrelevant_extras() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") .arg("--find-links") - .arg(context.workspace_root.join("test").join("links")), @r###" + .arg(context.workspace_root.join("test").join("links")), @" success: true exit_code: 0 ----- stdout ----- @@ -5577,7 +5575,7 @@ fn avoid_irrelevant_extras() -> Result<()> { ----- stderr ----- Resolved 5 packages in [TIME] - "###); + "); Ok(()) } @@ -5611,7 +5609,7 @@ coverage = ["example[test]", "extras>=0.0.1,<=0.0.2"] uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") .arg("--find-links") - .arg(context.workspace_root.join("test").join("links")), @r###" + .arg(context.workspace_root.join("test").join("links")), @" success: true exit_code: 0 ----- stdout ----- @@ -5626,7 +5624,7 @@ coverage = ["example[test]", "extras>=0.0.1,<=0.0.2"] ----- stderr ----- Resolved 3 packages in [TIME] - "### + " ); Ok(()) @@ -5645,7 +5643,7 @@ fn requires_python_prefetch() -> Result<()> { uv_snapshot!(context .pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -5656,7 +5654,7 @@ fn requires_python_prefetch() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "###); + "); Ok(()) } @@ -5687,7 +5685,7 @@ fn upgrade_none() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") .arg("--output-file") - .arg("requirements.txt"), @r###" + .arg("requirements.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -5708,7 +5706,7 @@ fn upgrade_none() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] - "### + " ); Ok(()) @@ -5743,7 +5741,7 @@ fn upgrade_all() -> Result<()> { .arg("requirements.in") .arg("--output-file") .arg("requirements.txt") - .arg("--upgrade"), @r###" + .arg("--upgrade"), @" success: true exit_code: 0 ----- stdout ----- @@ -5764,7 +5762,7 @@ fn upgrade_all() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] - "### + " ); Ok(()) @@ -5800,7 +5798,7 @@ fn upgrade_package() -> Result<()> { .arg("--output-file") .arg("requirements.txt") .arg("--upgrade-package") - .arg("click"), @r###" + .arg("click"), @" success: true exit_code: 0 ----- stdout ----- @@ -5821,7 +5819,7 @@ fn upgrade_package() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] - "### + " ); Ok(()) @@ -5846,7 +5844,7 @@ fn upgrade_constraint() -> Result<()> { .arg("--output-file") .arg("requirements.txt") .arg("--upgrade-package") - .arg("iniconfig<2"), @r###" + .arg("iniconfig<2"), @" success: true exit_code: 0 ----- stdout ----- @@ -5857,7 +5855,7 @@ fn upgrade_constraint() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); uv_snapshot!(context.filters(), context.pip_compile() @@ -5865,7 +5863,7 @@ fn upgrade_constraint() -> Result<()> { .arg("--output-file") .arg("requirements.txt") .arg("-P") - .arg("iniconfig"), @r###" + .arg("iniconfig"), @" success: true exit_code: 0 ----- stdout ----- @@ -5876,7 +5874,7 @@ fn upgrade_constraint() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); Ok(()) @@ -5899,14 +5897,14 @@ fn missing_path_requirement() -> Result<()> { .collect(); uv_snapshot!(filters, context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: Distribution not found at: file://tmp/anyio-3.7.0.tar.gz - "###); + "); Ok(()) } @@ -5919,7 +5917,7 @@ fn missing_editable_file() -> Result<()> { requirements_in.write_str("-e foo/anyio-3.7.0.tar.gz")?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: false exit_code: 2 ----- stdout ----- @@ -5927,7 +5925,7 @@ fn missing_editable_file() -> Result<()> { ----- stderr ----- error: Unsupported editable requirement in `requirements.in` Caused by: Editable must refer to a local directory, not an archive: `file://[TEMP_DIR]/foo/anyio-3.7.0.tar.gz` - "###); + "); Ok(()) } @@ -5940,14 +5938,14 @@ fn missing_editable_directory() -> Result<()> { requirements_in.write_str("-e foo/bar")?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: Distribution not found at: file://[TEMP_DIR]/foo/bar - "###); + "); Ok(()) } @@ -5961,7 +5959,7 @@ fn unnamed_requirement_with_package_name() -> Result<()> { requirements_in.write_str("https://files.pythonhosted.org/packages/36/42/015c23096649b908c809c69388a805a571a3bea44362fe87e33fc3afa01f/flask-3.0.0-py3-none-any.whl")?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -5986,7 +5984,7 @@ fn unnamed_requirement_with_package_name() -> Result<()> { ----- stderr ----- Resolved 7 packages in [TIME] - "### + " ); Ok(()) @@ -6001,7 +5999,7 @@ fn no_annotate() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") - .arg("--no-annotate"), @r###" + .arg("--no-annotate"), @" success: true exit_code: 0 ----- stdout ----- @@ -6016,7 +6014,7 @@ fn no_annotate() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] - "### + " ); Ok(()) @@ -6031,7 +6029,7 @@ fn no_header() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") - .arg("--no-header"), @r###" + .arg("--no-header"), @" success: true exit_code: 0 ----- stdout ----- @@ -6050,7 +6048,7 @@ fn no_header() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] - "### + " ); Ok(()) @@ -6066,7 +6064,7 @@ fn custom_compile_command() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") .arg("--custom-compile-command") - .arg("./custom-uv-compile.sh"), @r###" + .arg("./custom-uv-compile.sh"), @" success: true exit_code: 0 ----- stdout ----- @@ -6087,13 +6085,13 @@ fn custom_compile_command() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] - "### + " ); // with env var uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") - .env(EnvVars::UV_CUSTOM_COMPILE_COMMAND, "./custom-uv-compile.sh"), @r###" + .env(EnvVars::UV_CUSTOM_COMPILE_COMMAND, "./custom-uv-compile.sh"), @" success: true exit_code: 0 ----- stdout ----- @@ -6114,7 +6112,7 @@ fn custom_compile_command() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] - "### + " ); Ok(()) @@ -6129,7 +6127,7 @@ fn allow_unsafe() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") - .arg("--allow-unsafe"), @r###" + .arg("--allow-unsafe"), @" success: true exit_code: 0 ----- stdout ----- @@ -6143,7 +6141,7 @@ fn allow_unsafe() -> Result<()> { ----- stderr ----- warning: pip-compile's `--allow-unsafe` has no effect (uv can safely pin `pip` and other packages) Resolved 2 packages in [TIME] - "### + " ); Ok(()) @@ -6158,14 +6156,14 @@ fn resolver_legacy() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") - .arg("--resolver=legacy"), @r###" + .arg("--resolver=legacy"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: pip-compile's `--resolver=legacy` is unsupported (uv always backtracks) - "### + " ); Ok(()) @@ -6181,7 +6179,7 @@ fn hide_index_urls() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") .arg("--default-index") - .arg("https://test.pypi.org/simple/"), @r###" + .arg("https://test.pypi.org/simple/"), @" success: true exit_code: 0 ----- stdout ----- @@ -6192,12 +6190,12 @@ fn hide_index_urls() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") - .arg("--default-index=https://test.pypi.org/simple/"), @r###" + .arg("--default-index=https://test.pypi.org/simple/"), @" success: true exit_code: 0 ----- stdout ----- @@ -6208,13 +6206,13 @@ fn hide_index_urls() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") .arg("--index") - .arg("https://test.pypi.org/simple/"), @r###" + .arg("https://test.pypi.org/simple/"), @" success: true exit_code: 0 ----- stdout ----- @@ -6225,12 +6223,12 @@ fn hide_index_urls() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") - .arg("--index=https://test.pypi.org/simple/"), @r###" + .arg("--index=https://test.pypi.org/simple/"), @" success: true exit_code: 0 ----- stdout ----- @@ -6241,13 +6239,13 @@ fn hide_index_urls() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") .arg("-i") - .arg("https://test.pypi.org/simple/"), @r###" + .arg("https://test.pypi.org/simple/"), @" success: true exit_code: 0 ----- stdout ----- @@ -6258,12 +6256,12 @@ fn hide_index_urls() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") - .arg("-i=https://test.pypi.org/simple/"), @r###" + .arg("-i=https://test.pypi.org/simple/"), @" success: true exit_code: 0 ----- stdout ----- @@ -6274,13 +6272,13 @@ fn hide_index_urls() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") .arg("--index-url") - .arg("https://test.pypi.org/simple/"), @r###" + .arg("https://test.pypi.org/simple/"), @" success: true exit_code: 0 ----- stdout ----- @@ -6291,12 +6289,12 @@ fn hide_index_urls() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") - .arg("--index-url=https://test.pypi.org/simple/"), @r###" + .arg("--index-url=https://test.pypi.org/simple/"), @" success: true exit_code: 0 ----- stdout ----- @@ -6307,13 +6305,13 @@ fn hide_index_urls() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") .arg("--extra-index-url") - .arg("https://test.pypi.org/simple/"), @r###" + .arg("https://test.pypi.org/simple/"), @" success: true exit_code: 0 ----- stdout ----- @@ -6324,12 +6322,12 @@ fn hide_index_urls() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") - .arg("--extra-index-url=https://test.pypi.org/simple/"), @r###" + .arg("--extra-index-url=https://test.pypi.org/simple/"), @" success: true exit_code: 0 ----- stdout ----- @@ -6340,7 +6338,7 @@ fn hide_index_urls() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); Ok(()) @@ -6358,7 +6356,7 @@ fn emit_index_urls() -> Result<()> { .arg("requirements.in") .arg("--emit-index-url") .arg("--default-index") - .arg("https://test.pypi.org/simple/"), @r###" + .arg("https://test.pypi.org/simple/"), @" success: true exit_code: 0 ----- stdout ----- @@ -6371,13 +6369,13 @@ fn emit_index_urls() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") .arg("--emit-index-url") - .arg("--default-index=https://test.pypi.org/simple/"), @r###" + .arg("--default-index=https://test.pypi.org/simple/"), @" success: true exit_code: 0 ----- stdout ----- @@ -6390,14 +6388,14 @@ fn emit_index_urls() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") .arg("--emit-index-url") .arg("--index") - .arg("https://test.pypi.org/simple/"), @r###" + .arg("https://test.pypi.org/simple/"), @" success: true exit_code: 0 ----- stdout ----- @@ -6411,13 +6409,13 @@ fn emit_index_urls() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") .arg("--emit-index-url") - .arg("--index=https://test.pypi.org/simple/"), @r###" + .arg("--index=https://test.pypi.org/simple/"), @" success: true exit_code: 0 ----- stdout ----- @@ -6431,14 +6429,14 @@ fn emit_index_urls() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") .arg("--emit-index-url") .arg("-i") - .arg("https://test.pypi.org/simple/"), @r###" + .arg("https://test.pypi.org/simple/"), @" success: true exit_code: 0 ----- stdout ----- @@ -6451,13 +6449,13 @@ fn emit_index_urls() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") .arg("--emit-index-url") - .arg("-i=https://test.pypi.org/simple/"), @r###" + .arg("-i=https://test.pypi.org/simple/"), @" success: true exit_code: 0 ----- stdout ----- @@ -6470,14 +6468,14 @@ fn emit_index_urls() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") .arg("--emit-index-url") .arg("--index-url") - .arg("https://test.pypi.org/simple/"), @r###" + .arg("https://test.pypi.org/simple/"), @" success: true exit_code: 0 ----- stdout ----- @@ -6490,13 +6488,13 @@ fn emit_index_urls() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") .arg("--emit-index-url") - .arg("--index-url=https://test.pypi.org/simple/"), @r###" + .arg("--index-url=https://test.pypi.org/simple/"), @" success: true exit_code: 0 ----- stdout ----- @@ -6509,14 +6507,14 @@ fn emit_index_urls() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") .arg("--emit-index-url") .arg("--extra-index-url") - .arg("https://test.pypi.org/simple/"), @r###" + .arg("https://test.pypi.org/simple/"), @" success: true exit_code: 0 ----- stdout ----- @@ -6530,13 +6528,13 @@ fn emit_index_urls() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") .arg("--emit-index-url") - .arg("--extra-index-url=https://test.pypi.org/simple/"), @r###" + .arg("--extra-index-url=https://test.pypi.org/simple/"), @" success: true exit_code: 0 ----- stdout ----- @@ -6550,7 +6548,7 @@ fn emit_index_urls() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); Ok(()) @@ -6567,7 +6565,7 @@ fn emit_find_links() -> Result<()> { .arg("requirements.in") .arg("--emit-find-links") .arg("--find-links") - .arg("./"), @r###" + .arg("./"), @" success: true exit_code: 0 ----- stdout ----- @@ -6590,7 +6588,7 @@ fn emit_find_links() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] - "### + " ); Ok(()) @@ -6606,7 +6604,7 @@ fn emit_find_links_relative() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") - .arg("--emit-find-links"), @r###" + .arg("--emit-find-links"), @" success: true exit_code: 0 ----- stdout ----- @@ -6619,7 +6617,7 @@ fn emit_find_links_relative() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); Ok(()) @@ -6638,7 +6636,7 @@ fn emit_build_options() -> Result<()> { .arg("--only-binary") .arg("black") .arg("--no-binary") - .arg(":all:"), @r###" + .arg(":all:"), @" success: true exit_code: 0 ----- stdout ----- @@ -6662,7 +6660,7 @@ fn emit_build_options() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] - "### + " ); Ok(()) @@ -6676,7 +6674,7 @@ fn no_index_requirements_txt() -> Result<()> { requirements_in.write_str("--no-index\ntqdm")?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: false exit_code: 1 ----- stdout ----- @@ -6686,7 +6684,7 @@ fn no_index_requirements_txt() -> Result<()> { ╰─▶ Because tqdm was not found in the provided package locations and you require tqdm, we can conclude that your requirements are unsatisfiable. hint: Packages were unavailable because index lookups were disabled and no additional package locations were provided (try: `--find-links `) - "### + " ); Ok(()) @@ -6704,7 +6702,7 @@ fn index_url_requirements_txt() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") .arg("--index-url") - .arg("https://pypi.org/simple"), @r###" + .arg("https://pypi.org/simple"), @" success: true exit_code: 0 ----- stdout ----- @@ -6715,7 +6713,7 @@ fn index_url_requirements_txt() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); Ok(()) @@ -6734,14 +6732,14 @@ fn conflicting_index_urls_requirements_txt() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") .arg("--constraint") - .arg("constraints.in"), @r###" + .arg("constraints.in"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: Multiple index URLs specified: `https://google.com/` vs. `https://wikipedia.org/` - "### + " ); Ok(()) @@ -6760,7 +6758,7 @@ fn matching_index_urls_requirements_txt() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") .arg("--constraint") - .arg("constraints.in"), @r###" + .arg("constraints.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -6769,7 +6767,7 @@ fn matching_index_urls_requirements_txt() -> Result<()> { ----- stderr ----- Resolved in [TIME] - "### + " ); Ok(()) @@ -6785,7 +6783,7 @@ fn offline_registry() -> Result<()> { // Resolve with `--offline` with an empty cache. uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") - .arg("--offline"), @r###" + .arg("--offline"), @" success: false exit_code: 1 ----- stdout ----- @@ -6795,12 +6793,12 @@ fn offline_registry() -> Result<()> { ╰─▶ Because black was not found in the cache and you require black==23.10.1, we can conclude that your requirements are unsatisfiable. hint: Packages were unavailable because the network was disabled. When the network is disabled, registry packages may only be read from the cache. - "### + " ); // Populate the cache. uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -6821,13 +6819,13 @@ fn offline_registry() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] - "### + " ); // Resolve with `--offline` with a populated cache. uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") - .arg("--offline"), @r###" + .arg("--offline"), @" success: true exit_code: 0 ----- stdout ----- @@ -6848,7 +6846,7 @@ fn offline_registry() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] - "### + " ); Ok(()) @@ -6864,7 +6862,7 @@ fn offline_registry_backtrack() -> Result<()> { // Populate the cache. uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -6875,7 +6873,7 @@ fn offline_registry_backtrack() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); // Resolve with `--offline`, with a looser requirement. We should backtrack to `1.1.1`. @@ -6884,7 +6882,7 @@ fn offline_registry_backtrack() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") - .arg("--offline"), @r###" + .arg("--offline"), @" success: true exit_code: 0 ----- stdout ----- @@ -6895,7 +6893,7 @@ fn offline_registry_backtrack() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); Ok(()) @@ -6916,7 +6914,7 @@ fn offline_find_links() -> Result<()> { .arg("requirements.in") .arg("--find-links") .arg("https://astral-sh.github.io/pytorch-mirror/whl/torch_stable.html") - .arg("--offline"), @r###" + .arg("--offline"), @" success: false exit_code: 1 ----- stdout ----- @@ -6926,7 +6924,7 @@ fn offline_find_links() -> Result<()> { ╰─▶ Because tqdm was not found in the cache and you require tqdm, we can conclude that your requirements are unsatisfiable. hint: Packages were unavailable because the network was disabled. When the network is disabled, registry packages may only be read from the cache. - "### + " ); // Resolve with `--offline`, `--find-links`, and `--no-index`. @@ -6935,7 +6933,7 @@ fn offline_find_links() -> Result<()> { .arg("--find-links") .arg("https://astral-sh.github.io/pytorch-mirror/whl/torch_stable.html") .arg("--no-index") - .arg("--offline"), @r###" + .arg("--offline"), @" success: false exit_code: 1 ----- stdout ----- @@ -6945,7 +6943,7 @@ fn offline_find_links() -> Result<()> { ╰─▶ Because tqdm was not found in the cache and you require tqdm, we can conclude that your requirements are unsatisfiable. hint: Packages were unavailable because the network was disabled. When the network is disabled, registry packages may only be read from the cache. - "### + " ); Ok(()) @@ -6961,7 +6959,7 @@ fn offline_direct_url() -> Result<()> { // Resolve with `--offline` with an empty cache. uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") - .arg("--offline"), @r###" + .arg("--offline"), @" success: false exit_code: 1 ----- stdout ----- @@ -6969,12 +6967,12 @@ fn offline_direct_url() -> Result<()> { ----- stderr ----- × Failed to download `iniconfig @ https://files.pythonhosted.org/packages/ef/a6/62565a6e1cf69e10f5727360368e451d4b7f58beeac6173dc9db836a5b46/iniconfig-2.0.0-py3-none-any.whl` ╰─▶ Network connectivity is disabled, but the requested data wasn't found in the cache for: `https://files.pythonhosted.org/packages/ef/a6/62565a6e1cf69e10f5727360368e451d4b7f58beeac6173dc9db836a5b46/iniconfig-2.0.0-py3-none-any.whl` - "### + " ); // Populate the cache. uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -6985,13 +6983,13 @@ fn offline_direct_url() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); // Resolve with `--offline` with a populated cache. uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") - .arg("--offline"), @r###" + .arg("--offline"), @" success: true exit_code: 0 ----- stdout ----- @@ -7002,7 +7000,7 @@ fn offline_direct_url() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); Ok(()) @@ -7021,7 +7019,7 @@ fn invalid_metadata_requires_python() -> Result<()> { .arg("requirements.in") .arg("--no-index") .arg("--find-links") - .arg(context.workspace_root.join("test").join("links")), @r###" + .arg(context.workspace_root.join("test").join("links")), @" success: false exit_code: 1 ----- stdout ----- @@ -7034,7 +7032,7 @@ fn invalid_metadata_requires_python() -> Result<()> { Failed to parse version: Unexpected end of version specifier, expected operator. Did you mean `==12`?: 12 ^^ - "### + " ); Ok(()) @@ -7052,7 +7050,7 @@ fn invalid_metadata_multiple_dist_info() -> Result<()> { .arg("requirements.in") .arg("--no-index") .arg("--find-links") - .arg(context.workspace_root.join("test").join("links")), @r###" + .arg(context.workspace_root.join("test").join("links")), @" success: false exit_code: 1 ----- stdout ----- @@ -7063,7 +7061,7 @@ fn invalid_metadata_multiple_dist_info() -> Result<()> { hint: The structure of `validation` (v3.0.0) was invalid: Multiple .dist-info directories found: validation-2.0.0, validation-3.0.0 - "### + " ); Ok(()) @@ -7082,7 +7080,7 @@ fn invalid_metadata_backtrack() -> Result<()> { .arg("requirements.in") .arg("--no-index") .arg("--find-links") - .arg(context.workspace_root.join("test").join("links")), @r###" + .arg(context.workspace_root.join("test").join("links")), @" success: true exit_code: 0 ----- stdout ----- @@ -7093,7 +7091,7 @@ fn invalid_metadata_backtrack() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); Ok(()) @@ -7115,7 +7113,7 @@ fn compile_relative_subfile() -> Result<()> { uv_snapshot!(context .pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -7130,7 +7128,7 @@ fn compile_relative_subfile() -> Result<()> { ----- stderr ----- Resolved 3 packages in [TIME] - "###); + "); Ok(()) } @@ -7144,7 +7142,7 @@ fn compile_none_extra() -> Result<()> { uv_snapshot!(context .pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -7155,7 +7153,7 @@ fn compile_none_extra() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "###); + "); Ok(()) } @@ -7176,7 +7174,7 @@ fn compile_types_pytz() -> Result<()> { .pip_compile() .arg("requirements.in") .arg("-o") - .arg("requirements.txt"), @r###" + .arg("requirements.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -7187,7 +7185,7 @@ fn compile_types_pytz() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "###); + "); Ok(()) } @@ -7207,7 +7205,7 @@ fn compile_unnamed_preference() -> Result<()> { .pip_compile() .arg("requirements.in") .arg("-o") - .arg("requirements.txt"), @r###" + .arg("requirements.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -7228,7 +7226,7 @@ fn compile_unnamed_preference() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] - "###); + "); Ok(()) } @@ -7247,7 +7245,7 @@ fn compile_constraints_compatible_url() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") .arg("--constraint") - .arg("constraints.txt"), @r###" + .arg("constraints.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -7264,7 +7262,7 @@ fn compile_constraints_compatible_url() -> Result<()> { ----- stderr ----- Resolved 3 packages in [TIME] - "### + " ); Ok(()) @@ -7284,7 +7282,7 @@ fn compile_constraints_compatible_url_version() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") .arg("--constraint") - .arg("constraints.txt"), @r###" + .arg("constraints.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -7301,7 +7299,7 @@ fn compile_constraints_compatible_url_version() -> Result<()> { ----- stderr ----- Resolved 3 packages in [TIME] - "### + " ); Ok(()) @@ -7321,7 +7319,7 @@ fn compile_constraints_incompatible_url() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") .arg("--constraint") - .arg("constraints.txt"), @r###" + .arg("constraints.txt"), @" success: false exit_code: 1 ----- stdout ----- @@ -7329,7 +7327,7 @@ fn compile_constraints_incompatible_url() -> Result<()> { ----- stderr ----- × No solution found when resolving dependencies: ╰─▶ Because only anyio>=4 is available and you require anyio<4, we can conclude that your requirements are unsatisfiable. - "### + " ); Ok(()) @@ -7345,7 +7343,7 @@ fn index_url_in_requirements() -> Result<()> { .write_str("--index-url https://astral-sh.github.io/pytorch-mirror/whl\nanyio<4")?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: false exit_code: 1 ----- stdout ----- @@ -7353,7 +7351,7 @@ fn index_url_in_requirements() -> Result<()> { ----- stderr ----- × No solution found when resolving dependencies: ╰─▶ Because anyio was not found in the package registry and you require anyio<4, we can conclude that your requirements are unsatisfiable. - "### + " ); Ok(()) @@ -7371,7 +7369,7 @@ fn index_url_from_command_line() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") .arg("--index-url") - .arg("https://pypi.org/simple"), @r###" + .arg("https://pypi.org/simple"), @" success: true exit_code: 0 ----- stdout ----- @@ -7386,7 +7384,7 @@ fn index_url_from_command_line() -> Result<()> { ----- stderr ----- Resolved 3 packages in [TIME] - "### + " ); Ok(()) @@ -7401,7 +7399,7 @@ fn unsupported_scheme() -> Result<()> { requirements_in.write_str("anyio @ bzr+https://example.com/anyio")?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: false exit_code: 2 ----- stdout ----- @@ -7411,7 +7409,7 @@ fn unsupported_scheme() -> Result<()> { Caused by: Unsupported URL prefix `bzr` in URL: `bzr+https://example.com/anyio` (Bazaar is not supported) anyio @ bzr+https://example.com/anyio ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - "### + " ); Ok(()) @@ -7426,7 +7424,7 @@ fn no_deps_valid_extra() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") - .arg("--no-deps"), @r###" + .arg("--no-deps"), @" success: true exit_code: 0 ----- stdout ----- @@ -7437,7 +7435,7 @@ fn no_deps_valid_extra() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); Ok(()) @@ -7452,7 +7450,7 @@ fn no_deps_invalid_extra() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") - .arg("--no-deps"), @r###" + .arg("--no-deps"), @" success: true exit_code: 0 ----- stdout ----- @@ -7463,7 +7461,7 @@ fn no_deps_invalid_extra() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); Ok(()) @@ -7520,7 +7518,7 @@ dependencies = [ uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") - .arg("--no-deps"), @r###" + .arg("--no-deps"), @" success: true exit_code: 0 ----- stdout ----- @@ -7533,7 +7531,7 @@ dependencies = [ ----- stderr ----- Resolved 2 packages in [TIME] - "### + " ); Ok(()) @@ -7548,7 +7546,7 @@ fn editable_invalid_extra() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg(requirements_in.path()) - .current_dir(current_dir()?), @r###" + .current_dir(current_dir()?), @" success: true exit_code: 0 ----- stdout ----- @@ -7560,7 +7558,7 @@ fn editable_invalid_extra() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] warning: The package `black @ file://[WORKSPACE]/test/packages/black_editable` does not have an extra named `empty` - "###); + "); Ok(()) } @@ -7574,7 +7572,7 @@ fn no_strip_extra() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") - .arg("--no-strip-extras"), @r###" + .arg("--no-strip-extras"), @" success: true exit_code: 0 ----- stdout ----- @@ -7601,7 +7599,7 @@ fn no_strip_extra() -> Result<()> { ----- stderr ----- Resolved 8 packages in [TIME] - "### + " ); Ok(()) @@ -7617,7 +7615,7 @@ fn no_strip_extras() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") - .arg("--no-strip-extras"), @r###" + .arg("--no-strip-extras"), @" success: true exit_code: 0 ----- stdout ----- @@ -7701,7 +7699,7 @@ fn no_strip_extras() -> Result<()> { ----- stderr ----- Resolved 30 packages in [TIME] - "### + " ); Ok(()) @@ -7718,7 +7716,7 @@ fn no_strip_markers() -> Result<()> { .arg("requirements.in") .arg("--no-strip-markers") .arg("--python-platform") - .arg("linux"), @r###" + .arg("linux"), @" success: true exit_code: 0 ----- stdout ----- @@ -7733,7 +7731,7 @@ fn no_strip_markers() -> Result<()> { ----- stderr ----- Resolved 3 packages in [TIME] - "### + " ); Ok(()) @@ -7754,7 +7752,7 @@ fn no_strip_markers_multiple_markers() -> Result<()> { .arg("requirements.in") .arg("--no-strip-markers") .arg("--python-platform") - .arg("windows"), @r###" + .arg("windows"), @" success: true exit_code: 0 ----- stdout ----- @@ -7781,7 +7779,7 @@ fn no_strip_markers_multiple_markers() -> Result<()> { ----- stderr ----- Resolved 8 packages in [TIME] - "### + " ); Ok(()) @@ -7799,7 +7797,7 @@ fn no_strip_markers_transitive_marker() -> Result<()> { .arg("requirements.in") .arg("--no-strip-markers") .arg("--python-platform") - .arg("windows"), @r###" + .arg("windows"), @" success: true exit_code: 0 ----- stdout ----- @@ -7826,7 +7824,7 @@ fn no_strip_markers_transitive_marker() -> Result<()> { ----- stderr ----- Resolved 8 packages in [TIME] - "### + " ); Ok(()) @@ -7844,7 +7842,7 @@ fn universal() -> Result<()> { uv_snapshot!(context.filters(), windows_filters=false, context.pip_compile() .arg("requirements.in") - .arg("--universal"), @r###" + .arg("--universal"), @" success: true exit_code: 0 ----- stdout ----- @@ -7871,7 +7869,7 @@ fn universal() -> Result<()> { ----- stderr ----- Resolved 8 packages in [TIME] - "### + " ); Ok(()) @@ -7889,7 +7887,7 @@ fn universal_conflicting() -> Result<()> { uv_snapshot!(context.filters(), windows_filters=false, context.pip_compile() .arg("requirements.in") - .arg("--universal"), @r###" + .arg("--universal"), @" success: true exit_code: 0 ----- stdout ----- @@ -7920,7 +7918,7 @@ fn universal_conflicting() -> Result<()> { ----- stderr ----- Resolved 10 packages in [TIME] - "### + " ); Ok(()) @@ -7938,7 +7936,7 @@ fn universal_cycles() -> Result<()> { uv_snapshot!(context.filters(), windows_filters=false, context.pip_compile() .arg("requirements.in") - .arg("--universal"), @r###" + .arg("--universal"), @" success: true exit_code: 0 ----- stdout ----- @@ -7978,7 +7976,7 @@ fn universal_cycles() -> Result<()> { ----- stderr ----- Resolved 10 packages in [TIME] - "### + " ); Ok(()) @@ -8002,7 +8000,7 @@ fn universal_constraint() -> Result<()> { .arg("requirements.in") .arg("-c") .arg("constraints.txt") - .arg("--universal"), @r###" + .arg("--universal"), @" success: true exit_code: 0 ----- stdout ----- @@ -8019,7 +8017,7 @@ fn universal_constraint() -> Result<()> { ----- stderr ----- Resolved 3 packages in [TIME] - "### + " ); Ok(()) @@ -8043,7 +8041,7 @@ fn universal_constraint_marker() -> Result<()> { .arg("requirements.in") .arg("-c") .arg("constraints.txt") - .arg("--universal"), @r###" + .arg("--universal"), @" success: true exit_code: 0 ----- stdout ----- @@ -8060,7 +8058,7 @@ fn universal_constraint_marker() -> Result<()> { ----- stderr ----- Resolved 3 packages in [TIME] - "### + " ); Ok(()) @@ -8091,7 +8089,7 @@ fn universal_multi_version() -> Result<()> { .arg("requirements.in") .arg("-c") .arg("constraints.txt") - .arg("--universal"), @r###" + .arg("--universal"), @" success: true exit_code: 0 ----- stdout ----- @@ -8104,7 +8102,7 @@ fn universal_multi_version() -> Result<()> { ----- stderr ----- Resolved 2 packages in [TIME] - "### + " ); Ok(()) @@ -8130,7 +8128,7 @@ fn universal_platform_fork() -> Result<()> { .arg("requirements.in") .arg("--universal") .arg("-c") - .arg("constraints.txt"), @r" + .arg("constraints.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -8185,7 +8183,7 @@ fn universal_disjoint_locals() -> Result<()> { uv_snapshot!(context.filters(), windows_filters=false, context.pip_compile() .arg("requirements.in") - .arg("--universal"), @r###" + .arg("--universal"), @" success: true exit_code: 0 ----- stdout ----- @@ -8222,7 +8220,7 @@ fn universal_disjoint_locals() -> Result<()> { ----- stderr ----- Resolved 12 packages in [TIME] - "### + " ); Ok(()) @@ -8246,7 +8244,7 @@ fn universal_transitive_disjoint_locals() -> Result<()> { // but the local versions are still respected correctly. uv_snapshot!(context.filters(), windows_filters=false, context.pip_compile() .arg("requirements.in") - .arg("--universal"), @r###" + .arg("--universal"), @" success: true exit_code: 0 ----- stdout ----- @@ -8304,7 +8302,7 @@ fn universal_transitive_disjoint_locals() -> Result<()> { ----- stderr ----- Resolved 21 packages in [TIME] - "### + " ); Ok(()) @@ -8336,7 +8334,7 @@ fn universal_local_path_requirement() -> Result<()> { .arg("requirements.in") .arg("--universal") .arg("--find-links") - .arg("https://astral-sh.github.io/pytorch-mirror/whl/torch_stable.html"), @r###" + .arg("https://astral-sh.github.io/pytorch-mirror/whl/torch_stable.html"), @" success: true exit_code: 0 ----- stdout ----- @@ -8374,7 +8372,7 @@ fn universal_local_path_requirement() -> Result<()> { ----- stderr ----- Resolved 12 packages in [TIME] - "### + " ); Ok(()) @@ -8407,7 +8405,7 @@ fn universal_overlapping_local_requirement() -> Result<()> { .arg("requirements.in") .arg("--universal") .arg("--find-links") - .arg("https://astral-sh.github.io/pytorch-mirror/whl/torch_stable.html"), @r###" + .arg("https://astral-sh.github.io/pytorch-mirror/whl/torch_stable.html"), @" success: true exit_code: 0 ----- stdout ----- @@ -8445,7 +8443,7 @@ fn universal_overlapping_local_requirement() -> Result<()> { ----- stderr ----- Resolved 12 packages in [TIME] - "### + " ); Ok(()) @@ -8481,7 +8479,7 @@ fn universal_disjoint_local_requirement() -> Result<()> { .arg("requirements.in") .arg("--universal") .arg("--find-links") - .arg("https://astral-sh.github.io/pytorch-mirror/whl/torch_stable.html"), @r###" + .arg("https://astral-sh.github.io/pytorch-mirror/whl/torch_stable.html"), @" success: true exit_code: 0 ----- stdout ----- @@ -8523,7 +8521,7 @@ fn universal_disjoint_local_requirement() -> Result<()> { ----- stderr ----- Resolved 13 packages in [TIME] - "### + " ); Ok(()) @@ -8560,7 +8558,7 @@ fn universal_disjoint_base_or_local_requirement() -> Result<()> { .arg("requirements.in") .arg("--universal") .arg("--find-links") - .arg("https://astral-sh.github.io/pytorch-mirror/whl/torch_stable.html"), @r" + .arg("https://astral-sh.github.io/pytorch-mirror/whl/torch_stable.html"), @" success: true exit_code: 0 ----- stdout ----- @@ -8641,7 +8639,7 @@ fn universal_nested_overlapping_local_requirement() -> Result<()> { .arg("requirements.in") .arg("--universal") .arg("--find-links") - .arg("https://astral-sh.github.io/pytorch-mirror/whl/torch_stable.html"), @r" + .arg("https://astral-sh.github.io/pytorch-mirror/whl/torch_stable.html"), @" success: true exit_code: 0 ----- stdout ----- @@ -8720,7 +8718,7 @@ fn universal_nested_overlapping_local_requirement() -> Result<()> { .arg("requirements.in") .arg("--universal") .arg("--find-links") - .arg("https://astral-sh.github.io/pytorch-mirror/whl/torch_stable.html"), @r###" + .arg("https://astral-sh.github.io/pytorch-mirror/whl/torch_stable.html"), @" success: true exit_code: 0 ----- stdout ----- @@ -8768,7 +8766,7 @@ fn universal_nested_overlapping_local_requirement() -> Result<()> { ----- stderr ----- Resolved 17 packages in [TIME] - "### + " ); Ok(()) @@ -8805,7 +8803,7 @@ fn universal_nested_disjoint_local_requirement() -> Result<()> { .arg("requirements.in") .arg("--universal") .arg("--find-links") - .arg("https://astral-sh.github.io/pytorch-mirror/whl/torch_stable.html"), @r" + .arg("https://astral-sh.github.io/pytorch-mirror/whl/torch_stable.html"), @" success: true exit_code: 0 ----- stdout ----- @@ -8886,7 +8884,7 @@ fn existing_prerelease_preference() -> Result<()> { uv_snapshot!(context.filters(), windows_filters=false, context.pip_compile() .arg("requirements.in") .arg("-o") - .arg("requirements.txt"), @r###" + .arg("requirements.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -8899,7 +8897,7 @@ fn existing_prerelease_preference() -> Result<()> { ----- stderr ----- Resolved 2 packages in [TIME] - "### + " ); Ok(()) @@ -8917,7 +8915,7 @@ fn universal_disjoint_prereleases() -> Result<()> { uv_snapshot!(context.filters(), windows_filters=false, context.pip_compile() .arg("requirements.in") - .arg("--universal"), @r###" + .arg("--universal"), @" success: true exit_code: 0 ----- stdout ----- @@ -8930,7 +8928,7 @@ fn universal_disjoint_prereleases() -> Result<()> { ----- stderr ----- Resolved 2 packages in [TIME] - "### + " ); Ok(()) @@ -8956,7 +8954,7 @@ fn universal_disjoint_prereleases_preference() -> Result<()> { .arg("requirements.in") .arg("-o") .arg("requirements.txt") - .arg("--universal"), @r###" + .arg("--universal"), @" success: true exit_code: 0 ----- stdout ----- @@ -8969,7 +8967,7 @@ fn universal_disjoint_prereleases_preference() -> Result<()> { ----- stderr ----- Resolved 2 packages in [TIME] - "### + " ); Ok(()) @@ -8998,7 +8996,7 @@ fn universal_disjoint_prereleases_preference_marker() -> Result<()> { .arg("requirements.in") .arg("-o") .arg("requirements.txt") - .arg("--universal"), @r###" + .arg("--universal"), @" success: true exit_code: 0 ----- stdout ----- @@ -9011,7 +9009,7 @@ fn universal_disjoint_prereleases_preference_marker() -> Result<()> { ----- stderr ----- Resolved 2 packages in [TIME] - "### + " ); Ok(()) @@ -9032,7 +9030,7 @@ fn universal_disjoint_prereleases_allow() -> Result<()> { .arg("requirements.in") .arg("--universal") .arg("--prerelease") - .arg("allow"), @r###" + .arg("allow"), @" success: true exit_code: 0 ----- stdout ----- @@ -9047,7 +9045,7 @@ fn universal_disjoint_prereleases_allow() -> Result<()> { ----- stderr ----- Resolved 3 packages in [TIME] - "### + " ); Ok(()) @@ -9067,7 +9065,7 @@ fn universal_transitive_disjoint_prerelease_requirement() -> Result<()> { uv_snapshot!(context.filters(), windows_filters=false, context.pip_compile() .arg("requirements.in") - .arg("--universal"), @r###" + .arg("--universal"), @" success: true exit_code: 0 ----- stdout ----- @@ -9088,7 +9086,7 @@ fn universal_transitive_disjoint_prerelease_requirement() -> Result<()> { ----- stderr ----- Resolved 4 packages in [TIME] - "### + " ); Ok(()) @@ -9107,7 +9105,7 @@ fn universal_prerelease_mode() -> Result<()> { uv_snapshot!(context.filters(), windows_filters=false, context.pip_compile() .arg("--prerelease=allow") .arg("requirements.in") - .arg("--universal"), @r###" + .arg("--universal"), @" success: true exit_code: 0 ----- stdout ----- @@ -9120,7 +9118,7 @@ fn universal_prerelease_mode() -> Result<()> { ----- stderr ----- Resolved 2 packages in [TIME] - "### + " ); Ok(()) @@ -9151,7 +9149,7 @@ fn universal_overlapping_prerelease_requirement() -> Result<()> { uv_snapshot!(context.filters(), windows_filters=false, context.pip_compile() .arg("requirements.in") - .arg("--universal"), @r###" + .arg("--universal"), @" success: true exit_code: 0 ----- stdout ----- @@ -9168,7 +9166,7 @@ fn universal_overlapping_prerelease_requirement() -> Result<()> { ----- stderr ----- Resolved 3 packages in [TIME] - "### + " ); Ok(()) @@ -9202,7 +9200,7 @@ fn universal_disjoint_prerelease_requirement() -> Result<()> { // but the pre-release versions are still respected correctly. uv_snapshot!(context.filters(), windows_filters=false, context.pip_compile() .arg("requirements.in") - .arg("--universal"), @r###" + .arg("--universal"), @" success: true exit_code: 0 ----- stdout ----- @@ -9223,7 +9221,7 @@ fn universal_disjoint_prerelease_requirement() -> Result<()> { ----- stderr ----- Resolved 4 packages in [TIME] - "### + " ); Ok(()) @@ -9244,7 +9242,7 @@ fn universal_requires_python() -> Result<()> { .arg("requirements.in") .arg("-p") .arg("3.8") - .arg("--universal"), @r###" + .arg("--universal"), @" success: true exit_code: 0 ----- stdout ----- @@ -9258,7 +9256,7 @@ fn universal_requires_python() -> Result<()> { ----- stderr ----- warning: The requested Python version 3.8 is not available; 3.12.[X] will be used to build dependencies instead. Resolved 2 packages in [TIME] - "### + " ); Ok(()) @@ -9277,7 +9275,7 @@ fn universal_requires_python_incomplete() -> Result<()> { .arg("requirements.in") .arg("-p") .arg("3.7") - .arg("--universal"), @r###" + .arg("--universal"), @" success: true exit_code: 0 ----- stdout ----- @@ -9289,7 +9287,7 @@ fn universal_requires_python_incomplete() -> Result<()> { ----- stderr ----- warning: The requested Python version 3.7 is not available; 3.12.[X] will be used to build dependencies instead. Resolved 1 package in [TIME] - "### + " ); Ok(()) @@ -9314,7 +9312,7 @@ fn universal_no_repeated_unconditional_distributions_1() -> Result<()> { .arg("requirements.in") .arg("-p") .arg("3.8") - .arg("--universal"), @r###" + .arg("--universal"), @" success: true exit_code: 0 ----- stdout ----- @@ -9410,7 +9408,7 @@ fn universal_no_repeated_unconditional_distributions_1() -> Result<()> { ----- stderr ----- warning: The requested Python version 3.8 is not available; 3.12.[X] will be used to build dependencies instead. Resolved 41 packages in [TIME] - "### + " ); Ok(()) @@ -9432,7 +9430,7 @@ fn universal_no_repeated_unconditional_distributions_2() -> Result<()> { .arg("requirements.in") .arg("-p") .arg("3.11") - .arg("--universal"), @r###" + .arg("--universal"), @" success: true exit_code: 0 ----- stdout ----- @@ -9464,7 +9462,7 @@ fn universal_no_repeated_unconditional_distributions_2() -> Result<()> { ----- stderr ----- warning: The requested Python version 3.11 is not available; 3.12.[X] will be used to build dependencies instead. Resolved 10 packages in [TIME] - "### + " ); Ok(()) @@ -9485,7 +9483,7 @@ fn universal_prefer_upper_bounds() -> Result<()> { .arg("requirements.in") .arg("-p") .arg("3.8") - .arg("--universal"), @r###" + .arg("--universal"), @" success: true exit_code: 0 ----- stdout ----- @@ -9521,7 +9519,7 @@ fn universal_prefer_upper_bounds() -> Result<()> { ----- stderr ----- warning: The requested Python version 3.8 is not available; 3.12.[X] will be used to build dependencies instead. Resolved 12 packages in [TIME] - "### + " ); Ok(()) @@ -9540,7 +9538,7 @@ fn universal_unnecessary_python() -> Result<()> { .arg("requirements.in") .arg("-p") .arg("3.8") - .arg("--universal"), @r###" + .arg("--universal"), @" success: true exit_code: 0 ----- stdout ----- @@ -9552,7 +9550,7 @@ fn universal_unnecessary_python() -> Result<()> { ----- stderr ----- warning: The requested Python version 3.8 is not available; 3.12.[X] will be used to build dependencies instead. Resolved 1 package in [TIME] - "### + " ); Ok(()) @@ -9585,7 +9583,7 @@ fn universal_marker_propagation() -> Result<()> { .arg("requirements.in") .arg("-p") .arg("3.8") - .arg("--universal"), @r" + .arg("--universal"), @" success: true exit_code: 0 ----- stdout ----- @@ -9673,7 +9671,7 @@ fn universal_disjoint_extra() -> Result<()> { uv_snapshot!(context.filters(), windows_filters=false, context.pip_compile() .arg("requirements.in") - .arg("--universal"), @r###" + .arg("--universal"), @" success: true exit_code: 0 ----- stdout ----- @@ -9702,7 +9700,7 @@ fn universal_disjoint_extra() -> Result<()> { ----- stderr ----- Resolved 9 packages in [TIME] - "### + " ); Ok(()) @@ -9720,7 +9718,7 @@ fn universal_disjoint_extra_no_strip() -> Result<()> { uv_snapshot!(context.filters(), windows_filters=false, context.pip_compile() .arg("requirements.in") .arg("--universal") - .arg("--no-strip-extras"), @r###" + .arg("--no-strip-extras"), @" success: true exit_code: 0 ----- stdout ----- @@ -9753,7 +9751,7 @@ fn universal_disjoint_extra_no_strip() -> Result<()> { ----- stderr ----- Resolved 9 packages in [TIME] - "### + " ); Ok(()) @@ -9770,7 +9768,7 @@ fn universal_overlap_extra_base() -> Result<()> { uv_snapshot!(context.filters(), windows_filters=false, context.pip_compile() .arg("requirements.in") - .arg("--universal"), @r###" + .arg("--universal"), @" success: true exit_code: 0 ----- stdout ----- @@ -9799,7 +9797,7 @@ fn universal_overlap_extra_base() -> Result<()> { ----- stderr ----- Resolved 9 packages in [TIME] - "### + " ); Ok(()) @@ -9817,7 +9815,7 @@ fn universal_overlap_extra_base_no_strip() -> Result<()> { uv_snapshot!(context.filters(), windows_filters=false, context.pip_compile() .arg("requirements.in") .arg("--universal") - .arg("--no-strip-extras"), @r###" + .arg("--no-strip-extras"), @" success: true exit_code: 0 ----- stdout ----- @@ -9848,7 +9846,7 @@ fn universal_overlap_extra_base_no_strip() -> Result<()> { ----- stderr ----- Resolved 9 packages in [TIME] - "### + " ); Ok(()) @@ -9865,7 +9863,7 @@ fn universal_overlap_extras() -> Result<()> { uv_snapshot!(context.filters(), windows_filters=false, context.pip_compile() .arg("requirements.in") - .arg("--universal"), @r###" + .arg("--universal"), @" success: true exit_code: 0 ----- stdout ----- @@ -9894,7 +9892,7 @@ fn universal_overlap_extras() -> Result<()> { ----- stderr ----- Resolved 9 packages in [TIME] - "### + " ); Ok(()) @@ -9912,7 +9910,7 @@ fn universal_overlap_extras_no_strip() -> Result<()> { uv_snapshot!(context.filters(), windows_filters=false, context.pip_compile() .arg("requirements.in") .arg("--universal") - .arg("--no-strip-extras"), @r###" + .arg("--no-strip-extras"), @" success: true exit_code: 0 ----- stdout ----- @@ -9943,7 +9941,7 @@ fn universal_overlap_extras_no_strip() -> Result<()> { ----- stderr ----- Resolved 9 packages in [TIME] - "### + " ); Ok(()) @@ -9960,7 +9958,7 @@ fn universal_identical_extras() -> Result<()> { uv_snapshot!(context.filters(), windows_filters=false, context.pip_compile() .arg("requirements.in") - .arg("--universal"), @r###" + .arg("--universal"), @" success: true exit_code: 0 ----- stdout ----- @@ -9989,7 +9987,7 @@ fn universal_identical_extras() -> Result<()> { ----- stderr ----- Resolved 9 packages in [TIME] - "### + " ); Ok(()) @@ -10007,7 +10005,7 @@ fn universal_identical_extras_no_strip() -> Result<()> { uv_snapshot!(context.filters(), windows_filters=false, context.pip_compile() .arg("requirements.in") .arg("--universal") - .arg("--no-strip-extras"), @r###" + .arg("--no-strip-extras"), @" success: true exit_code: 0 ----- stdout ----- @@ -10036,7 +10034,7 @@ fn universal_identical_extras_no_strip() -> Result<()> { ----- stderr ----- Resolved 9 packages in [TIME] - "### + " ); Ok(()) @@ -10056,7 +10054,7 @@ fn compile_constraints_compatible_version() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") .arg("--constraint") - .arg("constraints.txt"), @r###" + .arg("constraints.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -10075,7 +10073,7 @@ fn compile_constraints_compatible_version() -> Result<()> { ----- stderr ----- Resolved 4 packages in [TIME] - "### + " ); Ok(()) @@ -10095,7 +10093,7 @@ fn compile_constraints_incompatible_version() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") .arg("--constraint") - .arg("constraints.txt"), @r###" + .arg("constraints.txt"), @" success: false exit_code: 1 ----- stdout ----- @@ -10103,7 +10101,7 @@ fn compile_constraints_incompatible_version() -> Result<()> { ----- stderr ----- × No solution found when resolving dependencies: ╰─▶ Because you require filelock==1.0.0 and filelock==3.8.0, we can conclude that your requirements are unsatisfiable. - "### + " ); Ok(()) @@ -10123,7 +10121,7 @@ fn conflicting_url_markers() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") .arg("--constraint") - .arg("constraints.txt"), @r###" + .arg("constraints.txt"), @" success: false exit_code: 1 ----- stdout ----- @@ -10131,7 +10129,7 @@ fn conflicting_url_markers() -> Result<()> { ----- stderr ----- × No solution found when resolving dependencies: ╰─▶ Because you require filelock==1.0.0 and filelock==3.8.0, we can conclude that your requirements are unsatisfiable. - "### + " ); Ok(()) @@ -10154,7 +10152,7 @@ fn editable_override() -> Result<()> { .arg(requirements_in.path()) .arg("--override") .arg(overrides_txt.path()) - .current_dir(current_dir()?), @r###" + .current_dir(current_dir()?), @" success: true exit_code: 0 ----- stdout ----- @@ -10167,7 +10165,7 @@ fn editable_override() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); Ok(()) @@ -10187,7 +10185,7 @@ fn override_editable() -> Result<()> { .arg(requirements_in.path()) .arg("--override") .arg(overrides_txt.path()) - .current_dir(current_dir()?), @r###" + .current_dir(current_dir()?), @" success: true exit_code: 0 ----- stdout ----- @@ -10210,7 +10208,7 @@ fn override_editable() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] - "###); + "); Ok(()) } @@ -10234,7 +10232,7 @@ fn override_with_compatible_constraint() -> Result<()> { .arg("--constraint") .arg("constraints.txt") .arg("--override") - .arg("overrides.txt"), @r###" + .arg("overrides.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -10252,7 +10250,7 @@ fn override_with_compatible_constraint() -> Result<()> { ----- stderr ----- Resolved 3 packages in [TIME] - "### + " ); Ok(()) @@ -10277,7 +10275,7 @@ fn override_with_incompatible_constraint() -> Result<()> { .arg("--constraint") .arg("constraints.txt") .arg("--override") - .arg("overrides.txt"), @r###" + .arg("overrides.txt"), @" success: false exit_code: 1 ----- stdout ----- @@ -10285,7 +10283,7 @@ fn override_with_incompatible_constraint() -> Result<()> { ----- stderr ----- × No solution found when resolving dependencies: ╰─▶ Because you require anyio>=3.0.0 and anyio<3.0.0, we can conclude that your requirements are unsatisfiable. - "### + " ); Ok(()) @@ -10303,7 +10301,7 @@ fn unsafe_package() -> Result<()> { .arg("--unsafe-package") .arg("jinja2") .arg("--unsafe-package") - .arg("pydantic"), @r###" + .arg("pydantic"), @" success: true exit_code: 0 ----- stdout ----- @@ -10329,7 +10327,7 @@ fn unsafe_package() -> Result<()> { ----- stderr ----- Resolved 7 packages in [TIME] - "### + " ); Ok(()) @@ -10345,7 +10343,7 @@ fn prerelease_upper_bound_exclude() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") - .arg("--prerelease=allow"), @r###" + .arg("--prerelease=allow"), @" success: true exit_code: 0 ----- stdout ----- @@ -10366,7 +10364,7 @@ fn prerelease_upper_bound_exclude() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] - "### + " ); Ok(()) @@ -10382,7 +10380,7 @@ fn prerelease_upper_bound_include() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") - .arg("--prerelease=allow"), @r###" + .arg("--prerelease=allow"), @" success: true exit_code: 0 ----- stdout ----- @@ -10405,7 +10403,7 @@ fn prerelease_upper_bound_include() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] - "### + " ); Ok(()) @@ -10420,7 +10418,7 @@ fn pre_alias() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") - .arg("--pre"), @r###" + .arg("--pre"), @" success: true exit_code: 0 ----- stdout ----- @@ -10441,7 +10439,7 @@ fn pre_alias() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] - "### + " ); Ok(()) @@ -10460,7 +10458,7 @@ fn prerelease_constraint() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") .arg("--constraint") - .arg("constraints.txt"), @r###" + .arg("constraints.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -10485,7 +10483,7 @@ fn prerelease_constraint() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] - "### + " ); Ok(()) @@ -10519,7 +10517,7 @@ dev = [ uv_snapshot!(context.filters(), context.pip_compile() .arg("pyproject.toml") .arg("--extra") - .arg("dev"), @r###" + .arg("dev"), @" success: true exit_code: 0 ----- stdout ----- @@ -10536,7 +10534,7 @@ dev = [ ----- stderr ----- Resolved 4 packages in [TIME] - "### + " ); Ok(()) @@ -10569,7 +10567,7 @@ dev = [ uv_snapshot!(context.filters(), context.pip_compile() .arg("pyproject.toml") .arg("--extra") - .arg("dev"), @r###" + .arg("dev"), @" success: true exit_code: 0 ----- stdout ----- @@ -10586,7 +10584,7 @@ dev = [ ----- stderr ----- Resolved 4 packages in [TIME] - "### + " ); Ok(()) @@ -10620,7 +10618,7 @@ dev = [ .arg("pyproject.toml") .arg("--extra") .arg("dev") - .arg("--universal"), @r###" + .arg("--universal"), @" success: true exit_code: 0 ----- stdout ----- @@ -10637,7 +10635,7 @@ dev = [ ----- stderr ----- Resolved 4 packages in [TIME] - "### + " ); Ok(()) @@ -10668,7 +10666,7 @@ qux = ["project[bop] ; python_version == '3.12'"] .arg("pyproject.toml") .arg("--universal") .arg("--extra") - .arg("qux"), @r###" + .arg("qux"), @" success: true exit_code: 0 ----- stdout ----- @@ -10679,7 +10677,7 @@ qux = ["project[bop] ; python_version == '3.12'"] ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); uv_snapshot!(context.filters(), context.pip_compile() @@ -10688,7 +10686,7 @@ qux = ["project[bop] ; python_version == '3.12'"] .arg("--extra") .arg("bop") .arg("--extra") - .arg("bar"), @r###" + .arg("bar"), @" success: true exit_code: 0 ----- stdout ----- @@ -10699,13 +10697,13 @@ qux = ["project[bop] ; python_version == '3.12'"] ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); uv_snapshot!(context.filters(), context.pip_compile() .arg("pyproject.toml") .arg("--universal") - .arg("--all-extras"), @r###" + .arg("--all-extras"), @" success: true exit_code: 0 ----- stdout ----- @@ -10716,7 +10714,7 @@ qux = ["project[bop] ; python_version == '3.12'"] ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); Ok(()) @@ -10733,7 +10731,7 @@ fn editable_direct_dependency() -> Result<()> { .arg(requirements_in.path()) .arg("--resolution") .arg("lowest-direct") - .current_dir(current_dir()?), @r###" + .current_dir(current_dir()?), @" success: true exit_code: 0 ----- stdout ----- @@ -10746,7 +10744,7 @@ fn editable_direct_dependency() -> Result<()> { ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); Ok(()) } @@ -10761,7 +10759,7 @@ fn empty_index_url_env_var() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") .arg("--emit-index-url") - .env(EnvVars::UV_INDEX_URL, ""), @r###" + .env(EnvVars::UV_INDEX_URL, ""), @" success: true exit_code: 0 ----- stdout ----- @@ -10778,7 +10776,7 @@ fn empty_index_url_env_var() -> Result<()> { ----- stderr ----- Resolved 3 packages in [TIME] - "### + " ); Ok(()) @@ -10794,7 +10792,7 @@ fn empty_extra_index_url_env_var() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") .arg("--emit-index-url") - .env(EnvVars::UV_EXTRA_INDEX_URL, ""), @r###" + .env(EnvVars::UV_EXTRA_INDEX_URL, ""), @" success: true exit_code: 0 ----- stdout ----- @@ -10811,7 +10809,7 @@ fn empty_extra_index_url_env_var() -> Result<()> { ----- stderr ----- Resolved 3 packages in [TIME] - "### + " ); Ok(()) @@ -10828,7 +10826,7 @@ fn empty_index_url_env_var_override() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") .arg("--emit-index-url") - .env(EnvVars::UV_INDEX_URL, ""), @r###" + .env(EnvVars::UV_INDEX_URL, ""), @" success: true exit_code: 0 ----- stdout ----- @@ -10841,7 +10839,7 @@ fn empty_index_url_env_var_override() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); Ok(()) @@ -10857,7 +10855,7 @@ fn index_url_env_var_override() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") .arg("--emit-index-url") - .env(EnvVars::UV_INDEX_URL, "https://test.pypi.org/simple"), @r###" + .env(EnvVars::UV_INDEX_URL, "https://test.pypi.org/simple"), @" success: true exit_code: 0 ----- stdout ----- @@ -10870,7 +10868,7 @@ fn index_url_env_var_override() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); Ok(()) @@ -10888,7 +10886,7 @@ fn expand_env_var_requirements_txt() -> Result<()> { requirements_dev_in.write_str("anyio")?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -10903,7 +10901,7 @@ fn expand_env_var_requirements_txt() -> Result<()> { ----- stderr ----- Resolved 3 packages in [TIME] - "### + " ); Ok(()) @@ -10934,7 +10932,7 @@ requires-python = ">=3.13" requirements_in.write_str(&format!("-e {}", editable_dir.path().display()))?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: false exit_code: 1 ----- stdout ----- @@ -10943,7 +10941,7 @@ requires-python = ">=3.13" × No solution found when resolving dependencies: ╰─▶ Because the current Python version (3.12.[X]) does not satisfy Python>=3.13 and example==0.0.0 depends on Python>=3.13, we can conclude that example==0.0.0 cannot be used. And because only example==0.0.0 is available and you require example, we can conclude that your requirements are unsatisfiable. - "### + " ); Ok(()) @@ -10986,7 +10984,7 @@ requires-python = ">=3.13" uv_snapshot!(filters, context.pip_compile() .arg("requirements.in") - .arg("--python-version=3.11"), @r###" + .arg("--python-version=3.11"), @" success: false exit_code: 1 ----- stdout ----- @@ -10995,7 +10993,7 @@ requires-python = ">=3.13" × No solution found when resolving dependencies: ╰─▶ Because the current Python version (3.12.[X]) does not satisfy Python>=3.13 and example==0.0.0 depends on Python>=3.13, we can conclude that example==0.0.0 cannot be used. And because only example==0.0.0 is available and you require example, we can conclude that your requirements are unsatisfiable. - "### + " ); Ok(()) @@ -11026,7 +11024,7 @@ dev = [ requirements_in.write_str("-e .[dev]")?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -11043,7 +11041,7 @@ dev = [ ----- stderr ----- Resolved 4 packages in [TIME] - "### + " ); Ok(()) @@ -11076,7 +11074,7 @@ dev = ["setuptools"] uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") - .arg("--resolution=lowest-direct"), @r###" + .arg("--resolution=lowest-direct"), @" success: true exit_code: 0 ----- stdout ----- @@ -11093,7 +11091,7 @@ dev = ["setuptools"] ----- stderr ----- Resolved 4 packages in [TIME] - "### + " ); Ok(()) @@ -11107,7 +11105,7 @@ fn metadata_2_2() -> Result<()> { requirements_in.write_str("pyo3-mixed @ https://files.pythonhosted.org/packages/2b/b8/e04b783d3569d5b61b1dcdfda683ac2e3617340539aecd0f099fbade0b4a/pyo3_mixed-2.1.5.tar.gz")?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -11120,7 +11118,7 @@ fn metadata_2_2() -> Result<()> { ----- stderr ----- Resolved 2 packages in [TIME] - "### + " ); Ok(()) @@ -11134,7 +11132,7 @@ fn not_found_direct_url() -> Result<()> { requirements_in.write_str("iniconfig @ https://files.pythonhosted.org/packages/ef/a6/fake/iniconfig-2.0.0-py3-none-any.whl")?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: false exit_code: 1 ----- stdout ----- @@ -11143,7 +11141,7 @@ fn not_found_direct_url() -> Result<()> { × Failed to download `iniconfig @ https://files.pythonhosted.org/packages/ef/a6/fake/iniconfig-2.0.0-py3-none-any.whl` ├─▶ Failed to fetch: `https://files.pythonhosted.org/packages/ef/a6/fake/iniconfig-2.0.0-py3-none-any.whl` ╰─▶ HTTP status client error (404 Not Found) for url (https://files.pythonhosted.org/packages/ef/a6/fake/iniconfig-2.0.0-py3-none-any.whl) - "### + " ); Ok(()) @@ -11174,7 +11172,7 @@ requires-python = ">=3.13" requirements_in.write_str(&format!("example @ {}", editable_dir.path().display()))?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: false exit_code: 1 ----- stdout ----- @@ -11183,7 +11181,7 @@ requires-python = ">=3.13" × No solution found when resolving dependencies: ╰─▶ Because the current Python version (3.12.[X]) does not satisfy Python>=3.13 and example==0.0.0 depends on Python>=3.13, we can conclude that example==0.0.0 cannot be used. And because only example==0.0.0 is available and you require example, we can conclude that your requirements are unsatisfiable. - "### + " ); Ok(()) @@ -11200,7 +11198,7 @@ fn compile_root_uri_editable() -> Result<()> { let root_path = current_dir()?.join("../../test/packages/root_editable"); uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") - .env(EnvVars::ROOT_PATH, root_path.as_os_str()), @r###" + .env(EnvVars::ROOT_PATH, root_path.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -11213,7 +11211,7 @@ fn compile_root_uri_editable() -> Result<()> { ----- stderr ----- Resolved 2 packages in [TIME] - "### + " ); Ok(()) @@ -11232,7 +11230,7 @@ fn compile_root_uri_non_editable() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") .env(EnvVars::ROOT_PATH, root_path.as_os_str()) - .env(EnvVars::BLACK_PATH, black_path.as_os_str()), @r###" + .env(EnvVars::BLACK_PATH, black_path.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -11247,7 +11245,7 @@ fn compile_root_uri_non_editable() -> Result<()> { ----- stderr ----- Resolved 2 packages in [TIME] - "### + " ); Ok(()) @@ -11262,14 +11260,14 @@ fn requirement_wheel_name_mismatch() -> Result<()> { requirements_in.write_str("dateutil @ https://files.pythonhosted.org/packages/ec/57/56b9bcc3c9c6a792fcbaf139543cee77261f3651ca9da0c93f5c1221264b/python_dateutil-2.9.0.post0-py2.py3-none-any.whl")?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: Requested package name `dateutil` does not match `python-dateutil` in the distribution filename: https://files.pythonhosted.org/packages/ec/57/56b9bcc3c9c6a792fcbaf139543cee77261f3651ca9da0c93f5c1221264b/python_dateutil-2.9.0.post0-py2.py3-none-any.whl - "### + " ); Ok(()) @@ -11299,7 +11297,7 @@ fn preserve_hashes_no_upgrade() -> Result<()> { .arg("requirements.in") .arg("--output-file") .arg("requirements.txt") - .arg("--generate-hashes"), @r###" + .arg("--generate-hashes"), @r" success: true exit_code: 0 ----- stdout ----- @@ -11313,7 +11311,7 @@ fn preserve_hashes_no_upgrade() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); Ok(()) @@ -11344,7 +11342,7 @@ fn preserve_hashes_upgrade() -> Result<()> { .arg("--output-file") .arg("requirements.txt") .arg("--generate-hashes") - .arg("--upgrade"), @r###" + .arg("--upgrade"), @r" success: true exit_code: 0 ----- stdout ----- @@ -11405,7 +11403,7 @@ fn preserve_hashes_upgrade() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); Ok(()) @@ -11432,7 +11430,7 @@ fn preserve_hashes_no_existing_hashes() -> Result<()> { .arg("requirements.in") .arg("--output-file") .arg("requirements.txt") - .arg("--generate-hashes"), @r###" + .arg("--generate-hashes"), @r" success: true exit_code: 0 ----- stdout ----- @@ -11493,7 +11491,7 @@ fn preserve_hashes_no_existing_hashes() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); Ok(()) @@ -11523,7 +11521,7 @@ fn preserve_hashes_newer_version() -> Result<()> { .arg("requirements.in") .arg("--output-file") .arg("requirements.txt") - .arg("--generate-hashes"), @r###" + .arg("--generate-hashes"), @r" success: true exit_code: 0 ----- stdout ----- @@ -11594,7 +11592,7 @@ fn preserve_hashes_newer_version() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); Ok(()) @@ -11615,7 +11613,7 @@ fn unnamed_path_requirement() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg(requirements_in.path()) - .current_dir(current_dir()?), @r###" + .current_dir(current_dir()?), @" success: true exit_code: 0 ----- stdout ----- @@ -11662,7 +11660,7 @@ fn unnamed_path_requirement() -> Result<()> { ----- stderr ----- Resolved 14 packages in [TIME] - "###); + "); Ok(()) } @@ -11676,7 +11674,7 @@ fn unnamed_git_requirement() -> Result<()> { requirements_in.write_str("git+https://github.com/pallets/flask.git@3.0.0")?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -11701,7 +11699,7 @@ fn unnamed_git_requirement() -> Result<()> { ----- stderr ----- Resolved 7 packages in [TIME] - "###); + "); Ok(()) } @@ -11715,7 +11713,7 @@ fn unnamed_https_requirement() -> Result<()> { requirements_in.write_str("https://github.com/pallets/flask/archive/refs/tags/3.0.2.tar.gz")?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -11740,7 +11738,7 @@ fn unnamed_https_requirement() -> Result<()> { ----- stderr ----- Resolved 7 packages in [TIME] - "###); + "); Ok(()) } @@ -11754,7 +11752,7 @@ fn dynamic_dependencies() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg(requirements_in.path()) - .current_dir(current_dir()?), @r###" + .current_dir(current_dir()?), @" success: true exit_code: 0 ----- stdout ----- @@ -11771,7 +11769,7 @@ fn dynamic_dependencies() -> Result<()> { ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); Ok(()) } @@ -11865,7 +11863,7 @@ fn emit_marker_expression_conditional() -> Result<()> { .arg("requirements.in") .arg("--python-platform") .arg("linux") - .arg("--emit-marker-expression"), @r###" + .arg("--emit-marker-expression"), @" success: true exit_code: 0 ----- stdout ----- @@ -11876,7 +11874,7 @@ fn emit_marker_expression_conditional() -> Result<()> { ----- stderr ----- Resolved in [TIME] - "###); + "); Ok(()) } @@ -11934,7 +11932,7 @@ fn local_version_of_remote_package() -> Result<()> { requirements_in.write_str("anyio")?; uv_snapshot!(context.filters(), context.pip_compile() - .arg(requirements_in.canonicalize()?), @r###" + .arg(requirements_in.canonicalize()?), @" success: true exit_code: 0 ----- stdout ----- @@ -11949,14 +11947,14 @@ fn local_version_of_remote_package() -> Result<()> { ----- stderr ----- Resolved 3 packages in [TIME] - "###); + "); // Actually install the local dependency let mut command = context.pip_install(); command.arg(root_path.join("anyio_local")); uv_snapshot!( context.filters(), - command, @r###" + command, @" success: true exit_code: 0 ----- stdout ----- @@ -11966,12 +11964,12 @@ fn local_version_of_remote_package() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + anyio==4.3.0+foo (from file://[WORKSPACE]/test/packages/anyio_local) - "### + " ); // The local version should _not_ be included in the resolution uv_snapshot!(context.filters(), context.pip_compile() - .arg(requirements_in.canonicalize()?), @r###" + .arg(requirements_in.canonicalize()?), @" success: true exit_code: 0 ----- stdout ----- @@ -11986,7 +11984,7 @@ fn local_version_of_remote_package() -> Result<()> { ----- stderr ----- Resolved 3 packages in [TIME] - "###); + "); // Write a lockfile with the local version let requirements_txt = context.temp_dir.child("requirements.txt"); @@ -12003,7 +12001,7 @@ fn local_version_of_remote_package() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg(requirements_in.canonicalize()?) .arg("--output-file") - .arg(requirements_txt.canonicalize()?), @r###" + .arg(requirements_txt.canonicalize()?), @" success: true exit_code: 0 ----- stdout ----- @@ -12018,7 +12016,7 @@ fn local_version_of_remote_package() -> Result<()> { ----- stderr ----- Resolved 3 packages in [TIME] - "###); + "); Ok(()) } @@ -12032,7 +12030,7 @@ fn pendulum_no_tzdata_on_windows() -> Result<()> { uv_snapshot!( context.filters(), windows_filters=false, - context.pip_compile().arg("requirements.in"), @r###" + context.pip_compile().arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -12053,7 +12051,7 @@ fn pendulum_no_tzdata_on_windows() -> Result<()> { ----- stderr ----- Resolved 5 packages in [TIME] - "###); + "); Ok(()) } @@ -12115,7 +12113,7 @@ requires-python = ">3.8" requirements_in.write_str("./app")?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -12132,7 +12130,7 @@ requires-python = ">3.8" ----- stderr ----- Resolved 4 packages in [TIME] - "### + " ); Ok(()) @@ -12201,7 +12199,7 @@ requires-python = ">3.8" uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") .arg("--override") - .arg("overrides.txt"), @r###" + .arg("overrides.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -12222,7 +12220,7 @@ requires-python = ">3.8" ----- stderr ----- Resolved 5 packages in [TIME] - "### + " ); Ok(()) @@ -12295,7 +12293,7 @@ requires-python = ">3.8" uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") .arg("--override") - .arg("overrides.txt"), @r###" + .arg("overrides.txt"), @" success: false exit_code: 1 ----- stdout ----- @@ -12305,7 +12303,7 @@ requires-python = ">3.8" ╰─▶ Because there is no version of anyio==0.0.0 and lib==0.0.0 depends on anyio==0.0.0, we can conclude that lib==0.0.0 cannot be used. And because only lib==0.0.0 is available and example==0.0.0 depends on lib, we can conclude that example==0.0.0 cannot be used. And because only example==0.0.0 is available and you require example, we can conclude that your requirements are unsatisfiable. - "### + " ); // Now constrain `anyio` to the local version. @@ -12317,7 +12315,7 @@ requires-python = ">3.8" .arg("--override") .arg("overrides.txt") .arg("--constraint") - .arg("constraints.txt"), @r###" + .arg("constraints.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -12337,7 +12335,7 @@ requires-python = ">3.8" ----- stderr ----- Resolved 4 packages in [TIME] - "### + " ); Ok(()) @@ -12366,7 +12364,7 @@ requires-python = ">3.8" requirements_in.write_str(".")?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -12391,7 +12389,7 @@ requires-python = ">3.8" ----- stderr ----- Resolved 7 packages in [TIME] - "### + " ); Ok(()) @@ -12420,7 +12418,7 @@ requires-python = ">3.8" requirements_in.write_str("-e .")?; uv_snapshot!( context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -12445,7 +12443,7 @@ requires-python = ">3.8" ----- stderr ----- Resolved 7 packages in [TIME] - "### + " ); Ok(()) @@ -12468,7 +12466,7 @@ fn compile_index_url_first_match_base() -> Result<()> { .arg("--extra-index-url") .arg("https://astral-sh.github.io/pytorch-mirror/whl/cpu") .arg("requirements.in") - .arg("--no-deps"), @r###" + .arg("--no-deps"), @" success: false exit_code: 1 ----- stdout ----- @@ -12478,7 +12476,7 @@ fn compile_index_url_first_match_base() -> Result<()> { ╰─▶ Because there is no version of jinja2==3.1.0 and you require jinja2==3.1.0, we can conclude that your requirements are unsatisfiable. hint: `jinja2` was found on https://astral-sh.github.io/pytorch-mirror/whl/cpu, but not at the requested version (jinja2==3.1.0). A compatible version may be available on a subsequent index (e.g., https://pypi.org/simple). By default, uv will only consider versions that are published on the first index that contains a given package, to avoid dependency confusion attacks. If all indexes are equally trusted, use `--index-strategy unsafe-best-match` to consider all versions from all indexes, regardless of the order in which they were defined. - "### + " ); Ok(()) @@ -12502,7 +12500,7 @@ fn compile_index_url_first_match_marker() -> Result<()> { .arg("--extra-index-url") .arg("https://astral-sh.github.io/pytorch-mirror/whl/cpu") .arg("requirements.in") - .arg("--no-deps"), @r###" + .arg("--no-deps"), @" success: false exit_code: 1 ----- stdout ----- @@ -12512,7 +12510,7 @@ fn compile_index_url_first_match_marker() -> Result<()> { ╰─▶ Because there is no version of jinja2{sys_platform == 'linux'}==3.1.0 and you require jinja2{sys_platform == 'linux'}==3.1.0, we can conclude that your requirements are unsatisfiable. hint: `jinja2` was found on https://astral-sh.github.io/pytorch-mirror/whl/cpu, but not at the requested version (jinja2==3.1.0). A compatible version may be available on a subsequent index (e.g., https://pypi.org/simple). By default, uv will only consider versions that are published on the first index that contains a given package, to avoid dependency confusion attacks. If all indexes are equally trusted, use `--index-strategy unsafe-best-match` to consider all versions from all indexes, regardless of the order in which they were defined. - "### + " ); Ok(()) @@ -12535,7 +12533,7 @@ fn compile_index_url_first_match_all_versions() -> Result<()> { .arg("--extra-index-url") .arg("https://test.pypi.org/simple") .arg("requirements.in") - .arg("--no-deps"), @r###" + .arg("--no-deps"), @" success: false exit_code: 1 ----- stdout ----- @@ -12543,7 +12541,7 @@ fn compile_index_url_first_match_all_versions() -> Result<()> { ----- stderr ----- × No solution found when resolving dependencies: ╰─▶ Because there are no versions of pandas and you require pandas, we can conclude that your requirements are unsatisfiable. - "### + " ); Ok(()) @@ -12569,7 +12567,7 @@ fn compile_index_url_fallback() -> Result<()> { .arg("--extra-index-url") .arg("https://astral-sh.github.io/pytorch-mirror/whl/cpu") .arg("requirements.in") - .arg("--no-deps"), @r###" + .arg("--no-deps"), @" success: true exit_code: 0 ----- stdout ----- @@ -12580,7 +12578,7 @@ fn compile_index_url_fallback() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); Ok(()) @@ -12609,7 +12607,7 @@ fn compile_index_url_fallback_prefer_primary() -> Result<()> { .arg("--extra-index-url") .arg("https://test.pypi.org/simple") .arg("requirements.in") - .arg("--no-deps"), @r###" + .arg("--no-deps"), @" success: true exit_code: 0 ----- stdout ----- @@ -12620,7 +12618,7 @@ fn compile_index_url_fallback_prefer_primary() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); Ok(()) @@ -12649,7 +12647,7 @@ fn compile_index_url_unsafe_highest() -> Result<()> { .arg("--extra-index-url") .arg("https://test.pypi.org/simple") .arg("requirements.in") - .arg("--no-deps"), @r###" + .arg("--no-deps"), @" success: true exit_code: 0 ----- stdout ----- @@ -12660,7 +12658,7 @@ fn compile_index_url_unsafe_highest() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); Ok(()) @@ -12694,7 +12692,7 @@ fn compile_index_url_unsafe_lowest() -> Result<()> { .arg("--extra-index-url") .arg("https://test.pypi.org/simple") .arg("requirements.in") - .arg("--no-deps"), @r" + .arg("--no-deps"), @" success: true exit_code: 0 ----- stdout ----- @@ -12724,7 +12722,7 @@ fn emit_index_annotation_hide_password() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") .arg("--emit-index-annotation") - .env(EnvVars::UV_INDEX_URL, "https://test-user:test-password@pypi.org/simple"), @r###" + .env(EnvVars::UV_INDEX_URL, "https://test-user:test-password@pypi.org/simple"), @" success: true exit_code: 0 ----- stdout ----- @@ -12748,7 +12746,7 @@ fn emit_index_annotation_hide_password() -> Result<()> { ----- stderr ----- Resolved 5 packages in [TIME] - "### + " ); Ok(()) @@ -12764,7 +12762,7 @@ fn emit_index_annotation_pypi_org_simple() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") - .arg("--emit-index-annotation"), @r###" + .arg("--emit-index-annotation"), @" success: true exit_code: 0 ----- stdout ----- @@ -12788,7 +12786,7 @@ fn emit_index_annotation_pypi_org_simple() -> Result<()> { ----- stderr ----- Resolved 5 packages in [TIME] - "### + " ); Ok(()) @@ -12808,7 +12806,7 @@ fn emit_index_annotation_no_annotate() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") .arg("--emit-index-annotation") - .arg("--no-annotate"), @r###" + .arg("--no-annotate"), @" success: true exit_code: 0 ----- stdout ----- @@ -12827,7 +12825,7 @@ fn emit_index_annotation_no_annotate() -> Result<()> { ----- stderr ----- Resolved 5 packages in [TIME] - "### + " ); Ok(()) @@ -12845,7 +12843,7 @@ fn emit_index_annotation_line() -> Result<()> { .arg("requirements.in") .arg("--emit-index-annotation") .arg("--annotation-style") - .arg("line"), @r###" + .arg("line"), @" success: true exit_code: 0 ----- stdout ----- @@ -12864,7 +12862,7 @@ fn emit_index_annotation_line() -> Result<()> { ----- stderr ----- Resolved 5 packages in [TIME] - "### + " ); Ok(()) @@ -12882,7 +12880,7 @@ fn emit_index_annotation_multiple_indexes() -> Result<()> { .arg("requirements.in") .arg("--extra-index-url") .arg("https://test.pypi.org/simple") - .arg("--emit-index-annotation"), @r" + .arg("--emit-index-annotation"), @" success: true exit_code: 0 ----- stdout ----- @@ -12920,7 +12918,7 @@ fn no_version_for_direct_dependency() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") // Must error before we make any network requests - .arg("--offline"), @r###" + .arg("--offline"), @" success: false exit_code: 1 ----- stdout ----- @@ -12928,7 +12926,7 @@ fn no_version_for_direct_dependency() -> Result<()> { ----- stderr ----- × No solution found when resolving dependencies: ╰─▶ you require pypyp ∅ - "### + " ); Ok(()) @@ -12947,7 +12945,7 @@ fn python_platform() -> Result<()> { context.pip_compile() .arg("requirements.in") .arg("--python-platform") - .arg("aarch64-unknown-linux-gnu"), @r###" + .arg("aarch64-unknown-linux-gnu"), @" success: true exit_code: 0 ----- stdout ----- @@ -12968,7 +12966,7 @@ fn python_platform() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] - "### + " ); uv_snapshot!(context.filters(), @@ -12976,7 +12974,7 @@ fn python_platform() -> Result<()> { context.pip_compile() .arg("requirements.in") .arg("--python-platform") - .arg("x86_64-pc-windows-msvc"), @r###" + .arg("x86_64-pc-windows-msvc"), @" success: true exit_code: 0 ----- stdout ----- @@ -12999,7 +12997,7 @@ fn python_platform() -> Result<()> { ----- stderr ----- Resolved 7 packages in [TIME] - "### + " ); Ok(()) @@ -13031,7 +13029,7 @@ fn git_source_default_branch() -> Result<()> { .collect(); uv_snapshot!(filters, context.pip_compile() - .arg("pyproject.toml"), @r###" + .arg("pyproject.toml"), @" success: true exit_code: 0 ----- stdout ----- @@ -13042,7 +13040,7 @@ fn git_source_default_branch() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "###); + "); Ok(()) } @@ -13067,7 +13065,7 @@ fn git_source_branch() -> Result<()> { "#})?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("pyproject.toml"), @r###" + .arg("pyproject.toml"), @" success: true exit_code: 0 ----- stdout ----- @@ -13078,7 +13076,7 @@ fn git_source_branch() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "###); + "); Ok(()) } @@ -13103,7 +13101,7 @@ fn git_source_tag() -> Result<()> { "#})?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("pyproject.toml"), @r###" + .arg("pyproject.toml"), @" success: true exit_code: 0 ----- stdout ----- @@ -13114,7 +13112,7 @@ fn git_source_tag() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "###); + "); Ok(()) } @@ -13139,7 +13137,7 @@ fn git_source_long_commit() -> Result<()> { "#})?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("pyproject.toml"), @r###" + .arg("pyproject.toml"), @" success: true exit_code: 0 ----- stdout ----- @@ -13150,7 +13148,7 @@ fn git_source_long_commit() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "###); + "); Ok(()) } @@ -13175,7 +13173,7 @@ fn git_source_short_commit() -> Result<()> { "#})?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("pyproject.toml"), @r###" + .arg("pyproject.toml"), @" success: true exit_code: 0 ----- stdout ----- @@ -13186,7 +13184,7 @@ fn git_source_short_commit() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "###); + "); Ok(()) } @@ -13211,7 +13209,7 @@ fn git_source_refs() -> Result<()> { "#})?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("pyproject.toml"), @r###" + .arg("pyproject.toml"), @" success: true exit_code: 0 ----- stdout ----- @@ -13222,7 +13220,7 @@ fn git_source_refs() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "###); + "); Ok(()) } @@ -13251,7 +13249,7 @@ fn git_source_missing_tag() -> Result<()> { "#})?; uv_snapshot!(filters, context.pip_compile() - .arg("pyproject.toml"), @r###" + .arg("pyproject.toml"), @" success: false exit_code: 1 ----- stdout ----- @@ -13264,7 +13262,7 @@ fn git_source_missing_tag() -> Result<()> { ╰─▶ process didn't exit successfully: `git fetch --force --update-head-ok 'https://github.com/astral-test/uv-public-pypackage' '+refs/tags/missing:refs/remotes/origin/tags/missing'` (exit status: 128) --- stderr fatal: couldn't find remote ref refs/tags/missing - "###); + "); Ok(()) } @@ -13288,7 +13286,7 @@ fn warn_missing_constraint() -> Result<()> { "#})?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("pyproject.toml"), @r###" + .arg("pyproject.toml"), @" success: true exit_code: 0 ----- stdout ----- @@ -13305,7 +13303,7 @@ fn warn_missing_constraint() -> Result<()> { ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); Ok(()) } @@ -13327,7 +13325,7 @@ fn dont_warn_missing_constraint_without_sources() -> Result<()> { "#})?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("pyproject.toml"), @r###" + .arg("pyproject.toml"), @" success: true exit_code: 0 ----- stdout ----- @@ -13344,7 +13342,7 @@ fn dont_warn_missing_constraint_without_sources() -> Result<()> { ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); Ok(()) } @@ -13398,7 +13396,7 @@ fn tool_uv_sources() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg(require_path) .arg("--extra") - .arg("utils"), @r###" + .arg("utils"), @" success: true exit_code: 0 ----- stdout ----- @@ -13423,7 +13421,7 @@ fn tool_uv_sources() -> Result<()> { ----- stderr ----- Resolved 8 packages in [TIME] - "### + " ); Ok(()) @@ -13445,7 +13443,7 @@ fn invalid_tool_uv_sources() -> Result<()> { "#})?; uv_snapshot!(context.filters(), context.pip_compile() - .arg(context.temp_dir.join("pyproject.toml")), @r###" + .arg(context.temp_dir.join("pyproject.toml")), @" success: false exit_code: 2 ----- stdout ----- @@ -13455,7 +13453,7 @@ fn invalid_tool_uv_sources() -> Result<()> { Caused by: Expected direct URL (`https://files.pythonhosted.org/packages/a2/73/a68704750a7679d0b6d3ad7aa8d4da8e14e151ae82e6fee774e6e0d05ec8/urllib3-2.2.1-py3-none-any.tar.baz`) to end in a supported file extension: `.whl`, `.tar.gz`, `.zip`, `.tar.bz2`, `.tar.lz`, `.tar.lzma`, `.tar.xz`, `.tar.zst`, `.tar`, `.tbz`, `.tgz`, `.tlz`, or `.txz` urllib3 @ https://files.pythonhosted.org/packages/a2/73/a68704750a7679d0b6d3ad7aa8d4da8e14e151ae82e6fee774e6e0d05ec8/urllib3-2.2.1-py3-none-any.tar.baz ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - "### + " ); // Write an invalid extension on a source. @@ -13473,7 +13471,7 @@ fn invalid_tool_uv_sources() -> Result<()> { "#})?; uv_snapshot!(context.filters(), context.pip_compile() - .arg(context.temp_dir.join("pyproject.toml")), @r###" + .arg(context.temp_dir.join("pyproject.toml")), @" success: false exit_code: 2 ----- stdout ----- @@ -13481,7 +13479,7 @@ fn invalid_tool_uv_sources() -> Result<()> { ----- stderr ----- error: Failed to parse entry: `urllib3` Caused by: Expected direct URL (`https://files.pythonhosted.org/packages/a2/73/a68704750a7679d0b6d3ad7aa8d4da8e14e151ae82e6fee774e6e0d05ec8/urllib3-2.2.1-py3-none-any.tar.baz`) to end in a supported file extension: `.whl`, `.tar.gz`, `.zip`, `.tar.bz2`, `.tar.lz`, `.tar.lzma`, `.tar.xz`, `.tar.zst`, `.tar`, `.tbz`, `.tgz`, `.tlz`, or `.txz` - "### + " ); Ok(()) @@ -13505,7 +13503,7 @@ fn dynamic_pyproject_toml() -> Result<()> { let bird_feeder = context.temp_dir.child("bird_feeder/__init__.py"); bird_feeder.write_str("__all__= []")?; - uv_snapshot!(context.filters(), context.pip_compile().arg("pyproject.toml"), @r###" + uv_snapshot!(context.filters(), context.pip_compile().arg("pyproject.toml"), @" success: true exit_code: 0 ----- stdout ----- @@ -13514,7 +13512,7 @@ fn dynamic_pyproject_toml() -> Result<()> { ----- stderr ----- Resolved in [TIME] - "###); + "); Ok(()) } @@ -13529,7 +13527,7 @@ fn file_url() -> Result<()> { let url = Url::from_file_path(requirements_txt.simple_canonicalize()?).expect("valid file URL"); - uv_snapshot!(context.filters(), context.pip_compile().arg(url.to_string()), @r###" + uv_snapshot!(context.filters(), context.pip_compile().arg(url.to_string()), @" success: true exit_code: 0 ----- stdout ----- @@ -13540,7 +13538,7 @@ fn file_url() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "###); + "); Ok(()) } @@ -13556,7 +13554,7 @@ fn no_binary_only_binary() -> Result<()> { .pip_compile() .arg("requirements.in") .arg("--only-binary") - .arg(":all:"), @r###" + .arg(":all:"), @" success: false exit_code: 1 ----- stdout ----- @@ -13567,7 +13565,7 @@ fn no_binary_only_binary() -> Result<()> { And because you require source-distribution<=0.0.1, we can conclude that your requirements are unsatisfiable. hint: Wheels are required for `source-distribution` because building from source is disabled for all packages (i.e., with `--no-build`) - "### + " ); uv_snapshot!(context @@ -13576,7 +13574,7 @@ fn no_binary_only_binary() -> Result<()> { .arg("--only-binary") .arg(":all:") .arg("--no-binary") - .arg("source-distribution"), @r###" + .arg("source-distribution"), @" success: true exit_code: 0 ----- stdout ----- @@ -13587,7 +13585,7 @@ fn no_binary_only_binary() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); Ok(()) @@ -13609,7 +13607,7 @@ fn ignore_invalid_constraint() -> Result<()> { .pip_compile() .arg("requirements.in") .arg("-c") - .arg("constraints.txt"), @r###" + .arg("constraints.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -13622,7 +13620,7 @@ fn ignore_invalid_constraint() -> Result<()> { ----- stderr ----- Resolved 2 packages in [TIME] - "### + " ); Ok(()) @@ -13641,7 +13639,7 @@ fn incompatible_build_constraint() -> Result<()> { uv_snapshot!(context.pip_compile() .arg("requirements.txt") .arg("--build-constraint") - .arg("build_constraints.txt"), @r###" + .arg("build_constraints.txt"), @" success: false exit_code: 1 ----- stdout ----- @@ -13651,7 +13649,7 @@ fn incompatible_build_constraint() -> Result<()> { ├─▶ Failed to resolve requirements from `setup.py` build ├─▶ No solution found when resolving: `setuptools>=40.8.0` ╰─▶ Because you require setuptools>=40.8.0 and setuptools==1, we can conclude that your requirements are unsatisfiable. - "### + " ); Ok(()) @@ -13670,7 +13668,7 @@ fn compatible_build_constraint() -> Result<()> { uv_snapshot!(context.pip_compile() .arg("requirements.txt") .arg("--build-constraint") - .arg("build_constraints.txt"), @r" + .arg("build_constraints.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -13711,7 +13709,7 @@ build-constraint-dependencies = [ )?; uv_snapshot!(context.pip_compile() - .arg("pyproject.toml"), @r###" + .arg("pyproject.toml"), @" success: false exit_code: 1 ----- stdout ----- @@ -13721,7 +13719,7 @@ build-constraint-dependencies = [ ├─▶ Failed to resolve requirements from `setup.py` build ├─▶ No solution found when resolving: `setuptools>=40.8.0` ╰─▶ Because you require setuptools>=40.8.0 and setuptools==1, we can conclude that your requirements are unsatisfiable. - "### + " ); Ok(()) @@ -13752,7 +13750,7 @@ build-constraint-dependencies = [ )?; uv_snapshot!(context.pip_compile() - .arg("pyproject.toml"), @r" + .arg("pyproject.toml"), @" success: true exit_code: 0 ----- stdout ----- @@ -13799,7 +13797,7 @@ build-constraint-dependencies = [ uv_snapshot!(context.pip_compile() .arg("pyproject.toml") .arg("--build-constraint") - .arg("build_constraints.txt"), @r###" + .arg("build_constraints.txt"), @" success: false exit_code: 1 ----- stdout ----- @@ -13809,7 +13807,7 @@ build-constraint-dependencies = [ ├─▶ Failed to resolve requirements from `setup.py` build ├─▶ No solution found when resolving: `setuptools>=40.8.0` ╰─▶ Because you require setuptools>=40 and setuptools==1, we can conclude that your requirements are unsatisfiable. - "### + " ); // compatible setuptools version in pyproject.toml, incompatible in build_constraints.txt @@ -13838,7 +13836,7 @@ build-constraint-dependencies = [ uv_snapshot!(context.pip_compile() .arg("pyproject.toml") .arg("--build-constraint") - .arg("build_constraints.txt"), @r###" + .arg("build_constraints.txt"), @" success: false exit_code: 1 ----- stdout ----- @@ -13848,7 +13846,7 @@ build-constraint-dependencies = [ ├─▶ Failed to resolve requirements from `setup.py` build ├─▶ No solution found when resolving: `setuptools>=40.8.0` ╰─▶ Because you require setuptools==1 and setuptools>=40, we can conclude that your requirements are unsatisfiable. - "### + " ); Ok(()) @@ -13884,7 +13882,7 @@ build-constraint-dependencies = [ uv_snapshot!(context.pip_compile() .arg("pyproject.toml") .arg("--build-constraint") - .arg("build_constraints.txt"), @r" + .arg("build_constraints.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -13924,7 +13922,7 @@ build-constraint-dependencies = [ uv_snapshot!(context.pip_compile() .arg("pyproject.toml") .arg("--build-constraint") - .arg("build_constraints.txt"), @r" + .arg("build_constraints.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -13965,7 +13963,7 @@ fn invalid_extra() -> Result<()> { requirements_in.write_str(".[encryption]")?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -13978,14 +13976,14 @@ fn invalid_extra() -> Result<()> { ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); // Sync the `_anyio` extra. We should reject it. let requirements_in = context.temp_dir.child("requirements.in"); requirements_in.write_str(".[_anyio]")?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: false exit_code: 2 ----- stdout ----- @@ -13995,14 +13993,14 @@ fn invalid_extra() -> Result<()> { Caused by: Expected an alphanumeric character starting the extra name, found `_` .[_anyio] ^ - "###); + "); // Sync the `anyio` extra. We should reject it. let requirements_in = context.temp_dir.child("requirements.in"); requirements_in.write_str(".[anyio]")?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -14014,7 +14012,7 @@ fn invalid_extra() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] warning: The package `project @ file://[TEMP_DIR]/` does not have an extra named `anyio` - "###); + "); Ok(()) } @@ -14039,7 +14037,7 @@ fn symlink() -> Result<()> { uv_snapshot!(context.pip_compile() .arg("requirements.in") .arg("--output-file") - .arg("requirements-symlink.txt"), @r" + .arg("requirements-symlink.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -14088,7 +14086,7 @@ fn universal_constrained_environment() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("pyproject.toml") - .arg("--universal"), @r###" + .arg("--universal"), @" success: true exit_code: 0 ----- stdout ----- @@ -14109,7 +14107,7 @@ fn universal_constrained_environment() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] - "### + " ); Ok(()) @@ -14124,7 +14122,7 @@ fn compile_enumerate_no_versions() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in"), - @r" + @" success: false exit_code: 1 ----- stdout ----- @@ -14148,7 +14146,7 @@ fn compile_requires_txt() -> Result<()> { uv_snapshot!(context .pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -14171,7 +14169,7 @@ fn compile_requires_txt() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] - "###); + "); Ok(()) } @@ -14217,7 +14215,7 @@ exceptiongroup==1.0.0rc8 .arg("-c").arg("constraints.txt") .arg("--universal") .arg("-p").arg("3.10"), - @r###" + @" success: true exit_code: 0 ----- stdout ----- @@ -14308,7 +14306,7 @@ exceptiongroup==1.0.0rc8 ----- stderr ----- Resolved 36 packages in [TIME] - "###); + "); Ok(()) } @@ -14359,7 +14357,7 @@ matplotlib .arg("requirements.in") .arg("--universal") .arg("-p").arg("3.8"), - @r###" + @" success: true exit_code: 0 ----- stdout ----- @@ -14418,7 +14416,7 @@ matplotlib ----- stderr ----- Resolved 22 packages in [TIME] - "###); + "); Ok(()) } @@ -14449,7 +14447,7 @@ fn importlib_metadata_not_repeated() -> Result<()> { .arg("requirements.in") .arg("--universal") .arg("-p").arg("3.7"), - @r###" + @" success: true exit_code: 0 ----- stdout ----- @@ -14480,7 +14478,7 @@ fn importlib_metadata_not_repeated() -> Result<()> { ----- stderr ----- Resolved 10 packages in [TIME] - "###); + "); Ok(()) } @@ -14512,7 +14510,7 @@ fn prune_unreachable() -> Result<()> { .arg("--universal") .arg("-p") .arg("3.7"), - @r###" + @" success: true exit_code: 0 ----- stdout ----- @@ -14523,7 +14521,7 @@ fn prune_unreachable() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "###); + "); Ok(()) } @@ -14541,7 +14539,7 @@ fn unsupported_requires_python_static_metadata() -> Result<()> { uv_snapshot!(context.filters(), context .pip_compile() .arg("--universal") - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -14552,7 +14550,7 @@ fn unsupported_requires_python_static_metadata() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "###); + "); Ok(()) } @@ -14571,7 +14569,7 @@ fn unsupported_requires_python_dynamic_metadata() -> Result<()> { uv_snapshot!(context.filters(), context .pip_compile() .arg("--universal") - .arg("requirements.in"), @r" + .arg("requirements.in"), @" success: false exit_code: 1 ----- stdout ----- @@ -14596,7 +14594,7 @@ fn negation_not_imply_prerelease() -> Result<()> { requirements_in.write_str("flask<2.0.1, !=2.0.0rc1")?; uv_snapshot!(context .pip_compile() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -14619,7 +14617,7 @@ fn negation_not_imply_prerelease() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] - "###); + "); Ok(()) } @@ -14637,7 +14635,7 @@ fn lowest_direct_fork_min_python() -> Result<()> { .arg("requirements.in") .arg("--universal") .arg("--resolution") - .arg("lowest-direct"), @r###" + .arg("lowest-direct"), @" success: true exit_code: 0 ----- stdout ----- @@ -14656,7 +14654,7 @@ fn lowest_direct_fork_min_python() -> Result<()> { ----- stderr ----- Resolved 3 packages in [TIME] - "### + " ); Ok(()) @@ -14675,7 +14673,7 @@ fn lowest_fork_min_python() -> Result<()> { .arg("requirements.in") .arg("--universal") .arg("--resolution") - .arg("lowest"), @r###" + .arg("lowest"), @" success: true exit_code: 0 ----- stdout ----- @@ -14696,7 +14694,7 @@ fn lowest_fork_min_python() -> Result<()> { ----- stderr ----- Resolved 4 packages in [TIME] - "### + " ); Ok(()) @@ -14715,7 +14713,7 @@ fn lowest_direct_fork_max_python() -> Result<()> { .arg("requirements.in") .arg("--universal") .arg("--resolution") - .arg("lowest-direct"), @r###" + .arg("lowest-direct"), @" success: true exit_code: 0 ----- stdout ----- @@ -14730,7 +14728,7 @@ fn lowest_direct_fork_max_python() -> Result<()> { ----- stderr ----- Resolved 2 packages in [TIME] - "### + " ); Ok(()) @@ -14749,7 +14747,7 @@ fn lowest_fork_max_python() -> Result<()> { .arg("requirements.in") .arg("--universal") .arg("--resolution") - .arg("lowest"), @r###" + .arg("lowest"), @" success: true exit_code: 0 ----- stdout ----- @@ -14764,7 +14762,7 @@ fn lowest_fork_max_python() -> Result<()> { ----- stderr ----- Resolved 2 packages in [TIME] - "### + " ); Ok(()) @@ -14789,7 +14787,7 @@ fn same_version_multi_index_incompatibility() -> Result<()> { .arg("--python-platform") .arg("linux") .arg("--python-version") - .arg("3.10"), @r###" + .arg("3.10"), @" success: true exit_code: 0 ----- stdout ----- @@ -14802,7 +14800,7 @@ fn same_version_multi_index_incompatibility() -> Result<()> { ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); Ok(()) } @@ -14842,7 +14840,7 @@ fn compile_derivation_chain() -> Result<()> { .chain([(r"/.*/src", "/[TMP]/src")]) .collect::>(); - uv_snapshot!(filters, context.pip_compile().arg("pyproject.toml"), @r###" + uv_snapshot!(filters, context.pip_compile().arg("pyproject.toml"), @r#" success: false exit_code: 1 ----- stdout ----- @@ -14872,7 +14870,7 @@ fn compile_derivation_chain() -> Result<()> { hint: This usually indicates a problem with the package or the build environment. help: `wsgiref` (v0.1.2) was included because `child` (v0.1.0) depends on `wsgiref` - "### + "# ); Ok(()) @@ -14889,7 +14887,7 @@ fn invalid_platform() -> Result<()> { .pip_compile() .arg("--python-platform") .arg("x86_64-manylinux_2_17") - .arg("requirements.in"), @r" + .arg("requirements.in"), @" success: false exit_code: 1 ----- stdout ----- @@ -14936,7 +14934,7 @@ fn universal_disjoint_deprecated_markers() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") - .arg("--universal"), @r###" + .arg("--universal"), @" success: true exit_code: 0 ----- stdout ----- @@ -14951,7 +14949,7 @@ fn universal_disjoint_deprecated_markers() -> Result<()> { ----- stderr ----- Resolved 3 packages in [TIME] - "### + " ); Ok(()) @@ -14975,7 +14973,7 @@ fn universal_disjoint_override_urls() -> Result<()> { .arg("requirements.in") .arg("--overrides") .arg("overrides.txt") - .arg("--universal"), @r###" + .arg("--universal"), @" success: true exit_code: 0 ----- stdout ----- @@ -14996,7 +14994,7 @@ fn universal_disjoint_override_urls() -> Result<()> { ----- stderr ----- Resolved 4 packages in [TIME] - "### + " ); Ok(()) @@ -15020,7 +15018,7 @@ fn universal_conflicting_override_urls() -> Result<()> { .arg("requirements.in") .arg("--overrides") .arg("overrides.txt") - .arg("--universal"), @r" + .arg("--universal"), @" success: false exit_code: 1 ----- stdout ----- @@ -15053,7 +15051,7 @@ fn compile_lowest_extra_unpinned_warning() -> Result<()> { .arg("--index-url") .arg(packse_index_url()) .arg(requirements_in.path()) - .env_remove(EnvVars::UV_EXCLUDE_NEWER), @r" + .env_remove(EnvVars::UV_EXCLUDE_NEWER), @" success: true exit_code: 0 ----- stdout ----- @@ -15092,7 +15090,7 @@ fn disjoint_requires_python() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("--universal") - .arg(requirements_in.path()), @r###" + .arg(requirements_in.path()), @" success: true exit_code: 0 ----- stdout ----- @@ -15107,7 +15105,7 @@ fn disjoint_requires_python() -> Result<()> { ----- stderr ----- Resolved 3 packages in [TIME] - "### + " ); Ok(()) @@ -15163,7 +15161,7 @@ fn dynamic_version_source_dist() -> Result<()> { .arg(requirements_in.path()) .arg("--no-index") .arg("--find-links") - .arg(context.temp_dir.path()), @r###" + .arg(context.temp_dir.path()), @" success: true exit_code: 0 ----- stdout ----- @@ -15174,7 +15172,7 @@ fn dynamic_version_source_dist() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); Ok(()) @@ -15196,7 +15194,7 @@ fn max_python_requirement() -> Result<()> { .arg("requires-python") .arg("--universal") .arg("--python-version") - .arg("3.7"), @r###" + .arg("3.7"), @" success: true exit_code: 0 ----- stdout ----- @@ -15254,7 +15252,7 @@ fn max_python_requirement() -> Result<()> { ----- stderr ----- warning: The requested Python version 3.7 is not available; 3.8.[X] will be used to build dependencies instead. Resolved 21 packages in [TIME] - "### + " ); uv_snapshot!(context.filters(), windows_filters=false, context.pip_compile() @@ -15263,7 +15261,7 @@ fn max_python_requirement() -> Result<()> { .arg("fewest") .arg("--universal") .arg("--python-version") - .arg("3.7"), @r###" + .arg("3.7"), @" success: true exit_code: 0 ----- stdout ----- @@ -15307,7 +15305,7 @@ fn max_python_requirement() -> Result<()> { ----- stderr ----- warning: The requested Python version 3.7 is not available; 3.8.[X] will be used to build dependencies instead. Resolved 14 packages in [TIME] - "### + " ); Ok(()) @@ -15343,7 +15341,7 @@ fn respect_index_preference() -> Result<()> { .pip_compile() .arg("pyproject.toml") .arg("-o") - .arg("requirements.txt"), @r###" + .arg("requirements.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -15356,7 +15354,7 @@ fn respect_index_preference() -> Result<()> { ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); Ok(()) } @@ -15390,7 +15388,7 @@ fn dependency_group() -> Result<()> { // Passing --group should add just that group's contents from ./pyproject.toml context = new_context()?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("--group").arg("bar"), @r" + .arg("--group").arg("bar"), @" success: true exit_code: 0 ----- stdout ----- @@ -15409,7 +15407,7 @@ fn dependency_group() -> Result<()> { context = new_context()?; uv_snapshot!(context.filters(), context.pip_compile() .arg("pyproject.toml") - .arg("--group").arg("bar"), @r" + .arg("--group").arg("bar"), @" success: true exit_code: 0 ----- stdout ----- @@ -15428,7 +15426,7 @@ fn dependency_group() -> Result<()> { context = new_context()?; uv_snapshot!(context.filters(), context.pip_compile() .arg(context.temp_dir.child("pyproject.toml").path()) - .arg("--group").arg("bar"), @r" + .arg("--group").arg("bar"), @" success: true exit_code: 0 ----- stdout ----- @@ -15446,7 +15444,7 @@ fn dependency_group() -> Result<()> { // An explicit use of `:` syntax, here using what the default is anyway context = new_context()?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("--group").arg("pyproject.toml:bar"), @r" + .arg("--group").arg("pyproject.toml:bar"), @" success: true exit_code: 0 ----- stdout ----- @@ -15463,7 +15461,7 @@ fn dependency_group() -> Result<()> { context = new_context()?; uv_snapshot!(context.filters(), context.pip_compile() .arg("pyproject.toml") - .arg("--group").arg("pyproject.toml:bar"), @r" + .arg("--group").arg("pyproject.toml:bar"), @" success: true exit_code: 0 ----- stdout ----- @@ -15481,7 +15479,7 @@ fn dependency_group() -> Result<()> { // Let's check that the other group works fine individually context = new_context()?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("--group").arg("foo"), @r" + .arg("--group").arg("foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -15498,7 +15496,7 @@ fn dependency_group() -> Result<()> { context = new_context()?; uv_snapshot!(context.filters(), context.pip_compile() .arg("--group").arg("foo") - .arg("--group").arg("bar"), @r" + .arg("--group").arg("bar"), @" success: true exit_code: 0 ----- stdout ----- @@ -15518,7 +15516,7 @@ fn dependency_group() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("pyproject.toml") .arg("--group").arg("foo") - .arg("--group").arg("bar"), @r" + .arg("--group").arg("bar"), @" success: true exit_code: 0 ----- stdout ----- @@ -15581,7 +15579,7 @@ fn many_pyproject_group() -> Result<()> { // Use the 'foo' group from the main toml context = new_context()?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("--group").arg("pyproject.toml:foo"), @r" + .arg("--group").arg("pyproject.toml:foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -15596,7 +15594,7 @@ fn many_pyproject_group() -> Result<()> { // Use the 'foo' group from the subtoml uv_snapshot!(context.filters(), context.pip_compile() - .arg("--group").arg("subdir/pyproject.toml:foo"), @r" + .arg("--group").arg("subdir/pyproject.toml:foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -15614,7 +15612,7 @@ fn many_pyproject_group() -> Result<()> { context = new_context()?; uv_snapshot!(context.filters(), context.pip_compile() .arg("--group").arg("pyproject.toml:foo") - .arg("--group").arg("subdir/pyproject.toml:foo"), @r" + .arg("--group").arg("subdir/pyproject.toml:foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -15677,7 +15675,7 @@ fn suspicious_group() -> Result<()> { context = new_context()?; uv_snapshot!(context.filters(), context.pip_compile() .arg("--group").arg("foo") - .arg("--group").arg("subdir/pyproject.toml:foo"), @r" + .arg("--group").arg("subdir/pyproject.toml:foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -15698,7 +15696,7 @@ fn suspicious_group() -> Result<()> { context = new_context()?; uv_snapshot!(context.filters(), context.pip_compile() .arg("--group").arg("foo") - .arg("--group").arg("subdir/pyproject.toml:bar"), @r" + .arg("--group").arg("subdir/pyproject.toml:bar"), @" success: true exit_code: 0 ----- stdout ----- @@ -15720,7 +15718,7 @@ fn suspicious_group() -> Result<()> { context = new_context()?; uv_snapshot!(context.filters(), context.pip_compile() .arg("subdir/pyproject.toml") - .arg("--group").arg("foo"), @r" + .arg("--group").arg("foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -15740,7 +15738,7 @@ fn suspicious_group() -> Result<()> { context = new_context()?; uv_snapshot!(context.filters(), context.pip_compile() .arg("pyproject.toml") - .arg("--group").arg("subdir/pyproject.toml:foo"), @r" + .arg("--group").arg("subdir/pyproject.toml:foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -15813,7 +15811,7 @@ fn invalid_group() -> Result<()> { // Hey this path needs to end with "pyproject.toml"! uv_snapshot!(context.filters(), context.pip_compile() - .arg("--group").arg("./:foo"), @r" + .arg("--group").arg("./:foo"), @" success: false exit_code: 2 ----- stdout ----- @@ -15826,7 +15824,7 @@ fn invalid_group() -> Result<()> { // Hey this path needs to end with "pyproject.toml"! uv_snapshot!(context.filters(), context.pip_compile() - .arg("--group").arg("subdir/:foo"), @r" + .arg("--group").arg("subdir/:foo"), @" success: false exit_code: 2 ----- stdout ----- @@ -15842,7 +15840,7 @@ fn invalid_group() -> Result<()> { // we should error! uv_snapshot!(context.filters(), context.pip_compile() .arg("--group").arg("bar") - .arg("--group").arg("subdir/pyproject.toml:bar"), @r" + .arg("--group").arg("subdir/pyproject.toml:bar"), @" success: false exit_code: 2 ----- stdout ----- @@ -15927,7 +15925,7 @@ fn project_and_group_workspace_inherit() -> Result<()> { // Check that the workspace's sources are discovered and consulted let context = new_context()?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("--group").arg("packages/mysubproject/pyproject.toml:foo"), @r" + .arg("--group").arg("packages/mysubproject/pyproject.toml:foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -15996,7 +15994,7 @@ fn project_and_group_workspace() -> Result<()> { context = new_context()?; uv_snapshot!(context.filters(), context.pip_compile() .arg("--project").arg("subdir") - .arg("--group").arg("foo"), @r" + .arg("--group").arg("foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -16016,7 +16014,7 @@ fn project_and_group_workspace() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("--project").arg("subdir") .arg("--group").arg("subdir/pyproject.toml:bar") - .arg("--group").arg("foo"), @r" + .arg("--group").arg("foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -16038,7 +16036,7 @@ fn project_and_group_workspace() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("--project").arg("subdir") .arg("--group").arg("bar") - .arg("--group").arg("pyproject.toml:foo"), @r" + .arg("--group").arg("pyproject.toml:foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -16060,7 +16058,7 @@ fn project_and_group_workspace() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("--project").arg("subdir") .arg("--group").arg("subdir/pyproject.toml:bar") - .arg("--group").arg("pyproject.toml:foo"), @r" + .arg("--group").arg("pyproject.toml:foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -16124,7 +16122,7 @@ fn directory_and_group() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("--directory").arg("subdir") .arg("--group").arg("bar") - .arg("--group").arg("../pyproject.toml:foo"), @r" + .arg("--group").arg("../pyproject.toml:foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -16146,7 +16144,7 @@ fn directory_and_group() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("--directory").arg("subdir") .arg("--group").arg("pyproject.toml:bar") - .arg("--group").arg("../pyproject.toml:foo"), @r" + .arg("--group").arg("../pyproject.toml:foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -16169,7 +16167,7 @@ fn directory_and_group() -> Result<()> { .arg("--directory").arg("subdir") .arg("--project").arg("../") .arg("--group").arg("pyproject.toml:bar") - .arg("--group").arg("foo"), @r" + .arg("--group").arg("foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -16202,7 +16200,7 @@ fn group_target_does_not_exist() -> Result<()> { )?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("--group").arg("does/not/exist/pyproject.toml:foo"), @r" + .arg("--group").arg("does/not/exist/pyproject.toml:foo"), @" success: false exit_code: 2 ----- stdout ----- @@ -16230,7 +16228,7 @@ fn compile_preserve_requires_python_split() -> Result<()> { .arg("--universal") .arg("requirements.in") .arg("-o") - .arg("requirements.txt"), @r###" + .arg("requirements.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -16243,7 +16241,7 @@ fn compile_preserve_requires_python_split() -> Result<()> { ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); // Re-running shouldn't change the output. uv_snapshot!(context @@ -16253,7 +16251,7 @@ fn compile_preserve_requires_python_split() -> Result<()> { .arg("--universal") .arg("requirements.in") .arg("-o") - .arg("requirements.txt"), @r###" + .arg("requirements.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -16266,7 +16264,7 @@ fn compile_preserve_requires_python_split() -> Result<()> { ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); Ok(()) } @@ -16284,7 +16282,7 @@ fn markers_on_extra_packages() -> Result<()> { uv_snapshot!(context .pip_compile() .arg("--universal") - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -16301,7 +16299,7 @@ fn markers_on_extra_packages() -> Result<()> { ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); Ok(()) } @@ -16322,7 +16320,7 @@ fn respect_non_local_preference() -> Result<()> { .arg("requirements.txt") .arg("--universal") .arg("--index") - .arg("https://astral-sh.github.io/pytorch-mirror/whl/cpu"), @r###" + .arg("https://astral-sh.github.io/pytorch-mirror/whl/cpu"), @" success: true exit_code: 0 ----- stdout ----- @@ -16353,7 +16351,7 @@ fn respect_non_local_preference() -> Result<()> { ----- stderr ----- Resolved 11 packages in [TIME] - "###); + "); Ok(()) } @@ -16431,7 +16429,7 @@ fn compile_quotes() -> Result<()> { uv_snapshot!(context.filters(), windows_filters=false, context.pip_compile() .arg("requirements.in") - .arg("--universal"), @r" + .arg("--universal"), @" success: true exit_code: 0 ----- stdout ----- @@ -16473,7 +16471,7 @@ fn compile_invalid_output_file() -> Result<()> { .pip_compile() .arg("requirements.in") .arg("-o") - .arg("pyproject.toml"), @r" + .arg("pyproject.toml"), @" success: false exit_code: 2 ----- stdout ----- @@ -16499,7 +16497,7 @@ fn pep_751_filename() -> Result<()> { .arg("--format") .arg("pylock.toml") .arg("-o") - .arg("test.toml"), @r" + .arg("test.toml"), @" success: false exit_code: 2 ----- stdout ----- @@ -16545,7 +16543,7 @@ fn pep_751_compile_registry_wheel() -> Result<()> { uv_snapshot!(context.filters(), context.pip_sync() .arg("--preview") - .arg("pylock.toml"), @r" + .arg("pylock.toml"), @" success: true exit_code: 0 ----- stdout ----- @@ -16593,7 +16591,7 @@ fn pep_751_compile_registry_sdist() -> Result<()> { uv_snapshot!(context.filters(), context.pip_sync() .arg("--preview") - .arg("pylock.toml"), @r" + .arg("pylock.toml"), @" success: true exit_code: 0 ----- stdout ----- @@ -16694,7 +16692,7 @@ fn pep_751_compile_directory() -> Result<()> { uv_snapshot!(context.filters(), context.pip_sync() .arg("--preview") - .arg("pylock.toml"), @r" + .arg("pylock.toml"), @" success: true exit_code: 0 ----- stdout ----- @@ -16748,7 +16746,7 @@ fn pep_751_compile_git() -> Result<()> { uv_snapshot!(context.filters(), context.pip_sync() .arg("--preview") - .arg("pylock.toml"), @r" + .arg("pylock.toml"), @" success: true exit_code: 0 ----- stdout ----- @@ -16810,7 +16808,7 @@ fn pep_751_compile_url_wheel() -> Result<()> { uv_snapshot!(context.filters(), context.pip_sync() .arg("--preview") - .arg("pylock.toml"), @r" + .arg("pylock.toml"), @" success: true exit_code: 0 ----- stdout ----- @@ -16874,7 +16872,7 @@ fn pep_751_compile_url_sdist() -> Result<()> { uv_snapshot!(context.filters(), context.pip_sync() .arg("--preview") - .arg("pylock.toml"), @r" + .arg("pylock.toml"), @" success: true exit_code: 0 ----- stdout ----- @@ -16931,7 +16929,7 @@ fn pep_751_compile_path_wheel() -> Result<()> { uv_snapshot!(context.filters(), context.pip_sync() .arg("--preview") - .arg("pylock.toml"), @r" + .arg("pylock.toml"), @" success: true exit_code: 0 ----- stdout ----- @@ -17010,7 +17008,7 @@ fn pep_751_compile_path_sdist() -> Result<()> { uv_snapshot!(context.filters(), context.pip_sync() .arg("--preview") - .arg("pylock.toml"), @r" + .arg("pylock.toml"), @" success: true exit_code: 0 ----- stdout ----- @@ -17552,7 +17550,7 @@ async fn index_has_no_requires_python() -> Result<()> { .arg("3.9") .arg("--index-url") .arg(server.uri()) - .arg("requirements.in"), @r" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -17572,7 +17570,7 @@ async fn index_has_no_requires_python() -> Result<()> { .arg("3.12") .arg("--index-url") .arg(server.uri()) - .arg("requirements.in"), @r" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -17608,7 +17606,7 @@ fn incompatible_cuda() -> Result<()> { .arg("--python-platform") .arg("x86_64-manylinux_2_28") .arg("--python-version") - .arg("3.11"), @r" + .arg("3.11"), @" success: false exit_code: 1 ----- stdout ----- @@ -17636,7 +17634,7 @@ fn compile_broken_active_venv() -> Result<()> { .venv() .arg("--python") .arg(&broken_system_python) - .arg("venv2"), @r" + .arg("venv2"), @" success: false exit_code: 2 ----- stdout ----- @@ -17650,7 +17648,7 @@ fn compile_broken_active_venv() -> Result<()> { fs_err::os::unix::fs::symlink("/removed/python/interpreter", context.interpreter())?; uv_snapshot!(context .pip_compile() - .arg("requirements.in"), @r" + .arg("requirements.in"), @" success: false exit_code: 2 ----- stdout ----- @@ -17691,7 +17689,7 @@ fn pubgrub_panic_double_self_dependency() -> Result<()> { uv_snapshot!(context.filters(), context .pip_compile() - .arg(requirements_in.path()), @r" + .arg(requirements_in.path()), @" success: true exit_code: 0 ----- stdout ----- @@ -17736,7 +17734,7 @@ fn pubgrub_panic_double_self_dependency_extra() -> Result<()> { uv_snapshot!(context.filters(), context .pip_compile() - .arg(requirements_in.path()), @r" + .arg(requirements_in.path()), @" success: true exit_code: 0 ----- stdout ----- @@ -17769,7 +17767,7 @@ fn git_path_transitive_dependency() -> Result<()> { ", )?; - uv_snapshot!(context.filters(), context.pip_compile().arg("requirements.in"), @r" + uv_snapshot!(context.filters(), context.pip_compile().arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -17796,7 +17794,7 @@ fn omit_python_patch_universal() -> Result<()> { requirements_in.write_str("redis")?; uv_snapshot!(context.filters(), context.pip_compile() - .arg("requirements.in"), @r" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -17812,7 +17810,7 @@ fn omit_python_patch_universal() -> Result<()> { uv_snapshot!(context.filters(), context.pip_compile() .arg("requirements.in") - .arg("--universal"), @r" + .arg("--universal"), @" success: true exit_code: 0 ----- stdout ----- @@ -17867,7 +17865,7 @@ fn credentials_from_subdirectory() -> Result<()> { uv_snapshot!(context.filters(), context .pip_compile() - .arg("foo/pyproject.toml"), @r" + .arg("foo/pyproject.toml"), @" success: false exit_code: 1 ----- stdout ----- @@ -17881,7 +17879,7 @@ fn credentials_from_subdirectory() -> Result<()> { .pip_compile() .arg("foo/pyproject.toml") .env(EnvVars::index_username("INTERNAL"), "public") - .env(EnvVars::index_password("INTERNAL"), "heron"), @r" + .env(EnvVars::index_password("INTERNAL"), "heron"), @" success: true exit_code: 0 ----- stdout ----- @@ -17911,7 +17909,7 @@ fn post_release_less_than() -> Result<()> { // The constraint `>=0.12.0.post1, <0.12.0.post2` should only match 0.12.0.post1. uv_snapshot!(context.pip_compile() - .arg("requirements.in"), @r" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -18003,7 +18001,7 @@ fn compile_with_python_platform_and_built_wheel_for_different_platform() -> Resu .pip_compile() .arg("requirements.in") .arg("--python-platform") - .arg("macos"), @r" + .arg("macos"), @" success: true exit_code: 0 ----- stdout ----- @@ -18022,7 +18020,7 @@ fn compile_with_python_platform_and_built_wheel_for_different_platform() -> Resu .pip_compile() .arg("requirements.in") .arg("--python-platform") - .arg("linux"), @r" + .arg("linux"), @" success: true exit_code: 0 ----- stdout ----- @@ -18041,7 +18039,7 @@ fn compile_with_python_platform_and_built_wheel_for_different_platform() -> Resu .pip_compile() .arg("requirements.in") .arg("--python-platform") - .arg("windows"), @r" + .arg("windows"), @" success: true exit_code: 0 ----- stdout ----- @@ -18057,7 +18055,7 @@ fn compile_with_python_platform_and_built_wheel_for_different_platform() -> Resu uv_snapshot!(context .pip_compile() .arg("requirements.in") - .arg("--universal"), @r" + .arg("--universal"), @" success: true exit_code: 0 ----- stdout ----- @@ -18091,7 +18089,7 @@ fn compile_missing_python() -> Result<()> { .pip_compile() .arg("--python").arg("3.13") .arg("--python-version").arg("3.13") - .arg("requirements.in"), @r" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- diff --git a/crates/uv/tests/it/pip_compile_scenarios.rs b/crates/uv/tests/it/pip_compile_scenarios.rs index d1e2abc96..4ce089f3f 100644 --- a/crates/uv/tests/it/pip_compile_scenarios.rs +++ b/crates/uv/tests/it/pip_compile_scenarios.rs @@ -67,19 +67,19 @@ fn compatible_python_incompatible_override() -> Result<()> { let output = uv_snapshot!(filters, command(&context, python_versions) .arg("--python-version=3.9") - , @r" - success: false - exit_code: 1 - ----- stdout ----- + , @" + success: false + exit_code: 1 + ----- stdout ----- - ----- stderr ----- - warning: The requested Python version 3.9 is not available; 3.11.[X] will be used to build dependencies instead. - × No solution found when resolving dependencies: - ╰─▶ Because the requested Python version (>=3.9) does not satisfy Python>=3.10 and package-a==1.0.0 depends on Python>=3.10, we can conclude that package-a==1.0.0 cannot be used. - And because you require package-a==1.0.0, we can conclude that your requirements are unsatisfiable. + ----- stderr ----- + warning: The requested Python version 3.9 is not available; 3.11.[X] will be used to build dependencies instead. + × No solution found when resolving dependencies: + ╰─▶ Because the requested Python version (>=3.9) does not satisfy Python>=3.10 and package-a==1.0.0 depends on Python>=3.10, we can conclude that package-a==1.0.0 cannot be used. + And because you require package-a==1.0.0, we can conclude that your requirements are unsatisfiable. - hint: The `--python-version` value (>=3.9) includes Python versions that are not supported by your dependencies (e.g., package-a==1.0.0 only supports >=3.10). Consider using a higher `--python-version` value. - " + hint: The `--python-version` value (>=3.9) includes Python versions that are not supported by your dependencies (e.g., package-a==1.0.0 only supports >=3.10). Consider using a higher `--python-version` value. + " ); output.assert().failure(); @@ -120,18 +120,18 @@ fn incompatible_python_compatible_override_available_no_wheels() -> Result<()> { // Since there is a compatible Python version available on the system, it should be used to build the source distributions. let output = uv_snapshot!(filters, command(&context, python_versions) .arg("--python-version=3.11") - , @r" - success: true - exit_code: 0 - ----- stdout ----- - # This file was autogenerated by uv via the following command: - # uv pip compile requirements.in --cache-dir [CACHE_DIR] --python-version=3.11 - package-a==1.0.0 - # via -r requirements.in + , @" + success: true + exit_code: 0 + ----- stdout ----- + # This file was autogenerated by uv via the following command: + # uv pip compile requirements.in --cache-dir [CACHE_DIR] --python-version=3.11 + package-a==1.0.0 + # via -r requirements.in - ----- stderr ----- - Resolved 1 package in [TIME] - " + ----- stderr ----- + Resolved 1 package in [TIME] + " ); output.assert().success().stdout(predicate::str::contains( @@ -173,19 +173,19 @@ fn incompatible_python_compatible_override_no_compatible_wheels() -> Result<()> // Since there are no compatible wheels for the package and it is not compatible with the local installation, we cannot build the source distribution to determine its dependencies. However, the source distribution includes static metadata, which we can use to determine dependencies without building the package. let output = uv_snapshot!(filters, command(&context, python_versions) .arg("--python-version=3.11") - , @r" - success: true - exit_code: 0 - ----- stdout ----- - # This file was autogenerated by uv via the following command: - # uv pip compile requirements.in --cache-dir [CACHE_DIR] --python-version=3.11 - package-a==1.0.0 - # via -r requirements.in + , @" + success: true + exit_code: 0 + ----- stdout ----- + # This file was autogenerated by uv via the following command: + # uv pip compile requirements.in --cache-dir [CACHE_DIR] --python-version=3.11 + package-a==1.0.0 + # via -r requirements.in - ----- stderr ----- - warning: The requested Python version 3.11 is not available; 3.9.[X] will be used to build dependencies instead. - Resolved 1 package in [TIME] - " + ----- stderr ----- + warning: The requested Python version 3.11 is not available; 3.9.[X] will be used to build dependencies instead. + Resolved 1 package in [TIME] + " ); output.assert().success(); @@ -227,19 +227,19 @@ fn incompatible_python_compatible_override_other_wheel() -> Result<()> { // Since there are no wheels for the version of the package compatible with the target and it is not compatible with the local installation, we cannot build the source distribution to determine its dependencies. However, the source distribution includes static metadata, which we can use to determine dependencies without building the package. let output = uv_snapshot!(filters, command(&context, python_versions) .arg("--python-version=3.11") - , @r" - success: true - exit_code: 0 - ----- stdout ----- - # This file was autogenerated by uv via the following command: - # uv pip compile requirements.in --cache-dir [CACHE_DIR] --python-version=3.11 - package-a==1.0.0 - # via -r requirements.in + , @" + success: true + exit_code: 0 + ----- stdout ----- + # This file was autogenerated by uv via the following command: + # uv pip compile requirements.in --cache-dir [CACHE_DIR] --python-version=3.11 + package-a==1.0.0 + # via -r requirements.in - ----- stderr ----- - warning: The requested Python version 3.11 is not available; 3.9.[X] will be used to build dependencies instead. - Resolved 1 package in [TIME] - " + ----- stderr ----- + warning: The requested Python version 3.11 is not available; 3.9.[X] will be used to build dependencies instead. + Resolved 1 package in [TIME] + " ); output.assert().success(); @@ -279,19 +279,19 @@ fn incompatible_python_compatible_override_unavailable_no_wheels() -> Result<()> // Since there are no wheels for the package and it is not compatible with the local installation, we cannot build the source distribution to determine its dependencies. However, the source distribution includes static metadata, which we can use to determine dependencies without building the package. let output = uv_snapshot!(filters, command(&context, python_versions) .arg("--python-version=3.11") - , @r" - success: true - exit_code: 0 - ----- stdout ----- - # This file was autogenerated by uv via the following command: - # uv pip compile requirements.in --cache-dir [CACHE_DIR] --python-version=3.11 - package-a==1.0.0 - # via -r requirements.in + , @" + success: true + exit_code: 0 + ----- stdout ----- + # This file was autogenerated by uv via the following command: + # uv pip compile requirements.in --cache-dir [CACHE_DIR] --python-version=3.11 + package-a==1.0.0 + # via -r requirements.in - ----- stderr ----- - warning: The requested Python version 3.11 is not available; 3.9.[X] will be used to build dependencies instead. - Resolved 1 package in [TIME] - " + ----- stderr ----- + warning: The requested Python version 3.11 is not available; 3.9.[X] will be used to build dependencies instead. + Resolved 1 package in [TIME] + " ); output.assert().success(); @@ -326,19 +326,19 @@ fn incompatible_python_compatible_override() -> Result<()> { let output = uv_snapshot!(filters, command(&context, python_versions) .arg("--python-version=3.11") - , @r" - success: true - exit_code: 0 - ----- stdout ----- - # This file was autogenerated by uv via the following command: - # uv pip compile requirements.in --cache-dir [CACHE_DIR] --python-version=3.11 - package-a==1.0.0 - # via -r requirements.in + , @" + success: true + exit_code: 0 + ----- stdout ----- + # This file was autogenerated by uv via the following command: + # uv pip compile requirements.in --cache-dir [CACHE_DIR] --python-version=3.11 + package-a==1.0.0 + # via -r requirements.in - ----- stderr ----- - warning: The requested Python version 3.11 is not available; 3.9.[X] will be used to build dependencies instead. - Resolved 1 package in [TIME] - " + ----- stderr ----- + warning: The requested Python version 3.11 is not available; 3.9.[X] will be used to build dependencies instead. + Resolved 1 package in [TIME] + " ); output.assert().success().stdout(predicate::str::contains( diff --git a/crates/uv/tests/it/pip_debug.rs b/crates/uv/tests/it/pip_debug.rs index e18836870..b9449fded 100644 --- a/crates/uv/tests/it/pip_debug.rs +++ b/crates/uv/tests/it/pip_debug.rs @@ -4,7 +4,7 @@ use crate::common::{TestContext, uv_snapshot}; fn debug_warn() { let context = TestContext::new("3.12"); - uv_snapshot!(context.pip_debug(), @r" + uv_snapshot!(context.pip_debug(), @" success: false exit_code: 2 ----- stdout ----- diff --git a/crates/uv/tests/it/pip_freeze.rs b/crates/uv/tests/it/pip_freeze.rs index 416e9f2d1..ce1ef8b1f 100644 --- a/crates/uv/tests/it/pip_freeze.rs +++ b/crates/uv/tests/it/pip_freeze.rs @@ -21,7 +21,7 @@ fn freeze_many() -> Result<()> { // Run `pip freeze`. uv_snapshot!(context.pip_freeze() - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -29,7 +29,7 @@ fn freeze_many() -> Result<()> { tomli==2.0.1 ----- stderr ----- - "### + " ); Ok(()) @@ -72,7 +72,7 @@ fn freeze_duplicate() -> Result<()> { )?; // Run `pip freeze`. - uv_snapshot!(context1.filters(), context1.pip_freeze().arg("--strict"), @r###" + uv_snapshot!(context1.filters(), context1.pip_freeze().arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -83,7 +83,7 @@ fn freeze_duplicate() -> Result<()> { warning: The package `pip` has multiple installed distributions: - [SITE_PACKAGES]/pip-21.3.1.dist-info - [SITE_PACKAGES]/pip-22.1.1.dist-info - "### + " ); Ok(()) @@ -106,7 +106,7 @@ fn freeze_url() -> Result<()> { // Run `pip freeze`. uv_snapshot!(context.pip_freeze() - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -116,7 +116,7 @@ fn freeze_url() -> Result<()> { ----- stderr ----- warning: The package `anyio` requires `idna>=2.8`, but it's not installed warning: The package `anyio` requires `sniffio>=1.1`, but it's not installed - "### + " ); Ok(()) @@ -144,7 +144,7 @@ fn freeze_with_editable() -> Result<()> { // Run `pip freeze`. uv_snapshot!(context.filters(), context.pip_freeze() - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -154,13 +154,13 @@ fn freeze_with_editable() -> Result<()> { ----- stderr ----- warning: The package `anyio` requires `idna>=2.8`, but it's not installed warning: The package `anyio` requires `sniffio>=1.1`, but it's not installed - "### + " ); // Exclude editable package. uv_snapshot!(context.filters(), context.pip_freeze() .arg("--exclude-editable") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -169,7 +169,7 @@ fn freeze_with_editable() -> Result<()> { ----- stderr ----- warning: The package `anyio` requires `idna>=2.8`, but it's not installed warning: The package `anyio` requires `sniffio>=1.1`, but it's not installed - "### + " ); Ok(()) @@ -215,14 +215,14 @@ fn freeze_with_egg_info() -> Result<()> { .write_str("")?; // Run `pip freeze`. - uv_snapshot!(context.filters(), context.pip_freeze(), @r###" + uv_snapshot!(context.filters(), context.pip_freeze(), @" success: true exit_code: 0 ----- stdout ----- zstandard==0.22.0 ----- stderr ----- - "###); + "); Ok(()) } @@ -268,14 +268,14 @@ fn freeze_with_egg_info_no_py() -> Result<()> { .write_str("")?; // Run `pip freeze`. - uv_snapshot!(context.filters(), context.pip_freeze(), @r###" + uv_snapshot!(context.filters(), context.pip_freeze(), @" success: true exit_code: 0 ----- stdout ----- zstandard==0.22.0 ----- stderr ----- - "###); + "); Ok(()) } @@ -305,7 +305,7 @@ fn freeze_with_egg_info_file() -> Result<()> { "})?; // Run `pip freeze`. - uv_snapshot!(context.filters(), context.pip_freeze(), @r###" + uv_snapshot!(context.filters(), context.pip_freeze(), @" success: true exit_code: 0 ----- stdout ----- @@ -313,7 +313,7 @@ fn freeze_with_egg_info_file() -> Result<()> { vtk==9.2.6 ----- stderr ----- - "###); + "); Ok(()) } @@ -343,14 +343,14 @@ Version: 0.22.0 .write_str(target.path().to_str().unwrap())?; // Run `pip freeze`. - uv_snapshot!(context.filters(), context.pip_freeze(), @r###" + uv_snapshot!(context.filters(), context.pip_freeze(), @" success: true exit_code: 0 ----- stdout ----- -e [TEMP_DIR]/zstandard_project ----- stderr ----- - "###); + "); Ok(()) } @@ -376,7 +376,7 @@ fn freeze_path() -> Result<()> { // Run `pip freeze`. uv_snapshot!(context.filters(), context.pip_freeze() .arg("--path") - .arg(target.path()), @r" + .arg(target.path()), @" success: true exit_code: 0 ----- stdout ----- @@ -417,7 +417,7 @@ fn freeze_multiple_paths() -> Result<()> { } // Run `pip freeze`. - uv_snapshot!(context.filters(), context.pip_freeze().arg("--path").arg(target1.path()).arg("--path").arg(target2.path()), @r" + uv_snapshot!(context.filters(), context.pip_freeze().arg("--path").arg(target1.path()).arg("--path").arg(target2.path()), @" success: true exit_code: 0 ----- stdout ----- @@ -445,7 +445,7 @@ fn freeze_nonexistent_path() { // Run `pip freeze`. uv_snapshot!(context.filters(), context.pip_freeze() .arg("--path") - .arg(nonexistent_dir.path()), @r" + .arg(nonexistent_dir.path()), @" success: true exit_code: 0 ----- stdout ----- @@ -469,7 +469,7 @@ fn freeze_with_quiet_flag() -> Result<()> { .success(); // Run `pip freeze` with `--quiet` flag. - uv_snapshot!(context.pip_freeze().arg("--quiet"), @r###" + uv_snapshot!(context.pip_freeze().arg("--quiet"), @" success: true exit_code: 0 ----- stdout ----- @@ -477,7 +477,7 @@ fn freeze_with_quiet_flag() -> Result<()> { tomli==2.0.1 ----- stderr ----- - "### + " ); Ok(()) @@ -505,7 +505,7 @@ fn freeze_target() -> Result<()> { // Freeze packages in the target directory. uv_snapshot!(context.filters(), context.pip_freeze() .arg("--target") - .arg(target.path()), @r###" + .arg(target.path()), @" success: true exit_code: 0 ----- stdout ----- @@ -513,17 +513,17 @@ fn freeze_target() -> Result<()> { tomli==2.0.1 ----- stderr ----- - "### + " ); // Without --target, the packages should not be visible. - uv_snapshot!(context.pip_freeze(), @r###" + uv_snapshot!(context.pip_freeze(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- - "### + " ); Ok(()) @@ -551,7 +551,7 @@ fn freeze_prefix() -> Result<()> { // Freeze packages in the prefix directory. uv_snapshot!(context.filters(), context.pip_freeze() .arg("--prefix") - .arg(prefix.path()), @r###" + .arg(prefix.path()), @" success: true exit_code: 0 ----- stdout ----- @@ -559,17 +559,17 @@ fn freeze_prefix() -> Result<()> { tomli==2.0.1 ----- stderr ----- - "### + " ); // Without --prefix, the packages should not be visible. - uv_snapshot!(context.pip_freeze(), @r###" + uv_snapshot!(context.pip_freeze(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- - "### + " ); Ok(()) diff --git a/crates/uv/tests/it/pip_install.rs b/crates/uv/tests/it/pip_install.rs index 58f2f6274..200d903d8 100644 --- a/crates/uv/tests/it/pip_install.rs +++ b/crates/uv/tests/it/pip_install.rs @@ -32,14 +32,14 @@ fn missing_requirements_txt() { uv_snapshot!(context.filters(), context.pip_install() .arg("-r") .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: File not found: `requirements.txt` - "### + " ); requirements_txt.assert(predicates::path::missing()); @@ -54,7 +54,7 @@ fn empty_requirements_txt() -> Result<()> { uv_snapshot!(context.pip_install() .arg("-r") .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -62,7 +62,7 @@ fn empty_requirements_txt() -> Result<()> { ----- stderr ----- warning: Requirements file `requirements.txt` does not contain any dependencies Audited in [TIME] - "### + " ); Ok(()) @@ -74,14 +74,14 @@ fn missing_pyproject_toml() { uv_snapshot!(context.pip_install() .arg("-r") - .arg("pyproject.toml"), @r###" + .arg("pyproject.toml"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: File not found: `pyproject.toml` - "### + " ); } @@ -96,7 +96,7 @@ fn missing_find_links() -> Result<()> { .arg("requirements.txt") .arg("--find-links") .arg("./missing") - .arg("--strict"), @r###" + .arg("--strict"), @" success: false exit_code: 2 ----- stdout ----- @@ -104,7 +104,7 @@ fn missing_find_links() -> Result<()> { ----- stderr ----- error: Failed to read `--find-links` directory: [TEMP_DIR]/missing Caused by: [OS ERROR 2] - "### + " ); Ok(()) @@ -118,7 +118,7 @@ fn invalid_pyproject_toml_syntax() -> Result<()> { uv_snapshot!(context.pip_install() .arg("-r") - .arg("pyproject.toml"), @r" + .arg("pyproject.toml"), @" success: false exit_code: 2 ----- stdout ----- @@ -151,7 +151,7 @@ fn invalid_pyproject_toml_project_schema() -> Result<()> { uv_snapshot!(context.pip_install() .arg("-r") - .arg("pyproject.toml"), @r###" + .arg("pyproject.toml"), @" success: false exit_code: 2 ----- stdout ----- @@ -163,7 +163,7 @@ fn invalid_pyproject_toml_project_schema() -> Result<()> { 1 | [project] | ^^^^^^^^^ `pyproject.toml` is using the `[project]` table, but the required `project.name` field is not set - "### + " ); Ok(()) @@ -179,7 +179,7 @@ fn invalid_pyproject_toml_option_schema() -> Result<()> { "})?; uv_snapshot!(context.pip_install() - .arg("iniconfig"), @r###" + .arg("iniconfig"), @" success: true exit_code: 0 ----- stdout ----- @@ -196,7 +196,7 @@ fn invalid_pyproject_toml_option_schema() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + iniconfig==2.0.0 - "### + " ); Ok(()) @@ -223,7 +223,7 @@ fn invalid_pyproject_toml_option_unknown_field() -> Result<()> { uv_snapshot!(filters, context.pip_install() .arg("-r") - .arg("pyproject.toml"), @r###" + .arg("pyproject.toml"), @r#" success: true exit_code: 0 ----- stdout ----- @@ -238,7 +238,7 @@ fn invalid_pyproject_toml_option_unknown_field() -> Result<()> { Resolved in [TIME] Audited in [TIME] - "### + "# ); Ok(()) @@ -252,7 +252,7 @@ fn invalid_toml_filename() -> Result<()> { uv_snapshot!(context.pip_install() .arg("-r") - .arg("test.toml"), @r" + .arg("test.toml"), @" success: false exit_code: 2 ----- stdout ----- @@ -274,14 +274,14 @@ fn invalid_uv_toml_option_disallowed_automatic_discovery() -> Result<()> { "})?; uv_snapshot!(context.pip_install() - .arg("iniconfig"), @r###" + .arg("iniconfig"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: Failed to parse: `uv.toml`. The `managed` field is not allowed in a `uv.toml` file. `managed` is only applicable in the context of a project, and should be placed in a `pyproject.toml` file instead. - "### + " ); Ok(()) @@ -298,7 +298,7 @@ fn invalid_uv_toml_option_disallowed_command_line() -> Result<()> { uv_snapshot!(context.pip_install() .arg("iniconfig") .arg("--config-file") - .arg("foo.toml"), @r" + .arg("foo.toml"), @" success: false exit_code: 2 ----- stdout ----- @@ -325,7 +325,7 @@ fn cache_uv_toml_credentials() -> Result<()> { uv_snapshot!(context.pip_install() .arg("iniconfig") .arg("--extra-index-url") - .arg("https://public@pypi-proxy.fly.dev/basic-auth/simple/"), @r" + .arg("https://public@pypi-proxy.fly.dev/basic-auth/simple/"), @" success: true exit_code: 0 ----- stdout ----- @@ -367,7 +367,7 @@ dependencies = ["flask==1.0.x"] uv_snapshot!(context.filters(), context.pip_install() .arg("-r") - .arg("requirements.txt"), @r###" + .arg("requirements.txt"), @r##" success: false exit_code: 1 ----- stdout ----- @@ -429,7 +429,7 @@ dependencies = ["flask==1.0.x"] configuration error: `project.dependencies[0]` must be pep508 hint: This usually indicates a problem with the package or the build environment. - "### + "## ); Ok(()) @@ -442,7 +442,7 @@ fn invalid_python_version() { uv_snapshot!(context.filters(), context.pip_install() .arg("flask") .arg("--python-version") - .arg("311"), @r" + .arg("311"), @" success: false exit_code: 2 ----- stdout ----- @@ -457,7 +457,7 @@ fn invalid_python_version() { #[test] fn missing_pip() { - uv_snapshot!(Command::new(get_bin()).arg("install"), @r###" + uv_snapshot!(Command::new(get_bin()).arg("install"), @" success: false exit_code: 2 ----- stdout ----- @@ -470,7 +470,7 @@ fn missing_pip() { Usage: uv [OPTIONS] For more information, try '--help'. - "###); + "); } #[test] @@ -480,7 +480,7 @@ fn no_solution() { uv_snapshot!(context.pip_install() .arg("flask>=3.0.2") .arg("WerkZeug<1.0.0") - .arg("--strict"), @r###" + .arg("--strict"), @" success: false exit_code: 1 ----- stdout ----- @@ -489,7 +489,7 @@ fn no_solution() { × No solution found when resolving dependencies: ╰─▶ Because only flask<=3.0.2 is available and flask==3.0.2 depends on werkzeug>=3.0.0, we can conclude that flask>=3.0.2 depends on werkzeug>=3.0.0. And because you require flask>=3.0.2 and werkzeug<1.0.0, we can conclude that your requirements are unsatisfiable. - "###); + "); } /// Install a package from the command line into a virtual environment. @@ -500,7 +500,7 @@ fn install_package() { // Install Flask. uv_snapshot!(context.pip_install() .arg("Flask") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -516,7 +516,7 @@ fn install_package() { + jinja2==3.1.3 + markupsafe==2.1.5 + werkzeug==3.0.1 - "### + " ); context.assert_command("import flask").success(); @@ -534,7 +534,7 @@ fn install_requirements_txt() -> Result<()> { uv_snapshot!(context.pip_install() .arg("-r") .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -550,7 +550,7 @@ fn install_requirements_txt() -> Result<()> { + jinja2==3.1.3 + markupsafe==2.1.5 + werkzeug==3.0.1 - "### + " ); context.assert_command("import flask").success(); @@ -562,7 +562,7 @@ fn install_requirements_txt() -> Result<()> { uv_snapshot!(context.pip_install() .arg("-r") .arg("requirements.txt") - .arg("--strict"), @r" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -593,7 +593,7 @@ fn install_from_stdin() -> Result<()> { uv_snapshot!(context.pip_install() .arg("-r") .arg("-") - .arg("--strict").stdin(std::fs::File::open(requirements_txt)?), @r###" + .arg("--strict").stdin(std::fs::File::open(requirements_txt)?), @" success: true exit_code: 0 ----- stdout ----- @@ -609,7 +609,7 @@ fn install_from_stdin() -> Result<()> { + jinja2==3.1.3 + markupsafe==2.1.5 + werkzeug==3.0.1 - "### + " ); context.assert_command("import flask").success(); @@ -631,7 +631,7 @@ fn install_from_dev_stdin() -> Result<()> { uv_snapshot!(context.pip_install() .arg("-r") .arg("/dev/stdin") - .arg("--strict").stdin(std::fs::File::open(requirements_txt)?), @r###" + .arg("--strict").stdin(std::fs::File::open(requirements_txt)?), @" success: true exit_code: 0 ----- stdout ----- @@ -647,7 +647,7 @@ fn install_from_dev_stdin() -> Result<()> { + jinja2==3.1.3 + markupsafe==2.1.5 + werkzeug==3.0.1 - "### + " ); context.assert_command("import flask").success(); @@ -672,7 +672,7 @@ async fn install_remote_requirements_txt() -> Result<()> { uv_snapshot!(context.filters(), context.pip_install() .arg("-r") .arg(requirements_url.as_str()) - .arg("--strict"), @r" + .arg("--strict"), @" success: false exit_code: 2 ----- stdout ----- @@ -689,7 +689,7 @@ async fn install_remote_requirements_txt() -> Result<()> { uv_snapshot!(context.pip_install() .arg("-r") .arg(requirements_url.as_str()) - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -705,7 +705,7 @@ async fn install_remote_requirements_txt() -> Result<()> { + jinja2==3.1.3 + markupsafe==2.1.5 + werkzeug==3.0.1 - "### + " ); context.assert_command("import flask").success(); @@ -720,7 +720,7 @@ async fn install_remote_requirements_txt() -> Result<()> { uv_snapshot!(context.pip_install() .arg("-r") .arg(requirements_url.as_str()) - .arg("--strict"), @r" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -774,7 +774,7 @@ fn install_unsupported_flag() -> Result<()> { uv_snapshot!(context.pip_install() .arg("-r") .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -786,7 +786,7 @@ fn install_unsupported_flag() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + iniconfig==2.0.0 - "### + " ); Ok(()) @@ -817,7 +817,7 @@ werkzeug==3.0.1 uv_snapshot!(context.pip_install() .arg("-r") .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: false exit_code: 1 ----- stdout ----- @@ -826,7 +826,7 @@ werkzeug==3.0.1 × No solution found when resolving dependencies: ╰─▶ Because flask==3.0.2 depends on click>=8.1.3 and you require click==7.0.0, we can conclude that your requirements and flask==3.0.2 are incompatible. And because you require flask==3.0.2, we can conclude that your requirements are unsatisfiable. - "### + " ); Ok(()) @@ -850,7 +850,7 @@ fn install_with_dependencies_from_script() -> Result<()> { uv_snapshot!(context.pip_install() .arg("-r") .arg("script.py") - .arg("--strict"), @r" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -881,7 +881,7 @@ fn install_with_dependencies_from_script() -> Result<()> { uv_snapshot!(context.pip_install() .arg("-r") .arg("script.py") - .arg("--strict"), @r" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -927,7 +927,7 @@ build-backend = "poetry.core.masonry.api" .arg("-r") .arg("pyproject.toml") .arg("--extra") - .arg("test"), @r###" + .arg("test"), @" success: true exit_code: 0 ----- stdout ----- @@ -940,7 +940,7 @@ build-backend = "poetry.core.masonry.api" + idna==3.6 + iniconfig==2.0.0 + sniffio==1.3.1 - "### + " ); Ok(()) @@ -958,7 +958,7 @@ fn respect_installed_and_reinstall() -> Result<()> { uv_snapshot!(context.pip_install() .arg("-r") .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -974,7 +974,7 @@ fn respect_installed_and_reinstall() -> Result<()> { + jinja2==3.1.3 + markupsafe==2.1.5 + werkzeug==3.0.1 - "### + " ); context.assert_command("import flask").success(); @@ -986,14 +986,14 @@ fn respect_installed_and_reinstall() -> Result<()> { uv_snapshot!(context.pip_install() .arg("-r") .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Audited 1 package in [TIME] - "### + " ); context.assert_command("import flask").success(); @@ -1006,7 +1006,7 @@ fn respect_installed_and_reinstall() -> Result<()> { uv_snapshot!(context.filters(), context.pip_install() .arg("-r") .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -1018,7 +1018,7 @@ fn respect_installed_and_reinstall() -> Result<()> { Installed [N] packages in [TIME] - flask==2.3.2 + flask==2.3.3 - "### + " ); // Re-install Flask. We should upgrade it. @@ -1030,7 +1030,7 @@ fn respect_installed_and_reinstall() -> Result<()> { .arg("requirements.txt") .arg("--reinstall-package") .arg("Flask") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -1042,7 +1042,7 @@ fn respect_installed_and_reinstall() -> Result<()> { Installed [N] packages in [TIME] - flask==2.3.3 + flask==3.0.2 - "### + " ); // Re-install Flask. We should install even though the version is current @@ -1054,7 +1054,7 @@ fn respect_installed_and_reinstall() -> Result<()> { .arg("requirements.txt") .arg("--reinstall-package") .arg("Flask") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -1065,7 +1065,7 @@ fn respect_installed_and_reinstall() -> Result<()> { Uninstalled [N] packages in [TIME] Installed [N] packages in [TIME] ~ flask==3.0.2 - "### + " ); Ok(()) @@ -1083,7 +1083,7 @@ fn reinstall_extras() -> Result<()> { uv_snapshot!(context.pip_install() .arg("-r") .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -1099,7 +1099,7 @@ fn reinstall_extras() -> Result<()> { + httpx==0.27.0 + idna==3.6 + sniffio==1.3.1 - "### + " ); context.assert_command("import httpx").success(); @@ -1111,7 +1111,7 @@ fn reinstall_extras() -> Result<()> { uv_snapshot!(context.pip_install() .arg("-r") .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -1123,7 +1123,7 @@ fn reinstall_extras() -> Result<()> { + h2==4.1.0 + hpack==4.0.0 + hyperframe==6.0.1 - "### + " ); context.assert_command("import httpx").success(); @@ -1142,7 +1142,7 @@ fn reinstall_incomplete() -> Result<()> { uv_snapshot!(context.pip_install() .arg("-r") - .arg("requirements.txt"), @r###" + .arg("requirements.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -1154,7 +1154,7 @@ fn reinstall_incomplete() -> Result<()> { + anyio==3.7.0 + idna==3.6 + sniffio==1.3.1 - "### + " ); // Manually remove the `RECORD` file. @@ -1166,7 +1166,7 @@ fn reinstall_incomplete() -> Result<()> { uv_snapshot!(context.filters(), context.pip_install() .arg("-r") - .arg("requirements.txt"), @r###" + .arg("requirements.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -1179,7 +1179,7 @@ fn reinstall_incomplete() -> Result<()> { Installed 1 package in [TIME] - anyio==3.7.0 + anyio==4.0.0 - "### + " ); Ok(()) @@ -1195,7 +1195,7 @@ fn exact_install_removes_extraneous_packages() -> Result<()> { uv_snapshot!(context.filters(), context.pip_install() .arg("--exact") .arg("-r") - .arg("requirements.txt"), @r###" + .arg("requirements.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -1207,12 +1207,12 @@ fn exact_install_removes_extraneous_packages() -> Result<()> { + anyio==3.7.0 + idna==3.6 + sniffio==1.3.1 - "### + " ); // Install flask uv_snapshot!(context.filters(), context.pip_install() - .arg("flask"), @r###" + .arg("flask"), @" success: true exit_code: 0 ----- stdout ----- @@ -1228,14 +1228,14 @@ fn exact_install_removes_extraneous_packages() -> Result<()> { + jinja2==3.1.3 + markupsafe==2.1.5 + werkzeug==3.0.1 - "### + " ); // Install requirements file with exact flag removes flask and flask dependencies. uv_snapshot!(context.filters(), context.pip_install() .arg("--exact") .arg("-r") - .arg("requirements.txt"), @r###" + .arg("requirements.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -1250,12 +1250,12 @@ fn exact_install_removes_extraneous_packages() -> Result<()> { - jinja2==3.1.3 - markupsafe==2.1.5 - werkzeug==3.0.1 - "### + " ); // Install flask again uv_snapshot!(context.filters(), context.pip_install() - .arg("flask"), @r###" + .arg("flask"), @" success: true exit_code: 0 ----- stdout ----- @@ -1270,7 +1270,7 @@ fn exact_install_removes_extraneous_packages() -> Result<()> { + jinja2==3.1.3 + markupsafe==2.1.5 + werkzeug==3.0.1 - "### + " ); requirements_txt.write_str(indoc! {r" @@ -1283,7 +1283,7 @@ fn exact_install_removes_extraneous_packages() -> Result<()> { uv_snapshot!(context.filters(), context.pip_install() .arg("--exact") .arg("-r") - .arg("requirements.txt"), @r###" + .arg("requirements.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -1301,7 +1301,7 @@ fn exact_install_removes_extraneous_packages() -> Result<()> { - jinja2==3.1.3 - markupsafe==2.1.5 - werkzeug==3.0.1 - "### + " ); Ok(()) @@ -1319,7 +1319,7 @@ fn allow_incompatibilities() -> Result<()> { uv_snapshot!(context.pip_install() .arg("-r") .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -1335,7 +1335,7 @@ fn allow_incompatibilities() -> Result<()> { + jinja2==3.1.3 + markupsafe==2.1.5 + werkzeug==3.0.1 - "### + " ); context.assert_command("import flask").success(); @@ -1347,7 +1347,7 @@ fn allow_incompatibilities() -> Result<()> { uv_snapshot!(context.pip_install() .arg("-r") .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -1360,7 +1360,7 @@ fn allow_incompatibilities() -> Result<()> { - jinja2==3.1.3 + jinja2==2.11.3 warning: The package `flask` requires `jinja2>=3.1.2`, but `2.11.3` is installed - "### + " ); // This no longer works, since we have an incompatible version of Jinja2. @@ -1377,7 +1377,7 @@ fn install_extras() -> Result<()> { uv_snapshot!(context.filters(), context.pip_install() .arg("--all-extras") .arg("-e") - .arg(context.workspace_root.join("test/packages/poetry_editable")), @r" + .arg(context.workspace_root.join("test/packages/poetry_editable")), @" success: false exit_code: 2 ----- stdout ----- @@ -1390,7 +1390,7 @@ fn install_extras() -> Result<()> { // Request extras for a source tree uv_snapshot!(context.filters(), context.pip_install() .arg("--all-extras") - .arg(context.workspace_root.join("test/packages/poetry_editable")), @r" + .arg(context.workspace_root.join("test/packages/poetry_editable")), @" success: false exit_code: 2 ----- stdout ----- @@ -1406,7 +1406,7 @@ fn install_extras() -> Result<()> { // Request extras for a requirements file uv_snapshot!(context.filters(), context.pip_install() .arg("--all-extras") - .arg("-r").arg("requirements.txt"), @r" + .arg("-r").arg("requirements.txt"), @" success: false exit_code: 2 ----- stdout ----- @@ -1428,7 +1428,7 @@ dependencies = ["anyio==3.7.0"] uv_snapshot!(context.filters(), context.pip_install() .arg("--all-extras") - .arg("-r").arg("pyproject.toml"), @r###" + .arg("-r").arg("pyproject.toml"), @" success: true exit_code: 0 ----- stdout ----- @@ -1440,7 +1440,7 @@ dependencies = ["anyio==3.7.0"] + anyio==3.7.0 + idna==3.6 + sniffio==1.3.1 - "### + " ); Ok(()) @@ -1453,7 +1453,7 @@ fn install_editable() { // Install the editable package. uv_snapshot!(context.filters(), context.pip_install() .arg("-e") - .arg(context.workspace_root.join("test/packages/poetry_editable")), @r###" + .arg(context.workspace_root.join("test/packages/poetry_editable")), @" success: true exit_code: 0 ----- stdout ----- @@ -1466,13 +1466,13 @@ fn install_editable() { + idna==3.6 + poetry-editable==0.1.0 (from file://[WORKSPACE]/test/packages/poetry_editable) + sniffio==1.3.1 - "### + " ); // Install it again. uv_snapshot!(context.filters(), context.pip_install() .arg("-e") - .arg(context.workspace_root.join("test/packages/poetry_editable")), @r###" + .arg(context.workspace_root.join("test/packages/poetry_editable")), @" success: true exit_code: 0 ----- stdout ----- @@ -1483,14 +1483,14 @@ fn install_editable() { Uninstalled 1 package in [TIME] Installed 1 package in [TIME] ~ poetry-editable==0.1.0 (from file://[WORKSPACE]/test/packages/poetry_editable) - "### + " ); // Add another, non-editable dependency. uv_snapshot!(context.filters(), context.pip_install() .arg("-e") .arg(context.workspace_root.join("test/packages/poetry_editable")) - .arg("black"), @r###" + .arg("black"), @" success: true exit_code: 0 ----- stdout ----- @@ -1507,7 +1507,7 @@ fn install_editable() { + pathspec==0.12.1 + platformdirs==4.2.0 ~ poetry-editable==0.1.0 (from file://[WORKSPACE]/test/packages/poetry_editable) - "### + " ); } @@ -1517,7 +1517,7 @@ fn install_editable_and_registry() { // Install the registry-based version of Black. uv_snapshot!(context.filters(), context.pip_install() - .arg("black"), @r###" + .arg("black"), @" success: true exit_code: 0 ----- stdout ----- @@ -1532,13 +1532,13 @@ fn install_editable_and_registry() { + packaging==24.0 + pathspec==0.12.1 + platformdirs==4.2.0 - "### + " ); // Install the editable version of Black. This should remove the registry-based version. uv_snapshot!(context.filters(), context.pip_install() .arg("-e") - .arg(context.workspace_root.join("test/packages/black_editable")), @r###" + .arg(context.workspace_root.join("test/packages/black_editable")), @" success: true exit_code: 0 ----- stdout ----- @@ -1550,27 +1550,27 @@ fn install_editable_and_registry() { Installed 1 package in [TIME] - black==24.3.0 + black==0.1.0 (from file://[WORKSPACE]/test/packages/black_editable) - "### + " ); // Re-install the registry-based version of Black. This should be a no-op, since we have a // version of Black installed (the editable version) that satisfies the requirements. uv_snapshot!(context.filters(), context.pip_install() .arg("black") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Audited 1 package in [TIME] - "### + " ); let context = context.with_filtered_counts(); // Re-install Black at a specific version. This should replace the editable version. uv_snapshot!(context.filters(), context.pip_install() - .arg("black==23.10.0"), @r###" + .arg("black==23.10.0"), @" success: true exit_code: 0 ----- stdout ----- @@ -1582,7 +1582,7 @@ fn install_editable_and_registry() { Installed [N] packages in [TIME] - black==0.1.0 (from file://[WORKSPACE]/test/packages/black_editable) + black==23.10.0 - "### + " ); } @@ -1595,7 +1595,7 @@ fn install_editable_no_binary() { .arg("-e") .arg(context.workspace_root.join("test/packages/black_editable")) .arg("--no-binary") - .arg(":all:"), @r###" + .arg(":all:"), @" success: true exit_code: 0 ----- stdout ----- @@ -1605,7 +1605,7 @@ fn install_editable_no_binary() { Prepared 1 package in [TIME] Installed 1 package in [TIME] + black==0.1.0 (from file://[WORKSPACE]/test/packages/black_editable) - "### + " ); } @@ -1621,7 +1621,7 @@ fn install_editable_compatible_constraint() -> Result<()> { .arg("-e") .arg(context.workspace_root.join("test/packages/black_editable")) .arg("--constraint") - .arg("constraints.txt"), @r###" + .arg("constraints.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -1631,7 +1631,7 @@ fn install_editable_compatible_constraint() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + black==0.1.0 (from file://[WORKSPACE]/test/packages/black_editable) - "### + " ); Ok(()) @@ -1649,7 +1649,7 @@ fn install_editable_incompatible_constraint_version() -> Result<()> { .arg("-e") .arg(context.workspace_root.join("test/packages/black_editable")) .arg("--constraint") - .arg("constraints.txt"), @r###" + .arg("constraints.txt"), @" success: false exit_code: 1 ----- stdout ----- @@ -1657,7 +1657,7 @@ fn install_editable_incompatible_constraint_version() -> Result<()> { ----- stderr ----- × No solution found when resolving dependencies: ╰─▶ Because only black<=0.1.0 is available and you require black>0.1.0, we can conclude that your requirements are unsatisfiable. - "### + " ); Ok(()) @@ -1675,7 +1675,7 @@ fn install_editable_incompatible_constraint_url() -> Result<()> { .arg("-e") .arg(context.workspace_root.join("test/packages/black_editable")) .arg("--constraint") - .arg("constraints.txt"), @r" + .arg("constraints.txt"), @" success: false exit_code: 2 ----- stdout ----- @@ -1703,7 +1703,7 @@ fn install_editable_pep_508_requirements_txt() -> Result<()> { uv_snapshot!(context.filters(), context.pip_install() .arg("-r") - .arg("requirements.txt"), @r###" + .arg("requirements.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -1720,7 +1720,7 @@ fn install_editable_pep_508_requirements_txt() -> Result<()> { + idna==3.6 + multidict==6.0.5 + yarl==1.9.4 - "### + " ); requirements_txt.write_str(&indoc::formatdoc! {r" @@ -1731,14 +1731,14 @@ fn install_editable_pep_508_requirements_txt() -> Result<()> { uv_snapshot!(context.filters(), context.pip_install() .arg("-r") - .arg("requirements.txt"), @r###" + .arg("requirements.txt"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Audited 1 package in [TIME] - "### + " ); requirements_txt.write_str(&indoc::formatdoc! {r" @@ -1749,14 +1749,14 @@ fn install_editable_pep_508_requirements_txt() -> Result<()> { uv_snapshot!(context.filters(), context.pip_install() .arg("-r") - .arg("requirements.txt"), @r###" + .arg("requirements.txt"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Audited 1 package in [TIME] - "### + " ); requirements_txt.write_str(&indoc::formatdoc! {r" @@ -1767,14 +1767,14 @@ fn install_editable_pep_508_requirements_txt() -> Result<()> { uv_snapshot!(context.filters(), context.pip_install() .arg("-r") - .arg("requirements.txt"), @r###" + .arg("requirements.txt"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Audited 1 package in [TIME] - "### + " ); Ok(()) @@ -1786,7 +1786,7 @@ fn install_editable_pep_508_cli() { uv_snapshot!(context.filters(), context.pip_install() .arg("-e") - .arg(format!("black[d] @ file://{workspace_root}/test/packages/black_editable", workspace_root = context.workspace_root.simplified_display())), @r###" + .arg(format!("black[d] @ file://{workspace_root}/test/packages/black_editable", workspace_root = context.workspace_root.simplified_display())), @" success: true exit_code: 0 ----- stdout ----- @@ -1803,7 +1803,7 @@ fn install_editable_pep_508_cli() { + idna==3.6 + multidict==6.0.5 + yarl==1.9.4 - "### + " ); } @@ -1816,7 +1816,7 @@ fn install_editable_bare_cli() { uv_snapshot!(context.filters(), context.pip_install() .arg("-e") .arg("black_editable") - .current_dir(&packages_dir), @r###" + .current_dir(&packages_dir), @" success: true exit_code: 0 ----- stdout ----- @@ -1827,7 +1827,7 @@ fn install_editable_bare_cli() { Prepared 1 package in [TIME] Installed 1 package in [TIME] + black==0.1.0 (from file://[WORKSPACE]/test/packages/black_editable) - "### + " ); } @@ -1843,7 +1843,7 @@ fn install_editable_bare_requirements_txt() -> Result<()> { uv_snapshot!(context.filters(), context.pip_install() .arg("-r") .arg(requirements_txt.path()) - .current_dir(&packages_dir), @r###" + .current_dir(&packages_dir), @" success: true exit_code: 0 ----- stdout ----- @@ -1854,7 +1854,7 @@ fn install_editable_bare_requirements_txt() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + black==0.1.0 (from file://[WORKSPACE]/test/packages/black_editable) - "### + " ); Ok(()) @@ -1869,7 +1869,7 @@ fn invalid_editable_no_url() -> Result<()> { uv_snapshot!(context.filters(), context.pip_install() .arg("-r") - .arg("requirements.txt"), @r###" + .arg("requirements.txt"), @" success: false exit_code: 2 ----- stdout ----- @@ -1877,7 +1877,7 @@ fn invalid_editable_no_url() -> Result<()> { ----- stderr ----- error: Unsupported editable requirement in `requirements.txt` Caused by: Editable `black` must refer to a local directory, not a versioned package - "### + " ); Ok(()) @@ -1892,7 +1892,7 @@ fn invalid_editable_unnamed_https_url() -> Result<()> { uv_snapshot!(context.filters(), context.pip_install() .arg("-r") - .arg("requirements.txt"), @r###" + .arg("requirements.txt"), @" success: false exit_code: 2 ----- stdout ----- @@ -1900,7 +1900,7 @@ fn invalid_editable_unnamed_https_url() -> Result<()> { ----- stderr ----- error: Unsupported editable requirement in `requirements.txt` Caused by: Editable must refer to a local directory, not an HTTPS URL: `https://files.pythonhosted.org/packages/0f/89/294c9a6b6c75a08da55e9d05321d0707e9418735e3062b12ef0f54c33474/black-24.4.2-py3-none-any.whl` - "### + " ); Ok(()) @@ -1915,7 +1915,7 @@ fn invalid_editable_named_https_url() -> Result<()> { uv_snapshot!(context.filters(), context.pip_install() .arg("-r") - .arg("requirements.txt"), @r###" + .arg("requirements.txt"), @" success: false exit_code: 2 ----- stdout ----- @@ -1923,7 +1923,7 @@ fn invalid_editable_named_https_url() -> Result<()> { ----- stderr ----- error: Unsupported editable requirement in `requirements.txt` Caused by: Editable `black` must refer to a local directory, not an HTTPS URL: `https://files.pythonhosted.org/packages/0f/89/294c9a6b6c75a08da55e9d05321d0707e9418735e3062b12ef0f54c33474/black-24.4.2-py3-none-any.whl` - "### + " ); Ok(()) @@ -1947,7 +1947,7 @@ fn reinstall_build_system() -> Result<()> { .arg("--reinstall") .arg("-r") .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -1964,7 +1964,7 @@ fn reinstall_build_system() -> Result<()> { + jinja2==3.1.3 + markupsafe==2.1.5 + werkzeug==3.0.1 - "### + " ); Ok(()) @@ -1977,7 +1977,7 @@ fn install_no_index() { uv_snapshot!(context.pip_install() .arg("Flask") - .arg("--no-index"), @r###" + .arg("--no-index"), @" success: false exit_code: 1 ----- stdout ----- @@ -1987,7 +1987,7 @@ fn install_no_index() { ╰─▶ Because flask was not found in the provided package locations and you require flask, we can conclude that your requirements are unsatisfiable. hint: Packages were unavailable because index lookups were disabled and no additional package locations were provided (try: `--find-links `) - "### + " ); context.assert_command("import flask").failure(); @@ -2001,7 +2001,7 @@ fn install_no_index_version() { uv_snapshot!(context.pip_install() .arg("Flask==3.0.0") - .arg("--no-index"), @r###" + .arg("--no-index"), @" success: false exit_code: 1 ----- stdout ----- @@ -2011,7 +2011,7 @@ fn install_no_index_version() { ╰─▶ Because flask was not found in the provided package locations and you require flask==3.0.0, we can conclude that your requirements are unsatisfiable. hint: Packages were unavailable because index lookups were disabled and no additional package locations were provided (try: `--find-links `) - "### + " ); context.assert_command("import flask").failure(); @@ -2047,7 +2047,7 @@ fn install_extra_index_url_has_priority() { // the fix, uv will check pypi.org first since it is given // priority via --extra-index-url. .arg("black==24.2.0") - .arg("--no-deps"), @r###" + .arg("--no-deps"), @" success: true exit_code: 0 ----- stdout ----- @@ -2057,7 +2057,7 @@ fn install_extra_index_url_has_priority() { Prepared 1 package in [TIME] Installed 1 package in [TIME] + black==24.2.0 - "### + " ); context.assert_command("import flask").failure(); @@ -2087,7 +2087,7 @@ async fn install_deduplicated_indices() { .arg(redirect_server.uri()) .arg("--index-strategy") .arg("unsafe-first-match"), // Anything but "first-index" - @r" + @" success: true exit_code: 0 ----- stdout ----- @@ -2110,7 +2110,7 @@ fn install_git_public_https() { context .pip_install() .arg("uv-public-pypackage @ git+https://github.com/astral-test/uv-public-pypackage"), - @r###" + @" success: true exit_code: 0 ----- stdout ----- @@ -2120,7 +2120,7 @@ fn install_git_public_https() { Prepared 1 package in [TIME] Installed 1 package in [TIME] + uv-public-pypackage==0.1.0 (from git+https://github.com/astral-test/uv-public-pypackage@b270df1a2fb5d012294e9aaf05e7e0bab1e6a389) - "###); + "); context.assert_installed("uv_public_pypackage", "0.1.0"); } @@ -2135,7 +2135,7 @@ fn install_implicit_git_public_https() { context .pip_install() .arg("uv-public-pypackage @ https://github.com/astral-test/uv-public-pypackage.git"), - @r###" + @" success: true exit_code: 0 ----- stdout ----- @@ -2145,7 +2145,7 @@ fn install_implicit_git_public_https() { Prepared 1 package in [TIME] Installed 1 package in [TIME] + uv-public-pypackage==0.1.0 (from git+https://github.com/astral-test/uv-public-pypackage.git@b270df1a2fb5d012294e9aaf05e7e0bab1e6a389) - "###); + "); context.assert_installed("uv_public_pypackage", "0.1.0"); } @@ -2160,7 +2160,7 @@ fn update_ref_git_public_https() { context .pip_install() .arg("uv-public-pypackage @ git+https://github.com/astral-test/uv-public-pypackage@0dacfd662c64cb4ceb16e6cf65a157a8b715b979"), - @r###" + @" success: true exit_code: 0 ----- stdout ----- @@ -2170,7 +2170,7 @@ fn update_ref_git_public_https() { Prepared 1 package in [TIME] Installed 1 package in [TIME] + uv-public-pypackage==0.1.0 (from git+https://github.com/astral-test/uv-public-pypackage@0dacfd662c64cb4ceb16e6cf65a157a8b715b979) - "###); + "); context.assert_installed("uv_public_pypackage", "0.1.0"); @@ -2180,7 +2180,7 @@ fn update_ref_git_public_https() { .pip_install() .arg("uv-public-pypackage @ git+https://github.com/astral-test/uv-public-pypackage@b270df1a2fb5d012294e9aaf05e7e0bab1e6a389") .arg("--refresh"), - @r###" + @" success: true exit_code: 0 ----- stdout ----- @@ -2192,7 +2192,7 @@ fn update_ref_git_public_https() { Installed 1 package in [TIME] - uv-public-pypackage==0.1.0 (from git+https://github.com/astral-test/uv-public-pypackage@0dacfd662c64cb4ceb16e6cf65a157a8b715b979) + uv-public-pypackage==0.1.0 (from git+https://github.com/astral-test/uv-public-pypackage@b270df1a2fb5d012294e9aaf05e7e0bab1e6a389) - "###); + "); context.assert_installed("uv_public_pypackage", "0.1.0"); } @@ -2210,7 +2210,7 @@ fn install_git_public_https_missing_branch_or_tag() { uv_snapshot!(filters, context.pip_install() // 2.0.0 does not exist - .arg("uv-public-pypackage @ git+https://github.com/astral-test/uv-public-pypackage@2.0.0"), @r###" + .arg("uv-public-pypackage @ git+https://github.com/astral-test/uv-public-pypackage@2.0.0"), @" success: false exit_code: 1 ----- stdout ----- @@ -2223,7 +2223,7 @@ fn install_git_public_https_missing_branch_or_tag() { ╰─▶ process didn't exit successfully: `git fetch [...]` (exit code: 128) --- stderr fatal: couldn't find remote ref refs/tags/2.0.0 - "###); + "); } #[tokio::test] @@ -2241,7 +2241,7 @@ async fn install_git_public_rate_limited_by_github_rest_api_403_response() { uv_snapshot!(context.filters(), context .pip_install() .arg("uv-public-pypackage @ git+https://github.com/astral-test/uv-public-pypackage") - .env(EnvVars::UV_GITHUB_FAST_PATH_URL, server.uri()), @r" + .env(EnvVars::UV_GITHUB_FAST_PATH_URL, server.uri()), @" success: true exit_code: 0 ----- stdout ----- @@ -2273,7 +2273,7 @@ async fn install_git_public_rate_limited_by_github_rest_api_429_response() { .arg("uv-public-pypackage @ git+https://github.com/astral-test/uv-public-pypackage") .env(EnvVars::UV_GITHUB_FAST_PATH_URL, server.uri()) .env(EnvVars::UV_TEST_NO_HTTP_RETRY_DELAY, "true") - .env_remove(EnvVars::UV_HTTP_RETRIES), @r" + .env_remove(EnvVars::UV_HTTP_RETRIES), @" success: true exit_code: 0 ----- stdout ----- @@ -2306,7 +2306,7 @@ fn install_git_public_https_missing_commit() { uv_snapshot!(filters, context.pip_install() // 2.0.0 does not exist .arg("uv-public-pypackage @ git+https://github.com/astral-test/uv-public-pypackage@79a935a7a1a0ad6d0bdf72dce0e16cb0a24a1b3b") - , @r###" + , @" success: false exit_code: 1 ----- stdout ----- @@ -2323,7 +2323,7 @@ fn install_git_public_https_missing_commit() { fatal: ambiguous argument '79a935a7a1a0ad6d0bdf72dce0e16cb0a24a1b3b^0': unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this: 'git [...] -- [...]' - "###); + "); } #[test] @@ -2341,7 +2341,7 @@ fn install_git_public_https_exact_commit() { // here. .env(EnvVars::UV_NO_GITHUB_FAST_PATH, "true") .arg("uv-public-pypackage @ git+https://github.com/astral-test/uv-public-pypackage@b270df1a2fb5d012294e9aaf05e7e0bab1e6a389") - , @r" + , @" success: true exit_code: 0 ----- stdout ----- @@ -2362,7 +2362,7 @@ fn install_git_public_https_exact_commit() { .env_remove(EnvVars::UV_TEST_NO_CLI_PROGRESS) .env(EnvVars::UV_NO_GITHUB_FAST_PATH, "true") .arg("uv-public-pypackage @ git+https://github.com/astral-test/uv-public-pypackage@b270df1a2fb5d012294e9aaf05e7e0bab1e6a389") - , @r" + , @" success: true exit_code: 0 ----- stdout ----- @@ -2386,7 +2386,7 @@ fn install_git_private_https_pat() { ); uv_snapshot!(context.filters(), context.pip_install().arg(package) - , @r" + , @" success: true exit_code: 0 ----- stdout ----- @@ -2414,7 +2414,7 @@ fn install_git_private_https_pat_mixed_with_public() { ); uv_snapshot!(context.filters(), context.pip_install().arg(package).arg("uv-public-pypackage @ git+https://github.com/astral-test/uv-public-pypackage"), - @r###" + @" success: true exit_code: 0 ----- stdout ----- @@ -2425,7 +2425,7 @@ fn install_git_private_https_pat_mixed_with_public() { Installed 2 packages in [TIME] + uv-private-pypackage==0.1.0 (from git+https://****@github.com/astral-test/uv-private-pypackage@d780faf0ac91257d4d5a4f0c5a0e4509608c0071) + uv-public-pypackage==0.1.0 (from git+https://github.com/astral-test/uv-public-pypackage@b270df1a2fb5d012294e9aaf05e7e0bab1e6a389) - "###); + "); context.assert_installed("uv_private_pypackage", "0.1.0"); } @@ -2446,7 +2446,7 @@ fn install_git_private_https_multiple_pat() { ); uv_snapshot!(context.filters(), context.pip_install().arg(package_1).arg(package_2) - , @r###" + , @" success: true exit_code: 0 ----- stdout ----- @@ -2457,7 +2457,7 @@ fn install_git_private_https_multiple_pat() { Installed 2 packages in [TIME] + uv-private-pypackage==0.1.0 (from git+https://****@github.com/astral-test/uv-private-pypackage@d780faf0ac91257d4d5a4f0c5a0e4509608c0071) + uv-private-pypackage-2==0.1.0 (from git+https://****@github.com/astral-test/uv-private-pypackage-2@45c0bec7365710f09b1f4dbca61c86dde9537e4e) - "###); + "); context.assert_installed("uv_private_pypackage", "0.1.0"); } @@ -2484,7 +2484,7 @@ fn install_git_private_https_pat_at_ref() { "uv-private-pypackage @ git+https://{user}{token}@github.com/astral-test/uv-private-pypackage@6c09ce9ae81f50670a60abd7d95f30dd416d00ac" ); uv_snapshot!(context.filters(), context.pip_install() - .arg(package), @r" + .arg(package), @" success: true exit_code: 0 ----- stdout ----- @@ -2509,7 +2509,7 @@ fn install_git_private_https_pat_and_username() { let user = "astral-test-bot"; uv_snapshot!(context.filters(), context.pip_install().arg(format!("uv-private-pypackage @ git+https://{user}:{token}@github.com/astral-test/uv-private-pypackage")) - , @r###" + , @" success: true exit_code: 0 ----- stdout ----- @@ -2519,7 +2519,7 @@ fn install_git_private_https_pat_and_username() { Prepared 1 package in [TIME] Installed 1 package in [TIME] + uv-private-pypackage==0.1.0 (from git+https://astral-test-bot:****@github.com/astral-test/uv-private-pypackage@d780faf0ac91257d4d5a4f0c5a0e4509608c0071) - "###); + "); context.assert_installed("uv_private_pypackage", "0.1.0"); } @@ -2544,7 +2544,7 @@ fn install_git_private_https_pat_not_authorized() { // and hang the test uv_snapshot!(filters, context.pip_install() .arg(format!("uv-private-pypackage @ git+https://git:{token}@github.com/astral-test/uv-private-pypackage")) - , @r" + , @" success: false exit_code: 1 ----- stdout ----- @@ -2575,7 +2575,7 @@ fn install_github_artifact_private_https_pat_mixed_with_public() { let public_package = "uv-public-pypackage @ https://raw.githubusercontent.com/astral-test/uv-public-pypackage/main/dist/uv_public_pypackage-0.1.0-py3-none-any.whl"; uv_snapshot!(context.filters(), context.pip_install().arg(private_package).arg(public_package), - @r###" + @" success: true exit_code: 0 ----- stdout ----- @@ -2586,7 +2586,7 @@ fn install_github_artifact_private_https_pat_mixed_with_public() { Installed 2 packages in [TIME] + uv-private-pypackage==0.1.0 (from https://****@raw.githubusercontent.com/astral-test/uv-private-pypackage/main/dist/uv_private_pypackage-0.1.0-py3-none-any.whl) + uv-public-pypackage==0.1.0 (from https://raw.githubusercontent.com/astral-test/uv-public-pypackage/main/dist/uv_public_pypackage-0.1.0-py3-none-any.whl) - "###); + "); context.assert_installed("uv_private_pypackage", "0.1.0"); } @@ -2608,7 +2608,7 @@ fn install_github_artifact_private_https_multiple_pat() { ); uv_snapshot!(context.filters(), context.pip_install().arg(package_1).arg(package_2) - , @r###" + , @" success: true exit_code: 0 ----- stdout ----- @@ -2619,7 +2619,7 @@ fn install_github_artifact_private_https_multiple_pat() { Installed 2 packages in [TIME] + uv-private-pypackage==0.1.0 (from https://astral-test-bot:****@raw.githubusercontent.com/astral-test/uv-private-pypackage/main/dist/uv_private_pypackage-0.1.0-py3-none-any.whl) + uv-private-pypackage-2==0.1.0 (from https://astral-test-bot:****@raw.githubusercontent.com/astral-test/uv-private-pypackage-2/main/dist/uv_private_pypackage_2-0.1.0-py3-none-any.whl) - "###); + "); context.assert_installed("uv_private_pypackage", "0.1.0"); } @@ -2642,7 +2642,7 @@ fn install_git_private_https_interactive() { .collect(); uv_snapshot!(filters, context.pip_install().arg(package) - , @r###" + , @" success: false exit_code: 1 ----- stdout ----- @@ -2654,7 +2654,7 @@ fn install_git_private_https_interactive() { ╰─▶ process didn't exit successfully: `/usr/bin/git fetch --force --update-head-ok 'https://github.com/astral-test/uv-private-pypackage' '+HEAD:refs/remotes/origin/HEAD'` (exit status: 128) --- stderr fatal: could not read Username for 'https://github.com': terminal prompts disabled - "###); + "); } /// Install a package without using pre-built wheels. @@ -2667,7 +2667,7 @@ fn reinstall_no_binary() { command.arg("anyio").arg("--strict"); uv_snapshot!( command, - @r###" + @" success: true exit_code: 0 ----- stdout ----- @@ -2679,7 +2679,7 @@ fn reinstall_no_binary() { + anyio==4.3.0 + idna==3.6 + sniffio==1.3.1 - "### + " ); context.assert_command("import anyio").success(); @@ -2692,14 +2692,14 @@ fn reinstall_no_binary() { .arg("--no-binary") .arg(":all:") .arg("--strict"); - uv_snapshot!(command, @r###" + uv_snapshot!(command, @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Audited 1 package in [TIME] - "### + " ); context.assert_command("import anyio").success(); @@ -2714,7 +2714,7 @@ fn reinstall_no_binary() { .arg("--reinstall-package") .arg("anyio") .arg("--strict"); - uv_snapshot!(context.filters(), command, @r###" + uv_snapshot!(context.filters(), command, @" success: true exit_code: 0 ----- stdout ----- @@ -2725,7 +2725,7 @@ fn reinstall_no_binary() { Uninstalled [N] packages in [TIME] Installed [N] packages in [TIME] ~ anyio==4.3.0 - "### + " ); context.assert_command("import anyio").success(); @@ -2747,7 +2747,7 @@ fn install_no_binary_overrides_only_binary_all() { .arg("--strict"); uv_snapshot!( command, - @r###" + @" success: true exit_code: 0 ----- stdout ----- @@ -2759,7 +2759,7 @@ fn install_no_binary_overrides_only_binary_all() { + anyio==4.3.0 + idna==3.6 + sniffio==1.3.1 - "### + " ); context.assert_command("import anyio").success(); @@ -2778,7 +2778,7 @@ fn install_no_binary_comma_separated() { .arg("--strict"); uv_snapshot!( command, - @r###" + @" success: true exit_code: 0 ----- stdout ----- @@ -2790,7 +2790,7 @@ fn install_no_binary_comma_separated() { + anyio==4.3.0 + idna==3.6 + sniffio==1.3.1 - "### + " ); context.assert_command("import anyio").success(); @@ -2806,7 +2806,7 @@ fn install_no_binary_env() { command.arg("anyio").env(EnvVars::UV_NO_BINARY, "1"); uv_snapshot!( command, - @r###" + @" success: true exit_code: 0 ----- stdout ----- @@ -2818,7 +2818,7 @@ fn install_no_binary_env() { + anyio==4.3.0 + idna==3.6 + sniffio==1.3.1 - "### + " ); let mut command = context.pip_install(); @@ -2828,7 +2828,7 @@ fn install_no_binary_env() { .env(EnvVars::UV_NO_BINARY, "anyio"); uv_snapshot!( command, - @r###" + @" success: true exit_code: 0 ----- stdout ----- @@ -2841,7 +2841,7 @@ fn install_no_binary_env() { ~ anyio==4.3.0 ~ idna==3.6 ~ sniffio==1.3.1 - "### + " ); context.assert_command("import anyio").success(); @@ -2854,7 +2854,7 @@ fn install_no_binary_env() { .env(EnvVars::UV_NO_BINARY_PACKAGE, "idna"); uv_snapshot!( command, - @r###" + @" success: true exit_code: 0 ----- stdout ----- @@ -2867,7 +2867,7 @@ fn install_no_binary_env() { ~ anyio==4.3.0 ~ idna==3.6 ~ sniffio==1.3.1 - "### + " ); context.assert_command("import idna").success(); @@ -2889,7 +2889,7 @@ fn install_only_binary_overrides_no_binary_all() { .arg("--strict"); uv_snapshot!( command, - @r###" + @" success: true exit_code: 0 ----- stdout ----- @@ -2901,7 +2901,7 @@ fn install_only_binary_overrides_no_binary_all() { + anyio==4.3.0 + idna==3.6 + sniffio==1.3.1 - "### + " ); context.assert_command("import anyio").success(); @@ -2920,7 +2920,7 @@ fn install_only_binary_comma_separated() { .arg("--strict"); uv_snapshot!( command, - @r###" + @" success: true exit_code: 0 ----- stdout ----- @@ -2932,7 +2932,7 @@ fn install_only_binary_comma_separated() { + anyio==4.3.0 + idna==3.6 + sniffio==1.3.1 - "### + " ); context.assert_command("import anyio").success(); @@ -2955,7 +2955,7 @@ fn install_only_binary_all_and_no_binary_all() { .arg("--strict"); uv_snapshot!( command, - @r###" + @" success: false exit_code: 1 ----- stdout ----- @@ -2967,7 +2967,7 @@ fn install_only_binary_all_and_no_binary_all() { hint: Pre-releases are available for `anyio` in the requested range (e.g., 4.0.0rc1), but pre-releases weren't enabled (try: `--prerelease=allow`) hint: Wheels are required for `anyio` because building from source is disabled for all packages (i.e., with `--no-build`) - "### + " ); context.assert_command("import anyio").failure(); @@ -2981,7 +2981,7 @@ fn install_no_binary_cache() { // Install a binary distribution. uv_snapshot!( context.pip_install().arg("idna"), - @r###" + @" success: true exit_code: 0 ----- stdout ----- @@ -2991,7 +2991,7 @@ fn install_no_binary_cache() { Prepared 1 package in [TIME] Installed 1 package in [TIME] + idna==3.6 - "### + " ); // Re-create the virtual environment. @@ -3000,7 +3000,7 @@ fn install_no_binary_cache() { // Re-install. The distribution should be installed from the cache. uv_snapshot!( context.pip_install().arg("idna"), - @r###" + @" success: true exit_code: 0 ----- stdout ----- @@ -3009,7 +3009,7 @@ fn install_no_binary_cache() { Resolved 1 package in [TIME] Installed 1 package in [TIME] + idna==3.6 - "### + " ); // Re-create the virtual environment. @@ -3019,7 +3019,7 @@ fn install_no_binary_cache() { // distribution being available in the cache. uv_snapshot!( context.pip_install().arg("idna").arg("--no-binary").arg(":all:"), - @r###" + @" success: true exit_code: 0 ----- stdout ----- @@ -3029,7 +3029,7 @@ fn install_no_binary_cache() { Prepared 1 package in [TIME] Installed 1 package in [TIME] + idna==3.6 - "### + " ); } @@ -3050,7 +3050,7 @@ fn only_binary_requirements_txt() { uv_snapshot!(context.pip_install() .arg("-r") .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: false exit_code: 1 ----- stdout ----- @@ -3060,7 +3060,7 @@ fn only_binary_requirements_txt() { ╰─▶ Because django-allauth==0.51.0 has no usable wheels and you require django-allauth==0.51.0, we can conclude that your requirements are unsatisfiable. hint: Wheels are required for `django-allauth` because building from source is disabled for `django-allauth` (i.e., with `--no-build-package django-allauth`) - "### + " ); } @@ -3074,7 +3074,7 @@ fn only_binary_editable() { .arg("--only-binary") .arg(":all:") .arg("-e") - .arg(context.workspace_root.join("test/packages/anyio_local")), @r###" + .arg(context.workspace_root.join("test/packages/anyio_local")), @" success: true exit_code: 0 ----- stdout ----- @@ -3084,7 +3084,7 @@ fn only_binary_editable() { Prepared 1 package in [TIME] Installed 1 package in [TIME] + anyio==4.3.0+foo (from file://[WORKSPACE]/test/packages/anyio_local) - "### + " ); } @@ -3103,7 +3103,7 @@ fn only_binary_dependent_editables() { .arg("-e") .arg(root_path.join("first_local")) .arg("-e") - .arg(root_path.join("second_local")), @r###" + .arg(root_path.join("second_local")), @" success: true exit_code: 0 ----- stdout ----- @@ -3114,7 +3114,7 @@ fn only_binary_dependent_editables() { Installed 2 packages in [TIME] + first-local==0.1.0 (from file://[WORKSPACE]/test/packages/dependent_locals/first_local) + second-local==0.1.0 (from file://[WORKSPACE]/test/packages/dependent_locals/second_local) - "### + " ); } @@ -3128,7 +3128,7 @@ fn only_binary_editable_setup_py() { .arg("--only-binary") .arg(":all:") .arg("-e") - .arg(context.workspace_root.join("test/packages/setup_py_editable")), @r###" + .arg(context.workspace_root.join("test/packages/setup_py_editable")), @" success: true exit_code: 0 ----- stdout ----- @@ -3145,7 +3145,7 @@ fn only_binary_editable_setup_py() { + idna==3.6 + setup-py-editable==0.0.1 (from file://[WORKSPACE]/test/packages/setup_py_editable) + sniffio==1.3.1 - "### + " ); } @@ -3168,7 +3168,7 @@ fn no_prerelease_hint_source_builds() -> Result<()> { build-backend = "setuptools.build_meta" "#})?; - uv_snapshot!(context.filters(), context.pip_install().arg("."), @r" + uv_snapshot!(context.filters(), context.pip_install().arg("."), @" success: false exit_code: 1 ----- stdout ----- @@ -3192,7 +3192,7 @@ fn cache_priority() { // Install a specific `idna` version. uv_snapshot!( context.pip_install().arg("idna==3.6"), - @r###" + @" success: true exit_code: 0 ----- stdout ----- @@ -3202,13 +3202,13 @@ fn cache_priority() { Prepared 1 package in [TIME] Installed 1 package in [TIME] + idna==3.6 - "### + " ); // Install a lower `idna` version. uv_snapshot!( context.pip_install().arg("idna==3.0"), - @r###" + @" success: true exit_code: 0 ----- stdout ----- @@ -3220,7 +3220,7 @@ fn cache_priority() { Installed 1 package in [TIME] - idna==3.6 + idna==3.0 - "### + " ); // Re-create the virtual environment. @@ -3229,7 +3229,7 @@ fn cache_priority() { // Install `idna` without a version specifier. uv_snapshot!( context.pip_install().arg("idna"), - @r###" + @" success: true exit_code: 0 ----- stdout ----- @@ -3238,7 +3238,7 @@ fn cache_priority() { Resolved 1 package in [TIME] Installed 1 package in [TIME] + idna==3.6 - "### + " ); } @@ -3251,7 +3251,7 @@ fn install_executable() { let context = TestContext::new("3.12"); uv_snapshot!(context.pip_install() - .arg("pylint==3.0.0"), @r###" + .arg("pylint==3.0.0"), @" success: true exit_code: 0 ----- stdout ----- @@ -3267,7 +3267,7 @@ fn install_executable() { + platformdirs==4.2.0 + pylint==3.0.0 + tomlkit==0.12.4 - "### + " ); // Verify that `pylint` is executable. @@ -3287,7 +3287,7 @@ fn install_executable_copy() { uv_snapshot!(context.pip_install() .arg("pylint==3.0.0") .arg("--link-mode") - .arg("copy"), @r###" + .arg("copy"), @" success: true exit_code: 0 ----- stdout ----- @@ -3303,7 +3303,7 @@ fn install_executable_copy() { + platformdirs==4.2.0 + pylint==3.0.0 + tomlkit==0.12.4 - "### + " ); // Verify that `pylint` is executable. @@ -3323,7 +3323,7 @@ fn install_executable_hardlink() { uv_snapshot!(context.pip_install() .arg("pylint==3.0.0") .arg("--link-mode") - .arg("hardlink"), @r###" + .arg("hardlink"), @" success: true exit_code: 0 ----- stdout ----- @@ -3339,7 +3339,7 @@ fn install_executable_hardlink() { + platformdirs==4.2.0 + pylint==3.0.0 + tomlkit==0.12.4 - "### + " ); // Verify that `pylint` is executable. @@ -3359,7 +3359,7 @@ fn no_deps() { uv_snapshot!(context.pip_install() .arg("Flask") .arg("--no-deps") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -3374,7 +3374,7 @@ fn no_deps() { warning: The package `flask` requires `itsdangerous>=2.1.2`, but it's not installed warning: The package `flask` requires `click>=8.1.3`, but it's not installed warning: The package `flask` requires `blinker>=1.6.2`, but it's not installed - "### + " ); context.assert_command("import flask").failure(); @@ -3390,7 +3390,7 @@ fn no_deps_editable() { uv_snapshot!(context.filters(), context.pip_install() .arg("--no-deps") .arg("-e") - .arg(context.workspace_root.join("test/packages/black_editable[dev]")), @r###" + .arg(context.workspace_root.join("test/packages/black_editable[dev]")), @" success: true exit_code: 0 ----- stdout ----- @@ -3400,7 +3400,7 @@ fn no_deps_editable() { Prepared 1 package in [TIME] Installed 1 package in [TIME] + black==0.1.0 (from file://[WORKSPACE]/test/packages/black_editable) - "### + " ); context.assert_command("import black").success(); @@ -3428,7 +3428,7 @@ fn install_no_downgrade() -> Result<()> { // Install the local `idna`. uv_snapshot!(context.filters(), context.pip_install() - .arg("./idna"), @r###" + .arg("./idna"), @" success: true exit_code: 0 ----- stdout ----- @@ -3438,12 +3438,12 @@ fn install_no_downgrade() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + idna==1000 (from file://[TEMP_DIR]/idna) - "### + " ); // Install `anyio`, which depends on `idna`. uv_snapshot!(context.filters(), context.pip_install() - .arg("anyio"), @r###" + .arg("anyio"), @" success: true exit_code: 0 ----- stdout ----- @@ -3454,13 +3454,13 @@ fn install_no_downgrade() -> Result<()> { Installed 2 packages in [TIME] + anyio==4.3.0 + sniffio==1.3.1 - "### + " ); // Install `anyio` with `--upgrade`, which should retain the local `idna`. uv_snapshot!(context.filters(), context.pip_install() .arg("-U") - .arg("anyio"), @r###" + .arg("anyio"), @" success: true exit_code: 0 ----- stdout ----- @@ -3468,13 +3468,13 @@ fn install_no_downgrade() -> Result<()> { ----- stderr ----- Resolved 3 packages in [TIME] Audited 3 packages in [TIME] - "### + " ); // Install `anyio` with `--reinstall`, which should downgrade `idna`. uv_snapshot!(context.filters(), context.pip_install() .arg("--reinstall") - .arg("anyio"), @r###" + .arg("anyio"), @" success: true exit_code: 0 ----- stdout ----- @@ -3488,7 +3488,7 @@ fn install_no_downgrade() -> Result<()> { - idna==1000 (from file://[TEMP_DIR]/idna) + idna==3.6 ~ sniffio==1.3.1 - "### + " ); Ok(()) @@ -3503,7 +3503,7 @@ fn install_upgrade() { uv_snapshot!(context.pip_install() .arg("anyio==3.6.2") .arg("httpcore==0.16.3") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -3518,7 +3518,7 @@ fn install_upgrade() { + httpcore==0.16.3 + idna==3.6 + sniffio==1.3.1 - "### + " ); context.assert_command("import anyio").success(); @@ -3527,7 +3527,7 @@ fn install_upgrade() { uv_snapshot!(context.pip_install() .arg("anyio") .arg("--upgrade-package") - .arg("anyio"), @r###" + .arg("anyio"), @" success: true exit_code: 0 ----- stdout ----- @@ -3539,14 +3539,14 @@ fn install_upgrade() { Installed 1 package in [TIME] - anyio==3.6.2 + anyio==4.3.0 - "### + " ); // Upgrade anyio again, should not reinstall. uv_snapshot!(context.pip_install() .arg("anyio") .arg("--upgrade-package") - .arg("anyio"), @r###" + .arg("anyio"), @" success: true exit_code: 0 ----- stdout ----- @@ -3554,14 +3554,14 @@ fn install_upgrade() { ----- stderr ----- Resolved 3 packages in [TIME] Audited 3 packages in [TIME] - "### + " ); // Install httpcore, request anyio upgrade should not reinstall uv_snapshot!(context.pip_install() .arg("httpcore") .arg("--upgrade-package") - .arg("anyio"), @r###" + .arg("anyio"), @" success: true exit_code: 0 ----- stdout ----- @@ -3569,13 +3569,13 @@ fn install_upgrade() { ----- stderr ----- Resolved 6 packages in [TIME] Audited 6 packages in [TIME] - "### + " ); // Upgrade httpcore with global flag uv_snapshot!(context.pip_install() .arg("httpcore") - .arg("--upgrade"), @r###" + .arg("--upgrade"), @" success: true exit_code: 0 ----- stdout ----- @@ -3587,7 +3587,7 @@ fn install_upgrade() { Installed 1 package in [TIME] - httpcore==0.16.3 + httpcore==1.0.4 - "### + " ); } @@ -3605,7 +3605,7 @@ fn install_constraints_txt() -> Result<()> { .arg("-r") .arg("requirements.txt") .arg("--constraint") - .arg("constraints.txt"), @r###" + .arg("constraints.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -3617,7 +3617,7 @@ fn install_constraints_txt() -> Result<()> { + anyio==3.7.0 + idna==3.3 + sniffio==1.3.1 - "### + " ); Ok(()) @@ -3639,7 +3639,7 @@ fn install_constraints_txt_from_stdin() -> Result<()> { .arg("requirements.txt") .arg("--constraint") .arg("-") - .stdin(std::fs::File::open(constraints_txt)?), @r###" + .stdin(std::fs::File::open(constraints_txt)?), @" success: true exit_code: 0 ----- stdout ----- @@ -3651,7 +3651,7 @@ fn install_constraints_txt_from_stdin() -> Result<()> { + anyio==3.7.0 + idna==3.3 + sniffio==1.3.1 - "### + " ); Ok(()) @@ -3679,7 +3679,7 @@ fn install_constraints_from_pyproject() -> Result<()> { uv_snapshot!(context.pip_install() .arg("-r") - .arg("pyproject.toml"), @r###" + .arg("pyproject.toml"), @" success: true exit_code: 0 ----- stdout ----- @@ -3691,7 +3691,7 @@ fn install_constraints_from_pyproject() -> Result<()> { + anyio==3.7.0 + idna==3.3 + sniffio==1.3.1 - "### + " ); Ok(()) @@ -3709,7 +3709,7 @@ fn install_constraints_inline() -> Result<()> { uv_snapshot!(context.pip_install() .arg("-r") - .arg("requirements.txt"), @r###" + .arg("requirements.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -3721,7 +3721,7 @@ fn install_constraints_inline() -> Result<()> { + anyio==3.7.0 + idna==3.3 + sniffio==1.3.1 - "### + " ); Ok(()) @@ -3735,7 +3735,7 @@ fn install_constraints_remote() { uv_snapshot!(context.pip_install() .arg("-c") .arg("https://raw.githubusercontent.com/apache/airflow/constraints-2-6/constraints-3.11.txt") - .arg("typing_extensions>=4.0"), @r###" + .arg("typing_extensions>=4.0"), @" success: true exit_code: 0 ----- stdout ----- @@ -3745,7 +3745,7 @@ fn install_constraints_remote() { Prepared 1 package in [TIME] Installed 1 package in [TIME] + typing-extensions==4.7.1 - "### + " ); // would yield typing-extensions==4.8.2 without constraint file } @@ -3759,7 +3759,7 @@ fn install_constraints_inline_remote() -> Result<()> { uv_snapshot!(context.pip_install() .arg("-r") - .arg("requirements.txt"), @r###" + .arg("requirements.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -3769,7 +3769,7 @@ fn install_constraints_inline_remote() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + typing-extensions==4.7.1 - "### // would yield typing-extensions==4.8.2 without constraint file + " // would yield typing-extensions==4.8.2 without constraint file ); Ok(()) @@ -3790,7 +3790,7 @@ fn install_constraints_extra() -> Result<()> { .arg("-r") .arg("requirements.txt") .arg("-c") - .arg("constraints.txt"), @r###" + .arg("constraints.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -3807,7 +3807,7 @@ fn install_constraints_extra() -> Result<()> { + markupsafe==2.1.5 + python-dotenv==1.0.0 + werkzeug==3.0.1 - "### + " ); Ok(()) @@ -3820,14 +3820,14 @@ fn install_constraints_respects_offline_mode() { uv_snapshot!(context.pip_install() .arg("--offline") .arg("-r") - .arg("http://example.com/requirements.txt"), @r###" + .arg("http://example.com/requirements.txt"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: Network connectivity is disabled, but a remote requirements file was requested: http://example.com/requirements.txt - "### + " ); } @@ -3838,7 +3838,7 @@ fn install_git_source_respects_offline_mode() { uv_snapshot!(context.filters(), context.pip_install() .arg("--offline") - .arg("uv-public-pypackage @ git+https://github.com/astral-test/uv-public-pypackage"), @r" + .arg("uv-public-pypackage @ git+https://github.com/astral-test/uv-public-pypackage"), @" success: false exit_code: 1 ----- stdout ----- @@ -3876,7 +3876,7 @@ fn build_prerelease_hint() -> Result<()> { uv_snapshot!( context.filters(), command, - @r" + @" success: false exit_code: 1 ----- stdout ----- @@ -3912,7 +3912,7 @@ fn install_constraints_with_markers() -> Result<()> { .arg("-r") .arg("requirements.txt") .arg("--constraint") - .arg("constraints.txt"), @r###" + .arg("constraints.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -3925,7 +3925,7 @@ fn install_constraints_with_markers() -> Result<()> { + packaging==24.0 + pluggy==1.4.0 + pytest==8.1.1 - "### + " ); // We should only see "Audited" here; no need to resolve. @@ -3933,14 +3933,14 @@ fn install_constraints_with_markers() -> Result<()> { .arg("-r") .arg("requirements.txt") .arg("--constraint") - .arg("constraints.txt"), @r###" + .arg("constraints.txt"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Audited 1 package in [TIME] - "### + " ); Ok(()) @@ -3962,7 +3962,7 @@ fn install_pinned_polars_invalid_metadata() { // Install Flask. uv_snapshot!(context.pip_install() .arg("polars==0.14.0"), - @r###" + @" success: true exit_code: 0 ----- stdout ----- @@ -3972,7 +3972,7 @@ fn install_pinned_polars_invalid_metadata() { Prepared 1 package in [TIME] Installed 1 package in [TIME] + polars==0.14.0 - "### + " ); context.assert_command("import polars").success(); @@ -3989,7 +3989,7 @@ fn install_sdist_resolution_lowest() -> Result<()> { uv_snapshot!(context.pip_install() .arg("-r") .arg("requirements.in") - .arg("--resolution=lowest-direct"), @r###" + .arg("--resolution=lowest-direct"), @" success: true exit_code: 0 ----- stdout ----- @@ -4001,7 +4001,7 @@ fn install_sdist_resolution_lowest() -> Result<()> { + anyio==4.2.0 (from https://files.pythonhosted.org/packages/2d/b8/7333d87d5f03247215d86a86362fd3e324111788c6cdd8d2e6196a6ba833/anyio-4.2.0.tar.gz) + idna==3.6 + sniffio==1.3.1 - "### + " ); Ok(()) @@ -4022,7 +4022,7 @@ fn direct_url_zip_file_bunk_permissions() -> Result<()> { uv_snapshot!(context.pip_install() .arg("-r") .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -4037,7 +4037,7 @@ fn direct_url_zip_file_bunk_permissions() -> Result<()> { + ruyaml==0.91.0 + setuptools==69.2.0 + typing-extensions==4.10.0 - "### + " ); Ok(()) @@ -4060,7 +4060,7 @@ fn launcher() -> Result<()> { filters, context.pip_install() .arg(format!("simple_launcher@{}", project_root.join("test/links/simple_launcher-0.1.0-py3-none-any.whl").display())) - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -4070,21 +4070,21 @@ fn launcher() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + simple_launcher.whl - "### + " ); let bin_path = if cfg!(windows) { "Scripts" } else { "bin" }; uv_snapshot!(Command::new( context.venv.join(bin_path).join("simple_launcher") - ), @r###" + ), @" success: true exit_code: 0 ----- stdout ----- Hi from the simple launcher! ----- stderr ----- - "###); + "); Ok(()) } @@ -4106,7 +4106,7 @@ fn launcher_with_symlink() -> Result<()> { context.pip_install() .arg(format!("simple_launcher@{}", project_root.join("test/links/simple_launcher-0.1.0-py3-none-any.whl").display())) .arg("--strict"), - @r###" + @" success: true exit_code: 0 ----- stdout ----- @@ -4116,7 +4116,7 @@ fn launcher_with_symlink() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + simple_launcher.whl - "### + " ); #[cfg(windows)] @@ -4144,14 +4144,14 @@ fn launcher_with_symlink() -> Result<()> { uv_snapshot!(Command::new( context.temp_dir.join("simple_launcher") - ), @r###" + ), @" success: true exit_code: 0 ----- stdout ----- Hi from the simple launcher! ----- stderr ----- - "###); + "); Ok(()) } @@ -4166,7 +4166,7 @@ fn config_settings_registry() { .arg("iniconfig") .arg("--no-binary") .arg("iniconfig") - .arg("-C=global-option=build_ext"), @r###" + .arg("-C=global-option=build_ext"), @" success: true exit_code: 0 ----- stdout ----- @@ -4176,12 +4176,12 @@ fn config_settings_registry() { Prepared 1 package in [TIME] Installed 1 package in [TIME] + iniconfig==2.0.0 - "### + " ); // Uninstall the package. uv_snapshot!(context.filters(), context.pip_uninstall() - .arg("iniconfig"), @r###" + .arg("iniconfig"), @" success: true exit_code: 0 ----- stdout ----- @@ -4189,14 +4189,14 @@ fn config_settings_registry() { ----- stderr ----- Uninstalled 1 package in [TIME] - iniconfig==2.0.0 - "###); + "); // Re-install the package, with the same flag. We should read from the cache. uv_snapshot!(context.filters(), context.pip_install() .arg("iniconfig") .arg("--no-binary") .arg("iniconfig") - .arg("-C=global-option=build_ext"), @r" + .arg("-C=global-option=build_ext"), @" success: true exit_code: 0 ----- stdout ----- @@ -4210,7 +4210,7 @@ fn config_settings_registry() { // Uninstall the package. uv_snapshot!(context.filters(), context.pip_uninstall() - .arg("iniconfig"), @r###" + .arg("iniconfig"), @" success: true exit_code: 0 ----- stdout ----- @@ -4218,13 +4218,13 @@ fn config_settings_registry() { ----- stderr ----- Uninstalled 1 package in [TIME] - iniconfig==2.0.0 - "###); + "); // Re-install the package, without the flag. We should build it from source. uv_snapshot!(context.filters(), context.pip_install() .arg("iniconfig") .arg("--no-binary") - .arg("iniconfig"), @r###" + .arg("iniconfig"), @" success: true exit_code: 0 ----- stdout ----- @@ -4234,7 +4234,7 @@ fn config_settings_registry() { Prepared 1 package in [TIME] Installed 1 package in [TIME] + iniconfig==2.0.0 - "### + " ); } @@ -4254,7 +4254,7 @@ fn config_settings_path() -> Result<()> { // Install the editable package. uv_snapshot!(context.filters(), context.pip_install() .arg("-r") - .arg("requirements.txt"), @r###" + .arg("requirements.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -4265,7 +4265,7 @@ fn config_settings_path() -> Result<()> { Installed 2 packages in [TIME] + iniconfig==2.0.0 + setuptools-editable==0.1.0 (from file://[WORKSPACE]/test/packages/setuptools_editable) - "### + " ); // When installed without `editable_mode=compat`, the `finder.py` file should be present. @@ -4280,7 +4280,7 @@ fn config_settings_path() -> Result<()> { .arg("requirements.txt") .arg("-C") .arg("editable_mode=compat") - , @r" + , @" success: true exit_code: 0 ----- stdout ----- @@ -4344,7 +4344,7 @@ fn reinstall_duplicate() -> Result<()> { uv_snapshot!(context1.pip_install() .arg("pip") .arg("--reinstall"), - @r###" + @" success: true exit_code: 0 ----- stdout ----- @@ -4357,7 +4357,7 @@ fn reinstall_duplicate() -> Result<()> { - pip==21.3.1 - pip==22.1.1 + pip==24.0 - "### + " ); Ok(()) @@ -4370,7 +4370,7 @@ fn install_symlink() { uv_snapshot!(context.pip_install() .arg("pgpdump==1.5") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -4380,14 +4380,14 @@ fn install_symlink() { Prepared 1 package in [TIME] Installed 1 package in [TIME] + pgpdump==1.5 - "### + " ); context.assert_command("import pgpdump").success(); uv_snapshot!(context .pip_uninstall() - .arg("pgpdump"), @r###" + .arg("pgpdump"), @" success: true exit_code: 0 ----- stdout ----- @@ -4395,7 +4395,7 @@ fn install_symlink() { ----- stderr ----- Uninstalled 1 package in [TIME] - pgpdump==1.5 - "### + " ); } @@ -4423,7 +4423,7 @@ requires-python = ">=3.8" uv_snapshot!(context.filters(), context.pip_install() .arg("-r") - .arg("requirements.txt"), @r###" + .arg("requirements.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -4436,20 +4436,20 @@ requires-python = ">=3.8" + example==0.0.0 (from file://[TEMP_DIR]/editable) + idna==3.6 + sniffio==1.3.1 - "### + " ); // Installing again should be a no-op. uv_snapshot!(context.filters(), context.pip_install() .arg("-r") - .arg("requirements.txt"), @r###" + .arg("requirements.txt"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Audited 1 package in [TIME] - "### + " ); // Modify the editable package. @@ -4467,7 +4467,7 @@ requires-python = ">=3.8" // Installing again should update the package. uv_snapshot!(context.filters(), context.pip_install() .arg("-r") - .arg("requirements.txt"), @r###" + .arg("requirements.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -4480,7 +4480,7 @@ requires-python = ">=3.8" - anyio==4.0.0 + anyio==3.7.1 ~ example==0.0.0 (from file://[TEMP_DIR]/editable) - "### + " ); Ok(()) @@ -4515,7 +4515,7 @@ dependencies = {file = ["dependencies.txt"]} uv_snapshot!(context.filters(), context.pip_install() .arg("-r") - .arg("requirements.txt"), @r###" + .arg("requirements.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -4528,20 +4528,20 @@ dependencies = {file = ["dependencies.txt"]} + example==0.1.0 (from file://[TEMP_DIR]/editable) + idna==3.6 + sniffio==1.3.1 - "### + " ); // Installing again should not re-install, as we don't special-case dynamic metadata. uv_snapshot!(context.filters(), context.pip_install() .arg("-r") - .arg("requirements.txt"), @r###" + .arg("requirements.txt"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Audited 1 package in [TIME] - "### + " ); Ok(()) @@ -4571,7 +4571,7 @@ requires-python = ">=3.8" uv_snapshot!(context.filters(), context.pip_install() .arg("-r") - .arg("requirements.txt"), @r###" + .arg("requirements.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -4584,20 +4584,20 @@ requires-python = ">=3.8" + example==0.0.0 (from file://[TEMP_DIR]/editable) + idna==3.6 + sniffio==1.3.1 - "### + " ); // Installing again should be a no-op. uv_snapshot!(context.filters(), context.pip_install() .arg("-r") - .arg("requirements.txt"), @r###" + .arg("requirements.txt"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Audited 1 package in [TIME] - "### + " ); // Modify the package. @@ -4615,7 +4615,7 @@ requires-python = ">=3.8" // Installing again should update the package. uv_snapshot!(context.filters(), context.pip_install() .arg("-r") - .arg("requirements.txt"), @r###" + .arg("requirements.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -4628,7 +4628,7 @@ requires-python = ">=3.8" - anyio==4.0.0 + anyio==3.7.1 ~ example==0.0.0 (from file://[TEMP_DIR]/editable) - "### + " ); Ok(()) @@ -4665,7 +4665,7 @@ fn invalidate_path_on_cache_key() -> Result<()> { uv_snapshot!(context.filters(), context.pip_install() .arg("-r") - .arg("requirements.txt"), @r###" + .arg("requirements.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -4678,20 +4678,20 @@ fn invalidate_path_on_cache_key() -> Result<()> { + example==0.0.0 (from file://[TEMP_DIR]/editable) + idna==3.6 + sniffio==1.3.1 - "### + " ); // Installing again should be a no-op. uv_snapshot!(context.filters(), context.pip_install() .arg("-r") - .arg("requirements.txt"), @r###" + .arg("requirements.txt"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Audited 1 package in [TIME] - "### + " ); // Modify the constraints file. @@ -4700,7 +4700,7 @@ fn invalidate_path_on_cache_key() -> Result<()> { // Installing again should update the package. uv_snapshot!(context.filters(), context.pip_install() .arg("-r") - .arg("requirements.txt"), @r###" + .arg("requirements.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -4711,7 +4711,7 @@ fn invalidate_path_on_cache_key() -> Result<()> { Uninstalled 1 package in [TIME] Installed 1 package in [TIME] ~ example==0.0.0 (from file://[TEMP_DIR]/editable) - "### + " ); // Modify the requirements file. @@ -4720,7 +4720,7 @@ fn invalidate_path_on_cache_key() -> Result<()> { // Installing again should update the package. uv_snapshot!(context.filters(), context.pip_install() .arg("-r") - .arg("requirements.txt"), @r###" + .arg("requirements.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -4731,7 +4731,7 @@ fn invalidate_path_on_cache_key() -> Result<()> { Uninstalled 1 package in [TIME] Installed 1 package in [TIME] ~ example==0.0.0 (from file://[TEMP_DIR]/editable) - "### + " ); // Modify the `pyproject.toml` file (but not in a meaningful way). @@ -4750,14 +4750,14 @@ fn invalidate_path_on_cache_key() -> Result<()> { // Installing again should be a no-op, since `pyproject.toml` was not included as a cache key. uv_snapshot!(context.filters(), context.pip_install() .arg("-r") - .arg("requirements.txt"), @r###" + .arg("requirements.txt"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Audited 1 package in [TIME] - "### + " ); // Modify the `pyproject.toml` to use a glob. @@ -4782,7 +4782,7 @@ fn invalidate_path_on_cache_key() -> Result<()> { // Installing again should update the package. uv_snapshot!(context.filters(), context.pip_install() .arg("-r") - .arg("requirements.txt"), @r###" + .arg("requirements.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -4793,7 +4793,7 @@ fn invalidate_path_on_cache_key() -> Result<()> { Uninstalled 1 package in [TIME] Installed 1 package in [TIME] ~ example==0.0.0 (from file://[TEMP_DIR]/editable) - "### + " ); // Write a new file in the current directory. @@ -4802,7 +4802,7 @@ fn invalidate_path_on_cache_key() -> Result<()> { // Installing again should update the package. uv_snapshot!(context.filters(), context.pip_install() .arg("-r") - .arg("requirements.txt"), @r###" + .arg("requirements.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -4813,7 +4813,7 @@ fn invalidate_path_on_cache_key() -> Result<()> { Uninstalled 1 package in [TIME] Installed 1 package in [TIME] ~ example==0.0.0 (from file://[TEMP_DIR]/editable) - "### + " ); Ok(()) @@ -4860,7 +4860,7 @@ fn invalidate_path_on_commit() -> Result<()> { uv_snapshot!(context.filters(), context.pip_install() .arg("-r") - .arg("requirements.txt"), @r###" + .arg("requirements.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -4873,20 +4873,20 @@ fn invalidate_path_on_commit() -> Result<()> { + example==0.0.0 (from file://[TEMP_DIR]/editable) + idna==3.6 + sniffio==1.3.1 - "### + " ); // Installing again should be a no-op. uv_snapshot!(context.filters(), context.pip_install() .arg("-r") - .arg("requirements.txt"), @r###" + .arg("requirements.txt"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Audited 1 package in [TIME] - "### + " ); // Change the current commit. @@ -4901,7 +4901,7 @@ fn invalidate_path_on_commit() -> Result<()> { // Installing again should update the package. uv_snapshot!(context.filters(), context.pip_install() .arg("-r") - .arg("requirements.txt"), @r###" + .arg("requirements.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -4912,7 +4912,7 @@ fn invalidate_path_on_commit() -> Result<()> { Uninstalled 1 package in [TIME] Installed 1 package in [TIME] ~ example==0.0.0 (from file://[TEMP_DIR]/editable) - "### + " ); Ok(()) @@ -4942,7 +4942,7 @@ fn invalidate_path_on_env_var() -> Result<()> { uv_snapshot!(context.filters(), context.pip_install() .arg("-r") .arg("requirements.txt") - .env_remove("FOO"), @r###" + .env_remove("FOO"), @" success: true exit_code: 0 ----- stdout ----- @@ -4955,28 +4955,28 @@ fn invalidate_path_on_env_var() -> Result<()> { + example==0.0.0 (from file://[TEMP_DIR]/) + idna==3.6 + sniffio==1.3.1 - "### + " ); // Installing again should be a no-op. uv_snapshot!(context.filters(), context.pip_install() .arg("-r") .arg("requirements.txt") - .env_remove("FOO"), @r###" + .env_remove("FOO"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Audited 1 package in [TIME] - "### + " ); // Installing again should update the package. uv_snapshot!(context.filters(), context.pip_install() .arg("-r") .arg("requirements.txt") - .env("FOO", "BAR"), @r###" + .env("FOO", "BAR"), @" success: true exit_code: 0 ----- stdout ----- @@ -4987,7 +4987,7 @@ fn invalidate_path_on_env_var() -> Result<()> { Uninstalled 1 package in [TIME] Installed 1 package in [TIME] ~ example==0.0.0 (from file://[TEMP_DIR]/) - "### + " ); Ok(()) @@ -4999,7 +4999,7 @@ fn path_name_version_change() { let context = TestContext::new("3.12"); uv_snapshot!(context.filters(), context.pip_install() - .arg(context.workspace_root.join("test/links/ok-1.0.0-py3-none-any.whl")), @r###" + .arg(context.workspace_root.join("test/links/ok-1.0.0-py3-none-any.whl")), @" success: true exit_code: 0 ----- stdout ----- @@ -5009,24 +5009,24 @@ fn path_name_version_change() { Prepared 1 package in [TIME] Installed 1 package in [TIME] + ok==1.0.0 (from file://[WORKSPACE]/test/links/ok-1.0.0-py3-none-any.whl) - "### + " ); // Installing the same path again should be a no-op uv_snapshot!(context.filters(), context.pip_install() - .arg(context.workspace_root.join("test/links/ok-1.0.0-py3-none-any.whl")), @r###" + .arg(context.workspace_root.join("test/links/ok-1.0.0-py3-none-any.whl")), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Audited 1 package in [TIME] - "### + " ); // Installing a new path should succeed uv_snapshot!(context.filters(), context.pip_install() - .arg(context.workspace_root.join("test/links/ok-2.0.0-py3-none-any.whl")), @r###" + .arg(context.workspace_root.join("test/links/ok-2.0.0-py3-none-any.whl")), @" success: true exit_code: 0 ----- stdout ----- @@ -5038,12 +5038,12 @@ fn path_name_version_change() { Installed 1 package in [TIME] - ok==1.0.0 (from file://[WORKSPACE]/test/links/ok-1.0.0-py3-none-any.whl) + ok==2.0.0 (from file://[WORKSPACE]/test/links/ok-2.0.0-py3-none-any.whl) - "### + " ); // Installing a new path should succeed regardless of which version is "newer" uv_snapshot!(context.filters(), context.pip_install() - .arg(context.workspace_root.join("test/links/ok-1.0.0-py3-none-any.whl")), @r###" + .arg(context.workspace_root.join("test/links/ok-1.0.0-py3-none-any.whl")), @" success: true exit_code: 0 ----- stdout ----- @@ -5054,7 +5054,7 @@ fn path_name_version_change() { Installed 1 package in [TIME] - ok==2.0.0 (from file://[WORKSPACE]/test/links/ok-2.0.0-py3-none-any.whl) + ok==1.0.0 (from file://[WORKSPACE]/test/links/ok-1.0.0-py3-none-any.whl) - "### + " ); } @@ -5079,7 +5079,7 @@ fn path_changes_with_same_name() -> Result<()> { fs_err::copy(&wheel, &two_wheel)?; uv_snapshot!(context.filters(), context.pip_install() - .arg(one_wheel.as_os_str()), @r###" + .arg(one_wheel.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -5089,11 +5089,11 @@ fn path_changes_with_same_name() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + ok==1.0.0 (from file://[TEMP_DIR]/one/ok-1.0.0-py3-none-any.whl) - "### + " ); uv_snapshot!(context.filters(), context.pip_install() - .arg(two_wheel.as_os_str()), @r###" + .arg(two_wheel.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -5105,7 +5105,7 @@ fn path_changes_with_same_name() -> Result<()> { Installed 1 package in [TIME] - ok==1.0.0 (from file://[TEMP_DIR]/one/ok-1.0.0-py3-none-any.whl) + ok==1.0.0 (from file://[TEMP_DIR]/two/ok-1.0.0-py3-none-any.whl) - "### + " ); Ok(()) @@ -5134,7 +5134,7 @@ requires-python = ">=3.11,<3.13" uv_snapshot!(context.filters(), context.pip_install() .arg("--editable") - .arg(editable_dir.path()), @r###" + .arg(editable_dir.path()), @" success: true exit_code: 0 ----- stdout ----- @@ -5147,7 +5147,7 @@ requires-python = ">=3.11,<3.13" + example==0.1.0 (from file://[TEMP_DIR]/editable) + idna==3.6 + sniffio==1.3.1 - "### + " ); Ok(()) @@ -5175,7 +5175,7 @@ requires-python = ">=3.13" uv_snapshot!(context.filters(), context.pip_install() .arg("--editable") - .arg(editable_dir.path()), @r###" + .arg(editable_dir.path()), @" success: false exit_code: 1 ----- stdout ----- @@ -5184,7 +5184,7 @@ requires-python = ">=3.13" × No solution found when resolving dependencies: ╰─▶ Because the current Python version (3.12.[X]) does not satisfy Python>=3.13 and example==0.0.0 depends on Python>=3.13, we can conclude that example==0.0.0 cannot be used. And because only example==0.0.0 is available and you require example, we can conclude that your requirements are unsatisfiable. - "### + " ); Ok(()) @@ -5228,7 +5228,7 @@ fn no_build_isolation() -> Result<()> { // Install `setuptools` and `wheel`. uv_snapshot!(context.pip_install() .arg("setuptools") - .arg("wheel"), @r###" + .arg("wheel"), @" success: true exit_code: 0 ----- stdout ----- @@ -5239,13 +5239,13 @@ fn no_build_isolation() -> Result<()> { Installed 2 packages in [TIME] + setuptools==69.2.0 + wheel==0.43.0 - "###); + "); // We expect the build to succeed, since `setuptools` is now installed. uv_snapshot!(context.pip_install() .arg("-r") .arg("requirements.in") - .arg("--no-build-isolation"), @r###" + .arg("--no-build-isolation"), @" success: true exit_code: 0 ----- stdout ----- @@ -5257,7 +5257,7 @@ fn no_build_isolation() -> Result<()> { + anyio==0.0.0 (from https://files.pythonhosted.org/packages/db/4d/3970183622f0330d3c23d9b8a5f52e365e50381fd484d08e3285104333d3/anyio-4.3.0.tar.gz) + idna==3.6 + sniffio==1.3.1 - "### + " ); Ok(()) @@ -5301,7 +5301,7 @@ fn respect_no_build_isolation_env_var() -> Result<()> { // Install `setuptools` and `wheel`. uv_snapshot!(context.pip_install() .arg("setuptools") - .arg("wheel"), @r###" + .arg("wheel"), @" success: true exit_code: 0 ----- stdout ----- @@ -5312,13 +5312,13 @@ fn respect_no_build_isolation_env_var() -> Result<()> { Installed 2 packages in [TIME] + setuptools==69.2.0 + wheel==0.43.0 - "###); + "); // We expect the build to succeed, since `setuptools` is now installed. uv_snapshot!(context.pip_install() .arg("-r") .arg("requirements.in") - .env(EnvVars::UV_NO_BUILD_ISOLATION, "yes"), @r###" + .env(EnvVars::UV_NO_BUILD_ISOLATION, "yes"), @" success: true exit_code: 0 ----- stdout ----- @@ -5330,7 +5330,7 @@ fn respect_no_build_isolation_env_var() -> Result<()> { + anyio==0.0.0 (from https://files.pythonhosted.org/packages/db/4d/3970183622f0330d3c23d9b8a5f52e365e50381fd484d08e3285104333d3/anyio-4.3.0.tar.gz) + idna==3.6 + sniffio==1.3.1 - "### + " ); Ok(()) @@ -5347,7 +5347,7 @@ fn install_utf16le_requirements() -> Result<()> { uv_snapshot!(context.pip_install() .arg("-r") - .arg("requirements.txt"), @r###" + .arg("requirements.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -5357,7 +5357,7 @@ fn install_utf16le_requirements() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + tomli==2.0.1 - "### + " ); Ok(()) } @@ -5373,7 +5373,7 @@ fn install_utf16be_requirements() -> Result<()> { uv_snapshot!(context.pip_install() .arg("-r") - .arg("requirements.txt"), @r###" + .arg("requirements.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -5383,7 +5383,7 @@ fn install_utf16be_requirements() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + tomli==2.0.1 - "### + " ); Ok(()) } @@ -5418,7 +5418,7 @@ fn dry_run_install() -> std::result::Result<(), Box> { .arg("-r") .arg("requirements.txt") .arg("--dry-run") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -5434,7 +5434,7 @@ fn dry_run_install() -> std::result::Result<(), Box> { + httpx==0.25.1 + idna==3.6 + sniffio==1.3.1 - "### + " ); Ok(()) @@ -5450,7 +5450,7 @@ fn dry_run_install_url_dependency() -> std::result::Result<(), Box std::result::Result<(), Box std::result::Result<(), Box std::result::Result<(), Box std::result::Result<(), Box std::result::Result<(), Box std::result::Result<(), Box std::result::Result<(), Box std::result::Result<(), Box std::result::Result<(), Box std::result::Result<(), Box std::result::Result<(), Box std::result::Result<(), Box std::result::Result<(), Box=3.13 and example==0.0.0 depends on Python>=3.13, we can conclude that example==0.0.0 cannot be used. And because only example==0.0.0 is available and you require example, we can conclude that your requirements are unsatisfiable. - "### + " ); Ok(()) @@ -5716,7 +5716,7 @@ fn install_package_basic_auth_from_url() { .arg("anyio") .arg("--index-url") .arg("https://public:heron@pypi-proxy.fly.dev/basic-auth/simple") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -5728,7 +5728,7 @@ fn install_package_basic_auth_from_url() { + anyio==4.3.0 + idna==3.6 + sniffio==1.3.1 - "### + " ); context.assert_command("import anyio").success(); @@ -5746,7 +5746,7 @@ fn install_package_basic_auth_from_netrc_default() -> Result<()> { .arg("--index-url") .arg("https://pypi-proxy.fly.dev/basic-auth/simple") .env(EnvVars::NETRC, netrc.to_str().unwrap()) - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -5758,7 +5758,7 @@ fn install_package_basic_auth_from_netrc_default() -> Result<()> { + anyio==4.3.0 + idna==3.6 + sniffio==1.3.1 - "### + " ); context.assert_command("import anyio").success(); @@ -5778,7 +5778,7 @@ fn install_package_basic_auth_from_netrc() -> Result<()> { .arg("--index-url") .arg("https://pypi-proxy.fly.dev/basic-auth/simple") .env(EnvVars::NETRC, netrc.to_str().unwrap()) - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -5790,7 +5790,7 @@ fn install_package_basic_auth_from_netrc() -> Result<()> { + anyio==4.3.0 + idna==3.6 + sniffio==1.3.1 - "### + " ); context.assert_command("import anyio").success(); @@ -5818,7 +5818,7 @@ anyio .arg("-r") .arg("requirements.txt") .env(EnvVars::NETRC, netrc.to_str().unwrap()) - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -5830,7 +5830,7 @@ anyio + anyio==4.3.0 + idna==3.6 + sniffio==1.3.1 - "### + " ); context.assert_command("import anyio").success(); @@ -5847,7 +5847,7 @@ fn install_index_with_relative_links() { .arg("anyio") .arg("--index-url") .arg("https://pypi-proxy.fly.dev/relative/simple") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -5859,7 +5859,7 @@ fn install_index_with_relative_links() { + anyio==4.3.0 + idna==3.6 + sniffio==1.3.1 - "### + " ); context.assert_command("import anyio").success(); @@ -5891,7 +5891,7 @@ fn install_package_basic_auth_from_keyring() { .arg("subprocess") .arg("--strict") .env(EnvVars::KEYRING_TEST_CREDENTIALS, r#"{"pypi-proxy.fly.dev": {"public": "heron"}}"#) - .env(EnvVars::PATH, venv_bin_path(&context.venv)), @r" + .env(EnvVars::PATH, venv_bin_path(&context.venv)), @" success: true exit_code: 0 ----- stdout ----- @@ -5938,7 +5938,7 @@ fn install_package_basic_auth_from_keyring_wrong_password() { .arg("subprocess") .arg("--strict") .env(EnvVars::KEYRING_TEST_CREDENTIALS, r#"{"pypi-proxy.fly.dev": {"public": "foobar"}}"#) - .env(EnvVars::PATH, venv_bin_path(&context.venv)), @r" + .env(EnvVars::PATH, venv_bin_path(&context.venv)), @" success: false exit_code: 1 ----- stdout ----- @@ -5981,7 +5981,7 @@ fn install_package_basic_auth_from_keyring_wrong_username() { .arg("subprocess") .arg("--strict") .env(EnvVars::KEYRING_TEST_CREDENTIALS, r#"{"pypi-proxy.fly.dev": {"other": "heron"}}"#) - .env(EnvVars::PATH, venv_bin_path(&context.venv)), @r" + .env(EnvVars::PATH, venv_bin_path(&context.venv)), @" success: false exit_code: 1 ----- stdout ----- @@ -6006,7 +6006,7 @@ fn install_index_with_relative_links_authenticated() { .arg("anyio") .arg("--index-url") .arg("https://public:heron@pypi-proxy.fly.dev/basic-auth/relative/simple") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -6018,7 +6018,7 @@ fn install_index_with_relative_links_authenticated() { + anyio==4.3.0 + idna==3.6 + sniffio==1.3.1 - "### + " ); context.assert_command("import anyio").success(); @@ -6042,7 +6042,7 @@ fn install_site_packages_mtime_updated() -> Result<()> { // Install a package. uv_snapshot!(context.pip_install() .arg("anyio") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -6054,7 +6054,7 @@ fn install_site_packages_mtime_updated() -> Result<()> { + anyio==4.3.0 + idna==3.6 + sniffio==1.3.1 - "### + " ); let metadata = site_packages.metadata()?; @@ -6083,7 +6083,7 @@ fn deptry_gitignore() { uv_snapshot!(context.filters(), context.pip_install() .arg(format!("deptry_reproducer @ {}", source_dist_dir.join("deptry_reproducer-0.1.0.tar.gz").simplified_display())) .arg("--strict") - .current_dir(source_dist_dir), @r###" + .current_dir(source_dist_dir), @" success: true exit_code: 0 ----- stdout ----- @@ -6096,7 +6096,7 @@ fn deptry_gitignore() { + cffi==1.16.0 + deptry-reproducer==0.1.0 (from file://[WORKSPACE]/test/packages/deptry_reproducer/deptry_reproducer-0.1.0.tar.gz) + pycparser==2.21 - "### + " ); // Check that we packed the python source files @@ -6113,7 +6113,7 @@ fn reinstall_no_index() { // Install anyio uv_snapshot!(context.pip_install() .arg("anyio") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -6125,21 +6125,21 @@ fn reinstall_no_index() { + anyio==4.3.0 + idna==3.6 + sniffio==1.3.1 - "### + " ); // Install anyio again uv_snapshot!(context.pip_install() .arg("anyio") .arg("--no-index") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Audited 1 package in [TIME] - "### + " ); // Reinstall @@ -6149,7 +6149,7 @@ fn reinstall_no_index() { .arg("anyio") .arg("--no-index") .arg("--reinstall") - .arg("--strict"), @r###" + .arg("--strict"), @" success: false exit_code: 1 ----- stdout ----- @@ -6159,7 +6159,7 @@ fn reinstall_no_index() { ╰─▶ Because anyio was not found in the provided package locations and you require anyio, we can conclude that your requirements are unsatisfiable. hint: Packages were unavailable because index lookups were disabled and no additional package locations were provided (try: `--find-links `) - "### + " ); } @@ -6171,7 +6171,7 @@ fn already_installed_remote_dependencies() { uv_snapshot!(context.pip_install() .arg("idna") .arg("sniffio") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -6182,13 +6182,13 @@ fn already_installed_remote_dependencies() { Installed 2 packages in [TIME] + idna==3.6 + sniffio==1.3.1 - "### + " ); // Install anyio. uv_snapshot!(context.pip_install() .arg("anyio") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -6198,7 +6198,7 @@ fn already_installed_remote_dependencies() { Prepared 1 package in [TIME] Installed 1 package in [TIME] + anyio==4.3.0 - "### + " ); } @@ -6213,7 +6213,7 @@ fn already_installed_dependent_editable() { // Install the first editable uv_snapshot!(context.filters(), context.pip_install() .arg("-e") - .arg(root_path.join("first_local")), @r###" + .arg(root_path.join("first_local")), @" success: true exit_code: 0 ----- stdout ----- @@ -6223,7 +6223,7 @@ fn already_installed_dependent_editable() { Prepared 1 package in [TIME] Installed 1 package in [TIME] + first-local==0.1.0 (from file://[WORKSPACE]/test/packages/dependent_locals/first_local) - "### + " ); // Install the second editable which depends on the first editable @@ -6234,7 +6234,7 @@ fn already_installed_dependent_editable() { // Disable the index to guard this test against dependency confusion attacks .arg("--no-index") .arg("--find-links") - .arg(build_vendor_links_url()), @r###" + .arg(build_vendor_links_url()), @" success: true exit_code: 0 ----- stdout ----- @@ -6244,14 +6244,14 @@ fn already_installed_dependent_editable() { Prepared 1 package in [TIME] Installed 1 package in [TIME] + second-local==0.1.0 (from file://[WORKSPACE]/test/packages/dependent_locals/second_local) - "### + " ); // Request install of the first editable by full path again // We should reinstall the package because it was explicitly requested uv_snapshot!(context.filters(), context.pip_install() .arg("-e") - .arg(root_path.join("first_local")), @r###" + .arg(root_path.join("first_local")), @" success: true exit_code: 0 ----- stdout ----- @@ -6262,7 +6262,7 @@ fn already_installed_dependent_editable() { Uninstalled 1 package in [TIME] Installed 1 package in [TIME] ~ first-local==0.1.0 (from file://[WORKSPACE]/test/packages/dependent_locals/first_local) - "### + " ); // Request reinstallation of the first package during install of the second @@ -6275,7 +6275,7 @@ fn already_installed_dependent_editable() { // Disable the index to guard this test against dependency confusion attacks .arg("--no-index") .arg("--find-links") - .arg(build_vendor_links_url()), @r###" + .arg(build_vendor_links_url()), @" success: false exit_code: 1 ----- stdout ----- @@ -6284,7 +6284,7 @@ fn already_installed_dependent_editable() { × No solution found when resolving dependencies: ╰─▶ Because first-local was not found in the provided package locations and second-local==0.1.0 depends on first-local, we can conclude that second-local==0.1.0 cannot be used. And because only second-local==0.1.0 is available and you require second-local, we can conclude that your requirements are unsatisfiable. - "### + " ); // Request reinstallation of the first package @@ -6293,7 +6293,7 @@ fn already_installed_dependent_editable() { .arg("-e") .arg(root_path.join("first_local")) .arg("--reinstall-package") - .arg("first-local"), @r###" + .arg("first-local"), @" success: true exit_code: 0 ----- stdout ----- @@ -6304,7 +6304,7 @@ fn already_installed_dependent_editable() { Uninstalled 1 package in [TIME] Installed 1 package in [TIME] ~ first-local==0.1.0 (from file://[WORKSPACE]/test/packages/dependent_locals/first_local) - "### + " ); } @@ -6318,7 +6318,7 @@ fn already_installed_local_path_dependent() { // Install the first local uv_snapshot!(context.filters(), context.pip_install() - .arg(root_path.join("first_local")), @r###" + .arg(root_path.join("first_local")), @" success: true exit_code: 0 ----- stdout ----- @@ -6328,7 +6328,7 @@ fn already_installed_local_path_dependent() { Prepared 1 package in [TIME] Installed 1 package in [TIME] + first-local==0.1.0 (from file://[WORKSPACE]/test/packages/dependent_locals/first_local) - "### + " ); // Install the second local which depends on the first local @@ -6338,7 +6338,7 @@ fn already_installed_local_path_dependent() { // Disable the index to guard this test against dependency confusion attacks .arg("--no-index") .arg("--find-links") - .arg(build_vendor_links_url()), @r###" + .arg(build_vendor_links_url()), @" success: true exit_code: 0 ----- stdout ----- @@ -6348,13 +6348,13 @@ fn already_installed_local_path_dependent() { Prepared 1 package in [TIME] Installed 1 package in [TIME] + second-local==0.1.0 (from file://[WORKSPACE]/test/packages/dependent_locals/second_local) - "### + " ); // Request install of the first local by full path again. // We should rebuild and reinstall it. uv_snapshot!(context.filters(), context.pip_install() - .arg(root_path.join("first_local")), @r###" + .arg(root_path.join("first_local")), @" success: true exit_code: 0 ----- stdout ----- @@ -6365,13 +6365,13 @@ fn already_installed_local_path_dependent() { Uninstalled 1 package in [TIME] Installed 1 package in [TIME] ~ first-local==0.1.0 (from file://[WORKSPACE]/test/packages/dependent_locals/first_local) - "### + " ); // Request install of the first local by full path again, along with its name. // We should rebuild and reinstall it. uv_snapshot!(context.filters(), context.pip_install() - .arg(format!("first-local @ {}", root_path.join("first_local").display())), @r###" + .arg(format!("first-local @ {}", root_path.join("first_local").display())), @" success: true exit_code: 0 ----- stdout ----- @@ -6382,7 +6382,7 @@ fn already_installed_local_path_dependent() { Uninstalled 1 package in [TIME] Installed 1 package in [TIME] ~ first-local==0.1.0 (from file://[WORKSPACE]/test/packages/dependent_locals/first_local) - "### + " ); // Request reinstallation of the first package during install of the second @@ -6394,7 +6394,7 @@ fn already_installed_local_path_dependent() { // Disable the index to guard this test against dependency confusion attacks .arg("--no-index") .arg("--find-links") - .arg(build_vendor_links_url()), @r###" + .arg(build_vendor_links_url()), @" success: false exit_code: 1 ----- stdout ----- @@ -6403,7 +6403,7 @@ fn already_installed_local_path_dependent() { × No solution found when resolving dependencies: ╰─▶ Because first-local was not found in the provided package locations and second-local==0.1.0 depends on first-local, we can conclude that second-local==0.1.0 cannot be used. And because only second-local==0.1.0 is available and you require second-local, we can conclude that your requirements are unsatisfiable. - "### + " ); // Request reinstallation of the first package @@ -6412,7 +6412,7 @@ fn already_installed_local_path_dependent() { .arg(root_path.join("second_local")) .arg(root_path.join("first_local")) .arg("--reinstall-package") - .arg("first-local"), @r" + .arg("first-local"), @" success: true exit_code: 0 ----- stdout ----- @@ -6436,7 +6436,7 @@ fn already_installed_local_path_dependent() { // Disable the index to guard this test against dependency confusion attacks .arg("--no-index") .arg("--find-links") - .arg(build_vendor_links_url()), @r###" + .arg(build_vendor_links_url()), @" success: true exit_code: 0 ----- stdout ----- @@ -6447,7 +6447,7 @@ fn already_installed_local_path_dependent() { Uninstalled 1 package in [TIME] Installed 1 package in [TIME] ~ second-local==0.1.0 (from file://[WORKSPACE]/test/packages/dependent_locals/second_local) - "### + " ); // Request upgrade of the first package @@ -6461,7 +6461,7 @@ fn already_installed_local_path_dependent() { // Disable the index to guard this test against dependency confusion attacks .arg("--no-index") .arg("--find-links") - .arg(build_vendor_links_url()), @r###" + .arg(build_vendor_links_url()), @" success: true exit_code: 0 ----- stdout ----- @@ -6473,7 +6473,7 @@ fn already_installed_local_path_dependent() { Installed 2 packages in [TIME] ~ first-local==0.1.0 (from file://[WORKSPACE]/test/packages/dependent_locals/first_local) ~ second-local==0.1.0 (from file://[WORKSPACE]/test/packages/dependent_locals/second_local) - "### + " ); } @@ -6485,7 +6485,7 @@ fn already_installed_local_version_of_remote_package() { // Install the local anyio first uv_snapshot!(context.filters(), context.pip_install() - .arg(root_path.join("anyio_local")), @r###" + .arg(root_path.join("anyio_local")), @" success: true exit_code: 0 ----- stdout ----- @@ -6495,19 +6495,19 @@ fn already_installed_local_version_of_remote_package() { Prepared 1 package in [TIME] Installed 1 package in [TIME] + anyio==4.3.0+foo (from file://[WORKSPACE]/test/packages/anyio_local) - "### + " ); // Install again without specifying a local path — this should not pull from the index uv_snapshot!(context.filters(), context.pip_install() - .arg("anyio"), @r###" + .arg("anyio"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Audited 1 package in [TIME] - "### + " ); // Request install with a different version @@ -6516,7 +6516,7 @@ fn already_installed_local_version_of_remote_package() { // but we disable it here to preserve this dependency for future tests uv_snapshot!(context.filters(), context.pip_install() .arg("anyio==4.2.0") - .arg("--no-index"), @r###" + .arg("--no-index"), @" success: false exit_code: 1 ----- stdout ----- @@ -6526,14 +6526,14 @@ fn already_installed_local_version_of_remote_package() { ╰─▶ Because anyio was not found in the provided package locations and you require anyio==4.2.0, we can conclude that your requirements are unsatisfiable. hint: Packages were unavailable because index lookups were disabled and no additional package locations were provided (try: `--find-links `) - "### + " ); // Request reinstallation with the local version segment — this should fail since it is not available // in the index and the path was not provided uv_snapshot!(context.filters(), context.pip_install() .arg("anyio==4.3.0+foo") - .arg("--reinstall"), @r###" + .arg("--reinstall"), @" success: false exit_code: 1 ----- stdout ----- @@ -6541,7 +6541,7 @@ fn already_installed_local_version_of_remote_package() { ----- stderr ----- × No solution found when resolving dependencies: ╰─▶ Because there is no version of anyio==4.3.0+foo and you require anyio==4.3.0+foo, we can conclude that your requirements are unsatisfiable. - "### + " ); // Request reinstall with the full path, this should reinstall from the path and not pull from @@ -6549,7 +6549,7 @@ fn already_installed_local_version_of_remote_package() { uv_snapshot!(context.filters(), context.pip_install() .arg(root_path.join("anyio_local")) .arg("--reinstall") - .arg("anyio"), @r###" + .arg("anyio"), @" success: true exit_code: 0 ----- stdout ----- @@ -6560,14 +6560,14 @@ fn already_installed_local_version_of_remote_package() { Uninstalled 1 package in [TIME] Installed 1 package in [TIME] ~ anyio==4.3.0+foo (from file://[WORKSPACE]/test/packages/anyio_local) - "### + " ); // Request reinstallation with just the name, this should pull from the index // and replace the path dependency uv_snapshot!(context.filters(), context.pip_install() .arg("anyio") - .arg("--reinstall"), @r###" + .arg("--reinstall"), @" success: true exit_code: 0 ----- stdout ----- @@ -6581,12 +6581,12 @@ fn already_installed_local_version_of_remote_package() { + anyio==4.3.0 + idna==3.6 + sniffio==1.3.1 - "### + " ); // Install the local anyio again so we can test upgrades uv_snapshot!(context.filters(), context.pip_install() - .arg(root_path.join("anyio_local")), @r###" + .arg(root_path.join("anyio_local")), @" success: true exit_code: 0 ----- stdout ----- @@ -6598,14 +6598,14 @@ fn already_installed_local_version_of_remote_package() { Installed 1 package in [TIME] - anyio==4.3.0 + anyio==4.3.0+foo (from file://[WORKSPACE]/test/packages/anyio_local) - "### + " ); // Request upgrade with just the name // We shouldn't pull from the index because the local version is "newer" uv_snapshot!(context.filters(), context.pip_install() .arg("anyio") - .arg("--upgrade"), @r###" + .arg("--upgrade"), @" success: true exit_code: 0 ----- stdout ----- @@ -6613,13 +6613,13 @@ fn already_installed_local_version_of_remote_package() { ----- stderr ----- Resolved 1 package in [TIME] Audited 1 package in [TIME] - "### + " ); // Install something that depends on anyio // We shouldn't overwrite our local version with the remote anyio here uv_snapshot!(context.filters(), context.pip_install() - .arg("httpx"), @r###" + .arg("httpx"), @" success: true exit_code: 0 ----- stdout ----- @@ -6632,7 +6632,7 @@ fn already_installed_local_version_of_remote_package() { + h11==0.14.0 + httpcore==1.0.4 + httpx==0.27.0 - "### + " ); } @@ -6671,7 +6671,7 @@ fn already_installed_multiple_versions() -> Result<()> { // Request the second anyio version again // Should remove both previous versions and reinstall the second one - uv_snapshot!(context.filters(), context.pip_install().arg("anyio==4.0.0"), @r###" + uv_snapshot!(context.filters(), context.pip_install().arg("anyio==4.0.0"), @" success: true exit_code: 0 ----- stdout ----- @@ -6683,7 +6683,7 @@ fn already_installed_multiple_versions() -> Result<()> { Installed 1 package in [TIME] - anyio==3.7.0 ~ anyio==4.0.0 - "### + " ); // Reset the test context @@ -6692,7 +6692,7 @@ fn already_installed_multiple_versions() -> Result<()> { // Request the anyio without a version specifier // This is loosely a regression test for the ordering of the installation preferences // from existing site-packages - uv_snapshot!(context.filters(), context.pip_install().arg("anyio"), @r###" + uv_snapshot!(context.filters(), context.pip_install().arg("anyio"), @" success: true exit_code: 0 ----- stdout ----- @@ -6705,7 +6705,7 @@ fn already_installed_multiple_versions() -> Result<()> { - anyio==3.7.0 - anyio==4.0.0 + anyio==4.3.0 - "### + " ); Ok(()) @@ -6718,7 +6718,7 @@ fn already_installed_remote_url() { let context = TestContext::new(DEFAULT_PYTHON_VERSION); // First, install from the remote URL - uv_snapshot!(context.filters(), context.pip_install().arg("uv-public-pypackage @ git+https://github.com/astral-test/uv-public-pypackage"), @r###" + uv_snapshot!(context.filters(), context.pip_install().arg("uv-public-pypackage @ git+https://github.com/astral-test/uv-public-pypackage"), @" success: true exit_code: 0 ----- stdout ----- @@ -6728,14 +6728,14 @@ fn already_installed_remote_url() { Prepared 1 package in [TIME] Installed 1 package in [TIME] + uv-public-pypackage==0.1.0 (from git+https://github.com/astral-test/uv-public-pypackage@b270df1a2fb5d012294e9aaf05e7e0bab1e6a389) - "###); + "); context.assert_installed("uv_public_pypackage", "0.1.0"); // Request installation again with a different URL, but the same _canonical_ URL. We should // resolve the package (since we installed a specific commit, but are now requesting the default // branch), but not reinstall the package. - uv_snapshot!(context.filters(), context.pip_install().arg("uv-public-pypackage @ git+https://github.com/astral-test/uv-public-pypackage.git"), @r###" + uv_snapshot!(context.filters(), context.pip_install().arg("uv-public-pypackage @ git+https://github.com/astral-test/uv-public-pypackage.git"), @" success: true exit_code: 0 ----- stdout ----- @@ -6743,12 +6743,12 @@ fn already_installed_remote_url() { ----- stderr ----- Resolved 1 package in [TIME] Audited 1 package in [TIME] - "###); + "); // Request installation again with a different URL, but the same _canonical_ URL and the same // commit. We should neither resolve nor reinstall the package, since it's already installed // at this precise commit. - uv_snapshot!(context.filters(), context.pip_install().arg("uv-public-pypackage @ git+https://github.com/astral-test/uv-public-pypackage.git@b270df1a2fb5d012294e9aaf05e7e0bab1e6a389"), @r###" + uv_snapshot!(context.filters(), context.pip_install().arg("uv-public-pypackage @ git+https://github.com/astral-test/uv-public-pypackage.git@b270df1a2fb5d012294e9aaf05e7e0bab1e6a389"), @" success: true exit_code: 0 ----- stdout ----- @@ -6756,19 +6756,19 @@ fn already_installed_remote_url() { ----- stderr ----- Resolved 1 package in [TIME] Audited 1 package in [TIME] - "###); + "); // Request installation again with just the name // We should just audit the URL package since it fulfills this requirement uv_snapshot!( - context.pip_install().arg("uv-public-pypackage"), @r###" + context.pip_install().arg("uv-public-pypackage"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Audited 1 package in [TIME] - "###); + "); // Request reinstallation // We should fail since the URL was not provided @@ -6776,7 +6776,7 @@ fn already_installed_remote_url() { context.pip_install() .arg("uv-public-pypackage") .arg("--no-index") - .arg("--reinstall"), @r###" + .arg("--reinstall"), @" success: false exit_code: 1 ----- stdout ----- @@ -6786,12 +6786,12 @@ fn already_installed_remote_url() { ╰─▶ Because uv-public-pypackage was not found in the provided package locations and you require uv-public-pypackage, we can conclude that your requirements are unsatisfiable. hint: Packages were unavailable because index lookups were disabled and no additional package locations were provided (try: `--find-links `) - "###); + "); // Request installation again with just the full URL // We should just audit the existing package uv_snapshot!( - context.pip_install().arg("uv-public-pypackage @ git+https://github.com/astral-test/uv-public-pypackage"), @r###" + context.pip_install().arg("uv-public-pypackage @ git+https://github.com/astral-test/uv-public-pypackage"), @" success: true exit_code: 0 ----- stdout ----- @@ -6799,14 +6799,14 @@ fn already_installed_remote_url() { ----- stderr ----- Resolved 1 package in [TIME] Audited 1 package in [TIME] - "###); + "); // Request reinstallation with the full URL // We should reinstall successfully uv_snapshot!( context.pip_install() .arg("uv-public-pypackage @ git+https://github.com/astral-test/uv-public-pypackage") - .arg("--reinstall"), @r###" + .arg("--reinstall"), @" success: true exit_code: 0 ----- stdout ----- @@ -6817,12 +6817,12 @@ fn already_installed_remote_url() { Uninstalled 1 package in [TIME] Installed 1 package in [TIME] ~ uv-public-pypackage==0.1.0 (from git+https://github.com/astral-test/uv-public-pypackage@b270df1a2fb5d012294e9aaf05e7e0bab1e6a389) - "###); + "); // Request installation again with a different version // We should attempt to pull from the index since the local version does not match uv_snapshot!( - context.pip_install().arg("uv-public-pypackage==0.2.0").arg("--no-index"), @r###" + context.pip_install().arg("uv-public-pypackage==0.2.0").arg("--no-index"), @" success: false exit_code: 1 ----- stdout ----- @@ -6832,7 +6832,7 @@ fn already_installed_remote_url() { ╰─▶ Because uv-public-pypackage was not found in the provided package locations and you require uv-public-pypackage==0.2.0, we can conclude that your requirements are unsatisfiable. hint: Packages were unavailable because index lookups were disabled and no additional package locations were provided (try: `--find-links `) - "###); + "); } /// Sync using `--find-links` with a local directory. @@ -6843,7 +6843,7 @@ fn find_links() { uv_snapshot!(context.filters(), context.pip_install() .arg("tqdm") .arg("--find-links") - .arg(context.workspace_root.join("test/links/")), @r###" + .arg(context.workspace_root.join("test/links/")), @" success: true exit_code: 0 ----- stdout ----- @@ -6853,7 +6853,7 @@ fn find_links() { Prepared 1 package in [TIME] Installed 1 package in [TIME] + tqdm==1000.0.0 - "### + " ); } @@ -6867,7 +6867,7 @@ fn find_links_no_binary() { .arg("--no-binary") .arg(":all:") .arg("--find-links") - .arg(context.workspace_root.join("test/links/")), @r###" + .arg(context.workspace_root.join("test/links/")), @" success: true exit_code: 0 ----- stdout ----- @@ -6877,7 +6877,7 @@ fn find_links_no_binary() { Prepared 1 package in [TIME] Installed 1 package in [TIME] + tqdm==999.0.0 - "### + " ); } @@ -6905,7 +6905,7 @@ fn require_hashes() -> Result<()> { uv_snapshot!(context.pip_install() .arg("-r") .arg("requirements.txt") - .arg("--require-hashes"), @r###" + .arg("--require-hashes"), @" success: true exit_code: 0 ----- stdout ----- @@ -6917,7 +6917,7 @@ fn require_hashes() -> Result<()> { + anyio==4.0.0 + idna==3.6 + sniffio==1.3.1 - "### + " ); Ok(()) @@ -6948,7 +6948,7 @@ fn require_hashes_build_dependencies() -> Result<()> { .arg("--no-binary").arg(":all:") .arg("-r") .arg("requirements.txt") - .arg("--require-hashes"), @r" + .arg("--require-hashes"), @" success: true exit_code: 0 ----- stdout ----- @@ -6983,7 +6983,7 @@ fn require_hashes_no_deps() -> Result<()> { .arg("-r") .arg("requirements.txt") .arg("--no-deps") - .arg("--require-hashes"), @r###" + .arg("--require-hashes"), @" success: true exit_code: 0 ----- stdout ----- @@ -6993,7 +6993,7 @@ fn require_hashes_no_deps() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + anyio==4.0.0 - "### + " ); Ok(()) @@ -7024,7 +7024,7 @@ fn require_hashes_mismatch() -> Result<()> { uv_snapshot!(context.pip_install() .arg("-r") .arg("requirements.txt") - .arg("--require-hashes"), @r###" + .arg("--require-hashes"), @" success: false exit_code: 1 ----- stdout ----- @@ -7040,7 +7040,7 @@ fn require_hashes_mismatch() -> Result<()> { Computed: sha256:cfdb2b588b9fc25ede96d8db56ed50848b0b649dca3dd1df0b11f683bb9e0b5f - "### + " ); Ok(()) @@ -7061,14 +7061,14 @@ fn require_hashes_missing_dependency() -> Result<()> { uv_snapshot!(context.pip_install() .arg("-r") .arg("requirements.txt") - .arg("--require-hashes"), @r###" + .arg("--require-hashes"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: In `--require-hashes` mode, all requirements must be pinned upfront with `==`, but found: `markupsafe` - "### + " ); Ok(()) @@ -7090,14 +7090,14 @@ fn require_hashes_editable() -> Result<()> { uv_snapshot!(context.filters(), context.pip_install() .arg("-r") .arg(requirements_txt.path()) - .arg("--require-hashes"), @r###" + .arg("--require-hashes"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: In `--require-hashes` mode, all requirements must have a hash, but none were provided for: file://[WORKSPACE]/test/packages/black_editable[d] - "### + " ); Ok(()) @@ -7122,7 +7122,7 @@ fn require_hashes_constraint() -> Result<()> { .arg("--no-deps") .arg("--require-hashes") .arg("-c") - .arg(constraints_txt.path()), @r###" + .arg(constraints_txt.path()), @" success: true exit_code: 0 ----- stdout ----- @@ -7132,7 +7132,7 @@ fn require_hashes_constraint() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + anyio==4.0.0 - "### + " ); // Include the hash in the requirements file, but pin the version in the constraint file. @@ -7153,14 +7153,14 @@ fn require_hashes_constraint() -> Result<()> { .arg("--no-deps") .arg("--require-hashes") .arg("-c") - .arg(constraints_txt.path()), @r###" + .arg(constraints_txt.path()), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: In `--require-hashes` mode, all requirements must have their versions pinned with `==`, but found: anyio - "### + " ); // Include an empty intersection. This should fail. @@ -7181,14 +7181,14 @@ fn require_hashes_constraint() -> Result<()> { .arg("--no-deps") .arg("--require-hashes") .arg("-c") - .arg(constraints_txt.path()), @r###" + .arg(constraints_txt.path()), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: In `--require-hashes` mode, all requirements must have a hash, but there were no overlapping hashes between the requirements and constraints for: anyio==4.0.0 - "### + " ); // Include the right hash in both files. @@ -7209,7 +7209,7 @@ fn require_hashes_constraint() -> Result<()> { .arg("--no-deps") .arg("--require-hashes") .arg("-c") - .arg(constraints_txt.path()), @r###" + .arg(constraints_txt.path()), @" success: true exit_code: 0 ----- stdout ----- @@ -7219,7 +7219,7 @@ fn require_hashes_constraint() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + anyio==4.0.0 - "### + " ); // Include the right hash in both files, along with an irrelevant, wrong hash. @@ -7240,7 +7240,7 @@ fn require_hashes_constraint() -> Result<()> { .arg("--no-deps") .arg("--require-hashes") .arg("-c") - .arg(constraints_txt.path()), @r###" + .arg(constraints_txt.path()), @" success: true exit_code: 0 ----- stdout ----- @@ -7250,7 +7250,7 @@ fn require_hashes_constraint() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + anyio==4.0.0 - "### + " ); Ok(()) @@ -7278,7 +7278,7 @@ fn require_hashes_unnamed() -> Result<()> { uv_snapshot!(context.pip_install() .arg("-r") .arg("requirements.txt") - .arg("--require-hashes"), @r###" + .arg("--require-hashes"), @" success: true exit_code: 0 ----- stdout ----- @@ -7290,7 +7290,7 @@ fn require_hashes_unnamed() -> Result<()> { + anyio==4.0.0 (from https://files.pythonhosted.org/packages/36/55/ad4de788d84a630656ece71059665e01ca793c04294c463fd84132f40fe6/anyio-4.0.0-py3-none-any.whl) + idna==3.6 + sniffio==1.3.1 - "### + " ); Ok(()) @@ -7323,7 +7323,7 @@ fn require_hashes_unnamed_repeated() -> Result<()> { uv_snapshot!(context.pip_install() .arg("-r") .arg("requirements.txt") - .arg("--require-hashes"), @r###" + .arg("--require-hashes"), @" success: true exit_code: 0 ----- stdout ----- @@ -7335,7 +7335,7 @@ fn require_hashes_unnamed_repeated() -> Result<()> { + anyio==4.0.0 (from https://files.pythonhosted.org/packages/36/55/ad4de788d84a630656ece71059665e01ca793c04294c463fd84132f40fe6/anyio-4.0.0-py3-none-any.whl) + idna==3.6 + sniffio==1.3.1 - "### + " ); Ok(()) @@ -7361,14 +7361,14 @@ fn require_hashes_override() -> Result<()> { .arg(requirements_txt.path()) .arg("--require-hashes") .arg("--override") - .arg(overrides_txt.path()), @r###" + .arg(overrides_txt.path()), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: In `--require-hashes` mode, all requirements must have a hash, but none were provided for: anyio==4.0.0 - "### + " ); // Include the hash in the requirements file, but pin the version in the override file. @@ -7386,14 +7386,14 @@ fn require_hashes_override() -> Result<()> { .arg(requirements_txt.path()) .arg("--require-hashes") .arg("--override") - .arg(overrides_txt.path()), @r###" + .arg(overrides_txt.path()), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: In `--require-hashes` mode, all requirements must have their versions pinned with `==`, but found: anyio - "### + " ); Ok(()) @@ -7412,7 +7412,7 @@ fn install_with_overrides_from_stdin() -> Result<()> { .arg("anyio==4.0.1") .arg("--override") .arg("-") - .stdin(std::fs::File::open(overrides_txt)?), @r###" + .stdin(std::fs::File::open(overrides_txt)?), @" success: true exit_code: 0 ----- stdout ----- @@ -7424,7 +7424,7 @@ fn install_with_overrides_from_stdin() -> Result<()> { + anyio==4.0.0 + idna==3.6 + sniffio==1.3.1 - "### + " ); Ok(()) @@ -7443,7 +7443,7 @@ fn install_with_excludes_from_stdin() -> Result<()> { .arg("anyio==4.0.1") .arg("--exclude") .arg("-") - .stdin(std::fs::File::open(excludes_txt)?), @r###" + .stdin(std::fs::File::open(excludes_txt)?), @" success: false exit_code: 1 ----- stdout ----- @@ -7451,7 +7451,7 @@ fn install_with_excludes_from_stdin() -> Result<()> { ----- stderr ----- × No solution found when resolving dependencies: ╰─▶ Because there is no version of anyio==4.0.1 and you require anyio==4.0.1, we can conclude that your requirements are unsatisfiable. - "### + " ); Ok(()) @@ -7576,7 +7576,7 @@ fn require_hashes_marker() -> Result<()> { uv_snapshot!(context.pip_install() .arg("-r") .arg("requirements.txt") - .arg("--require-hashes"), @r###" + .arg("--require-hashes"), @" success: true exit_code: 0 ----- stdout ----- @@ -7590,7 +7590,7 @@ fn require_hashes_marker() -> Result<()> { + idna==3.10 + requests==2.32.3 + urllib3==2.2.3 - "### + " ); Ok(()) @@ -7620,7 +7620,7 @@ fn verify_hashes() -> Result<()> { uv_snapshot!(context.pip_install() .arg("-r") .arg("requirements.txt") - .arg("--verify-hashes"), @r###" + .arg("--verify-hashes"), @" success: true exit_code: 0 ----- stdout ----- @@ -7632,7 +7632,7 @@ fn verify_hashes() -> Result<()> { + anyio==4.0.0 + idna==3.6 + sniffio==1.3.1 - "### + " ); Ok(()) @@ -7662,7 +7662,7 @@ fn verify_hashes_missing_version() -> Result<()> { uv_snapshot!(context.pip_install() .arg("-r") .arg("requirements.txt") - .arg("--verify-hashes"), @r###" + .arg("--verify-hashes"), @" success: true exit_code: 0 ----- stdout ----- @@ -7674,7 +7674,7 @@ fn verify_hashes_missing_version() -> Result<()> { + anyio==4.3.0 + idna==3.6 + sniffio==1.3.1 - "### + " ); Ok(()) @@ -7697,7 +7697,7 @@ fn verify_hashes_mismatch() -> Result<()> { .arg("--no-deps") .arg("-r") .arg("requirements.txt") - .arg("--verify-hashes"), @r###" + .arg("--verify-hashes"), @" success: false exit_code: 1 ----- stdout ----- @@ -7713,14 +7713,14 @@ fn verify_hashes_mismatch() -> Result<()> { Computed: sha256:c05567e9c24a6b9faaa835c4821bad0590fbb9d5779e7caa6e1cc4978e7eb24f - "### + " ); uv_snapshot!(context.pip_install() .arg("--no-deps") .arg("-r") .arg("requirements.txt") - .arg("--no-verify-hashes"), @r###" + .arg("--no-verify-hashes"), @" success: true exit_code: 0 ----- stdout ----- @@ -7729,7 +7729,7 @@ fn verify_hashes_mismatch() -> Result<()> { Resolved 1 package in [TIME] Installed 1 package in [TIME] + idna==3.6 - "### + " ); Ok(()) @@ -7750,7 +7750,7 @@ fn verify_hashes_match() -> Result<()> { uv_snapshot!(context.pip_install() .arg("--no-deps") .arg("-r") - .arg("requirements.txt"), @r###" + .arg("requirements.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -7760,7 +7760,7 @@ fn verify_hashes_match() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + idna==3.6 - "### + " ); Ok(()) @@ -7781,7 +7781,7 @@ fn verify_hashes_omit_dependency() -> Result<()> { uv_snapshot!(context.pip_install() .arg("-r") .arg("requirements.txt") - .arg("--verify-hashes"), @r###" + .arg("--verify-hashes"), @" success: true exit_code: 0 ----- stdout ----- @@ -7793,7 +7793,7 @@ fn verify_hashes_omit_dependency() -> Result<()> { + anyio==4.0.0 + idna==3.6 + sniffio==1.3.1 - "### + " ); Ok(()) @@ -7815,7 +7815,7 @@ fn verify_hashes_editable() -> Result<()> { uv_snapshot!(context.filters(), context.pip_install() .arg("-r") .arg(requirements_txt.path()) - .arg("--verify-hashes"), @r###" + .arg("--verify-hashes"), @" success: true exit_code: 0 ----- stdout ----- @@ -7832,7 +7832,7 @@ fn verify_hashes_editable() -> Result<()> { + idna==3.6 + multidict==6.0.5 + yarl==1.9.4 - "### + " ); Ok(()) @@ -7857,7 +7857,7 @@ fn double_quoted_arguments() -> Result<()> { uv_snapshot!(context.pip_install() .arg("-r") - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -7867,7 +7867,7 @@ fn double_quoted_arguments() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + iniconfig==1.0.0 - "### + " ); Ok(()) @@ -7892,7 +7892,7 @@ fn single_quoted_arguments() -> Result<()> { uv_snapshot!(context.pip_install() .arg("-r") - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -7902,7 +7902,7 @@ fn single_quoted_arguments() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + iniconfig==1.0.0 - "### + " ); Ok(()) @@ -7927,7 +7927,7 @@ fn unquoted_arguments() -> Result<()> { uv_snapshot!(context.pip_install() .arg("-r") - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -7937,7 +7937,7 @@ fn unquoted_arguments() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + iniconfig==1.0.0 - "### + " ); Ok(()) @@ -7962,7 +7962,7 @@ fn concatenated_quoted_arguments() -> Result<()> { uv_snapshot!(context.pip_install() .arg("-r") - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -7972,7 +7972,7 @@ fn concatenated_quoted_arguments() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + iniconfig==1.0.0 - "### + " ); Ok(()) @@ -8030,7 +8030,7 @@ fn tool_uv_sources() -> Result<()> { .arg("-r") .arg(require_path) .arg("--extra") - .arg("utils"), @r###" + .arg("utils"), @" success: true exit_code: 0 ----- stdout ----- @@ -8048,7 +8048,7 @@ fn tool_uv_sources() -> Result<()> { + sniffio==1.3.1 + tqdm==4.66.0 (from https://files.pythonhosted.org/packages/a5/d6/502a859bac4ad5e274255576cd3e15ca273cdb91731bc39fb840dd422ee9/tqdm-4.66.0-py3-none-any.whl) + urllib3==2.2.1 (from https://files.pythonhosted.org/packages/a2/73/a68704750a7679d0b6d3ad7aa8d4da8e14e151ae82e6fee774e6e0d05ec8/urllib3-2.2.1-py3-none-any.whl) - "### + " ); // Re-install the editable packages. @@ -8056,7 +8056,7 @@ fn tool_uv_sources() -> Result<()> { .arg("-r") .arg(require_path) .arg("--extra") - .arg("utils"), @r###" + .arg("utils"), @" success: true exit_code: 0 ----- stdout ----- @@ -8064,7 +8064,7 @@ fn tool_uv_sources() -> Result<()> { ----- stderr ----- Resolved 9 packages in [TIME] Audited 9 packages in [TIME] - "### + " ); Ok(()) } @@ -8088,7 +8088,7 @@ fn tool_uv_sources_is_in_preview() -> Result<()> { // Install the editable packages. uv_snapshot!(context.filters(), context.pip_install() .arg("-r") - .arg("pyproject.toml"), @r###" + .arg("pyproject.toml"), @" success: true exit_code: 0 ----- stdout ----- @@ -8098,7 +8098,7 @@ fn tool_uv_sources_is_in_preview() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + iniconfig==2.0.0 (from https://files.pythonhosted.org/packages/ef/a6/62565a6e1cf69e10f5727360368e451d4b7f58beeac6173dc9db836a5b46/iniconfig-2.0.0-py3-none-any.whl) - "### + " ); Ok(()) @@ -8126,7 +8126,7 @@ fn recursive_extra_transitive_url() -> Result<()> { "#})?; uv_snapshot!(context.filters(), context.pip_install() - .arg(".[all]"), @r###" + .arg(".[all]"), @" success: true exit_code: 0 ----- stdout ----- @@ -8137,7 +8137,7 @@ fn recursive_extra_transitive_url() -> Result<()> { Installed 2 packages in [TIME] + iniconfig==2.0.0 (from https://files.pythonhosted.org/packages/ef/a6/62565a6e1cf69e10f5727360368e451d4b7f58beeac6173dc9db836a5b46/iniconfig-2.0.0-py3-none-any.whl) + project==0.0.0 (from file://[TEMP_DIR]/) - "###); + "); Ok(()) } @@ -8150,7 +8150,7 @@ fn prefer_editable() -> Result<()> { uv_snapshot!(context.filters(), context.pip_install() .arg("-e") .arg(context.workspace_root.join("test/packages/black_editable")) - .arg(context.workspace_root.join("test/packages/black_editable")), @r###" + .arg(context.workspace_root.join("test/packages/black_editable")), @" success: true exit_code: 0 ----- stdout ----- @@ -8160,7 +8160,7 @@ fn prefer_editable() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + black==0.1.0 (from file://[WORKSPACE]/test/packages/black_editable) - "### + " ); // Validate that `black.pth` was created. @@ -8179,7 +8179,7 @@ fn prefer_editable() -> Result<()> { .arg("-e") .arg(context.workspace_root.join("test/packages/black_editable")) .arg("-r") - .arg("requirements.txt"), @r###" + .arg("requirements.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -8189,7 +8189,7 @@ fn prefer_editable() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + black==0.1.0 (from file://[WORKSPACE]/test/packages/black_editable) - "### + " ); // Validate that `black.pth` was created. @@ -8233,7 +8233,7 @@ fn local_index_absolute() -> Result<()> { .env_remove(EnvVars::UV_EXCLUDE_NEWER) .arg("tqdm") .arg("--index-url") - .arg(Url::from_directory_path(root).unwrap().as_str()), @r###" + .arg(Url::from_directory_path(root).unwrap().as_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -8243,7 +8243,7 @@ fn local_index_absolute() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + tqdm==1000.0.0 - "### + " ); Ok(()) @@ -8284,7 +8284,7 @@ fn local_index_relative() -> Result<()> { .env_remove(EnvVars::UV_EXCLUDE_NEWER) .arg("tqdm") .arg("--index-url") - .arg("./simple-html"), @r###" + .arg("./simple-html"), @" success: true exit_code: 0 ----- stdout ----- @@ -8294,7 +8294,7 @@ fn local_index_relative() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + tqdm==1000.0.0 - "### + " ); Ok(()) @@ -8340,7 +8340,7 @@ fn local_index_requirements_txt_absolute() -> Result<()> { uv_snapshot!(context.filters(), context.pip_install() .env_remove(EnvVars::UV_EXCLUDE_NEWER) .arg("-r") - .arg("requirements.txt"), @r###" + .arg("requirements.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -8350,7 +8350,7 @@ fn local_index_requirements_txt_absolute() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + tqdm==1000.0.0 - "### + " ); Ok(()) @@ -8398,7 +8398,7 @@ fn local_index_requirements_txt_relative() -> Result<()> { uv_snapshot!(context.filters(), context.pip_install() .env_remove(EnvVars::UV_EXCLUDE_NEWER) .arg("-r") - .arg("requirements.txt"), @r###" + .arg("requirements.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -8408,7 +8408,7 @@ fn local_index_requirements_txt_relative() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + tqdm==1000.0.0 - "### + " ); Ok(()) @@ -8444,7 +8444,7 @@ fn local_index_fallback() -> Result<()> { uv_snapshot!(context.filters(), context.pip_install() .arg("iniconfig") .arg("--extra-index-url") - .arg(Url::from_directory_path(root).unwrap().as_str()), @r###" + .arg(Url::from_directory_path(root).unwrap().as_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -8454,7 +8454,7 @@ fn local_index_fallback() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + iniconfig==2.0.0 - "### + " ); Ok(()) @@ -8467,7 +8467,7 @@ fn accept_existing_prerelease() -> Result<()> { requirements_txt.write_str("Flask==2.0.0rc1")?; // Install a pre-release version of `flask`. - uv_snapshot!(context.filters(), context.pip_install().arg("Flask==2.0.0rc1"), @r###" + uv_snapshot!(context.filters(), context.pip_install().arg("Flask==2.0.0rc1"), @" success: true exit_code: 0 ----- stdout ----- @@ -8482,12 +8482,12 @@ fn accept_existing_prerelease() -> Result<()> { + jinja2==3.1.3 + markupsafe==2.1.5 + werkzeug==3.0.1 - "### + " ); // Install `flask-login`, without enabling pre-releases. The existing version of `flask` should // still be accepted. - uv_snapshot!(context.filters(), context.pip_install().arg("flask-login==0.6.0"), @r###" + uv_snapshot!(context.filters(), context.pip_install().arg("flask-login==0.6.0"), @" success: true exit_code: 0 ----- stdout ----- @@ -8497,7 +8497,7 @@ fn accept_existing_prerelease() -> Result<()> { Prepared [N] packages in [TIME] Installed [N] packages in [TIME] + flask-login==0.6.0 - "### + " ); Ok(()) @@ -8521,7 +8521,7 @@ fn unmanaged() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.pip_install().arg("."), @r###" + uv_snapshot!(context.filters(), context.pip_install().arg("."), @" success: true exit_code: 0 ----- stdout ----- @@ -8534,7 +8534,7 @@ fn unmanaged() -> Result<()> { + example==0.0.0 (from file://[TEMP_DIR]/) + idna==3.6 + sniffio==1.3.1 - "### + " ); Ok(()) @@ -8613,14 +8613,14 @@ fn install_incompatible_python_version() { // Request Python 3.12; which should fail uv_snapshot!(context.filters(), context.pip_install().arg("-p").arg("3.12") - .arg("anyio"), @r###" + .arg("anyio"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: No virtual environment found for Python 3.12; run `uv venv` to create an environment, or pass `--system` to install into a non-virtual environment - "### + " ); } @@ -8663,7 +8663,7 @@ fn install_incompatible_python_version_interpreter_broken_in_path() -> Result<() .arg("-p").arg("3.12") .arg("anyio") // In tests, we ignore `PATH` during Python discovery so we need to add the context `bin` - .env(EnvVars::UV_TEST_PYTHON_PATH, path.as_os_str()), @r###" + .env(EnvVars::UV_TEST_PYTHON_PATH, path.as_os_str()), @" success: false exit_code: 2 ----- stdout ----- @@ -8674,7 +8674,7 @@ fn install_incompatible_python_version_interpreter_broken_in_path() -> Result<() [stderr] error: intentionally broken python executable - "### + " ); // Put the broken interpreter _after_ the other interpreters in the PATH @@ -8690,14 +8690,14 @@ fn install_incompatible_python_version_interpreter_broken_in_path() -> Result<() .arg("-p").arg("3.12") .arg("anyio") // In tests, we ignore `PATH` during Python discovery so we need to add the context `bin` - .env(EnvVars::UV_TEST_PYTHON_PATH, path.as_os_str()), @r###" + .env(EnvVars::UV_TEST_PYTHON_PATH, path.as_os_str()), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: No virtual environment found for Python 3.12; run `uv venv` to create an environment, or pass `--system` to install into a non-virtual environment - "### + " ); Ok(()) @@ -8717,7 +8717,7 @@ fn install_unsupported_environment_yml() -> Result<()> { - python>=3.12 "})?; - uv_snapshot!(context.filters(), context.pip_install().arg("-r").arg("environment.yml"), @r" + uv_snapshot!(context.filters(), context.pip_install().arg("-r").arg("environment.yml"), @" success: false exit_code: 2 ----- stdout ----- @@ -8740,7 +8740,7 @@ fn incompatible_build_constraint() -> Result<()> { uv_snapshot!(context.pip_install() .arg("requests==1.2") .arg("--build-constraint") - .arg("build_constraints.txt"), @r###" + .arg("build_constraints.txt"), @" success: false exit_code: 1 ----- stdout ----- @@ -8750,7 +8750,7 @@ fn incompatible_build_constraint() -> Result<()> { ├─▶ Failed to resolve requirements from `setup.py` build ├─▶ No solution found when resolving: `setuptools>=40.8.0` ╰─▶ Because you require setuptools>=40.8.0 and setuptools==1, we can conclude that your requirements are unsatisfiable. - "### + " ); Ok(()) @@ -8769,7 +8769,7 @@ fn incompatible_build_constraint_from_stdin() -> Result<()> { .arg("requests==1.2") .arg("--build-constraint") .arg("-") - .stdin(std::fs::File::open(constraints_txt)?), @r###" + .stdin(std::fs::File::open(constraints_txt)?), @" success: false exit_code: 1 ----- stdout ----- @@ -8779,7 +8779,7 @@ fn incompatible_build_constraint_from_stdin() -> Result<()> { ├─▶ Failed to resolve requirements from `setup.py` build ├─▶ No solution found when resolving: `setuptools>=40.8.0` ╰─▶ Because you require setuptools>=40.8.0 and setuptools==1, we can conclude that your requirements are unsatisfiable. - "### + " ); Ok(()) @@ -8796,7 +8796,7 @@ fn compatible_build_constraint() -> Result<()> { uv_snapshot!(context.pip_install() .arg("requests==1.2") .arg("--build-constraint") - .arg("build_constraints.txt"), @r" + .arg("build_constraints.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -8827,7 +8827,7 @@ build-constraint-dependencies = [ )?; uv_snapshot!(context.pip_install() - .arg("requests==1.2"), @r###" + .arg("requests==1.2"), @" success: false exit_code: 1 ----- stdout ----- @@ -8837,7 +8837,7 @@ build-constraint-dependencies = [ ├─▶ Failed to resolve requirements from `setup.py` build ├─▶ No solution found when resolving: `setuptools>=40.8.0` ╰─▶ Because you require setuptools>=40.8.0 and setuptools==1, we can conclude that your requirements are unsatisfiable. - "### + " ); Ok(()) @@ -8859,7 +8859,7 @@ build-constraint-dependencies = [ )?; uv_snapshot!(context.pip_install() - .arg("requests==1.2"), @r" + .arg("requests==1.2"), @" success: true exit_code: 0 ----- stdout ----- @@ -8895,7 +8895,7 @@ build-constraint-dependencies = [ uv_snapshot!(context.pip_install() .arg("requests==1.2") .arg("--build-constraint") - .arg("build_constraints.txt"), @r###" + .arg("build_constraints.txt"), @" success: false exit_code: 1 ----- stdout ----- @@ -8905,7 +8905,7 @@ build-constraint-dependencies = [ ├─▶ Failed to resolve requirements from `setup.py` build ├─▶ No solution found when resolving: `setuptools>=40.8.0` ╰─▶ Because you require setuptools>=40 and setuptools==1, we can conclude that your requirements are unsatisfiable. - "### + " ); // Compatible setuptools version in pyproject.toml, incompatible in build_constraints.txt. @@ -8923,7 +8923,7 @@ build-constraint-dependencies = [ uv_snapshot!(context.pip_install() .arg("requests==1.2") .arg("--build-constraint") - .arg("build_constraints.txt"), @r###" + .arg("build_constraints.txt"), @" success: false exit_code: 1 ----- stdout ----- @@ -8933,7 +8933,7 @@ build-constraint-dependencies = [ ├─▶ Failed to resolve requirements from `setup.py` build ├─▶ No solution found when resolving: `setuptools>=40.8.0` ╰─▶ Because you require setuptools==1 and setuptools>=40, we can conclude that your requirements are unsatisfiable. - "### + " ); Ok(()) @@ -8958,7 +8958,7 @@ build-constraint-dependencies = [ uv_snapshot!(context.pip_install() .arg("requests==1.2") .arg("--build-constraint") - .arg("build_constraints.txt"), @r" + .arg("build_constraints.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -9020,7 +9020,7 @@ fn install_build_isolation_package() -> Result<()> { ); // Install `hatchinling`, `hatch-vs` for iniconfig - uv_snapshot!(context.filters(), context.pip_install().arg("hatchling").arg("hatch-vcs"), @r###" + uv_snapshot!(context.filters(), context.pip_install().arg("hatchling").arg("hatch-vcs"), @" success: true exit_code: 0 ----- stdout ----- @@ -9038,13 +9038,13 @@ fn install_build_isolation_package() -> Result<()> { + setuptools-scm==8.0.4 + trove-classifiers==2024.3.3 + typing-extensions==4.10.0 - "###); + "); // Running `uv pip install` should succeed. uv_snapshot!(context.filters(), context.pip_install() .arg("--no-build-isolation-package") .arg("iniconfig") - .arg(package.path()), @r" + .arg(package.path()), @" success: true exit_code: 0 ----- stdout ----- @@ -9069,7 +9069,7 @@ fn invalid_extension() { uv_snapshot!(context.filters(), context.pip_install() .arg("ruff @ https://files.pythonhosted.org/packages/f7/69/96766da2cdb5605e6a31ef2734aff0be17901cefb385b885c2ab88896d76/ruff-0.5.6.tar.baz") - , @r###" + , @" success: false exit_code: 2 ----- stdout ----- @@ -9079,7 +9079,7 @@ fn invalid_extension() { Caused by: Expected direct URL (`https://files.pythonhosted.org/packages/f7/69/96766da2cdb5605e6a31ef2734aff0be17901cefb385b885c2ab88896d76/ruff-0.5.6.tar.baz`) to end in a supported file extension: `.whl`, `.tar.gz`, `.zip`, `.tar.bz2`, `.tar.lz`, `.tar.lzma`, `.tar.xz`, `.tar.zst`, `.tar`, `.tbz`, `.tgz`, `.tlz`, or `.txz` ruff @ https://files.pythonhosted.org/packages/f7/69/96766da2cdb5605e6a31ef2734aff0be17901cefb385b885c2ab88896d76/ruff-0.5.6.tar.baz ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - "###); + "); } /// Install a package without unsupported extension. @@ -9089,7 +9089,7 @@ fn no_extension() { uv_snapshot!(context.filters(), context.pip_install() .arg("ruff @ https://files.pythonhosted.org/packages/f7/69/96766da2cdb5605e6a31ef2734aff0be17901cefb385b885c2ab88896d76/ruff-0.5.6") - , @r###" + , @" success: false exit_code: 2 ----- stdout ----- @@ -9099,7 +9099,7 @@ fn no_extension() { Caused by: Expected direct URL (`https://files.pythonhosted.org/packages/f7/69/96766da2cdb5605e6a31ef2734aff0be17901cefb385b885c2ab88896d76/ruff-0.5.6`) to end in a supported file extension: `.whl`, `.tar.gz`, `.zip`, `.tar.bz2`, `.tar.lz`, `.tar.lzma`, `.tar.xz`, `.tar.zst`, `.tar`, `.tbz`, `.tgz`, `.tlz`, or `.txz` ruff @ https://files.pythonhosted.org/packages/f7/69/96766da2cdb5605e6a31ef2734aff0be17901cefb385b885c2ab88896d76/ruff-0.5.6 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - "###); + "); } /// Regression test for: @@ -9113,7 +9113,7 @@ fn switch_python_version() -> Result<()> { // Install `iniconfig`. uv_snapshot!(context.pip_install() .arg("-r") - .arg("requirements.txt"), @r###" + .arg("requirements.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -9123,7 +9123,7 @@ fn switch_python_version() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + iniconfig==2.0.0 - "###); + "); requirements_txt .write_str("iniconfig ; python_version == '3.12'\nanyio ; python_version < '3.12'")?; @@ -9133,7 +9133,7 @@ fn switch_python_version() -> Result<()> { .arg("-r") .arg("requirements.txt") .arg("--python-version") - .arg("3.11"), @r###" + .arg("3.11"), @" success: true exit_code: 0 ----- stdout ----- @@ -9145,7 +9145,7 @@ fn switch_python_version() -> Result<()> { + anyio==4.3.0 + idna==3.6 + sniffio==1.3.1 - "###); + "); Ok(()) } @@ -9169,7 +9169,7 @@ fn stale_egg_info() -> Result<()> { uv_snapshot!(context.filters(), context.pip_install() .arg("-e") - .arg("."), @r###" + .arg("."), @" success: true exit_code: 0 ----- stdout ----- @@ -9180,7 +9180,7 @@ fn stale_egg_info() -> Result<()> { Installed 2 packages in [TIME] + iniconfig==2.0.0 + project==0.0.0 (from file://[TEMP_DIR]/) - "### + " ); // Ensure that `.egg-info` exists. @@ -9200,7 +9200,7 @@ fn stale_egg_info() -> Result<()> { // Reinstall. Ensure that the metadata is updated. uv_snapshot!(context.filters(), context.pip_install() .arg("-e") - .arg("."), @r###" + .arg("."), @" success: true exit_code: 0 ----- stdout ----- @@ -9214,7 +9214,7 @@ fn stale_egg_info() -> Result<()> { + idna==3.6 ~ project==0.0.0 (from file://[TEMP_DIR]/) + sniffio==1.3.1 - "### + " ); Ok(()) @@ -9240,7 +9240,7 @@ fn avoid_cached_wheel() { uv_snapshot!(context.filters(), context.pip_install() .arg("--python") .arg(".venv-3.10") - .arg("multiprocess"), @r" + .arg("multiprocess"), @" success: true exit_code: 0 ----- stdout ----- @@ -9268,7 +9268,7 @@ fn avoid_cached_wheel() { uv_snapshot!(context.filters(), context.pip_install() .arg("--python") .arg(".venv-3.11") - .arg("multiprocess"), @r" + .arg("multiprocess"), @" success: true exit_code: 0 ----- stdout ----- @@ -9292,7 +9292,7 @@ fn missing_top_level() { let context = TestContext::new("3.12"); uv_snapshot!(context.filters(), context.pip_install() - .arg("suds-community==0.8.5"), @r###" + .arg("suds-community==0.8.5"), @" success: true exit_code: 0 ----- stdout ----- @@ -9302,11 +9302,11 @@ fn missing_top_level() { Prepared 1 package in [TIME] Installed 1 package in [TIME] + suds-community==0.8.5 - "### + " ); uv_snapshot!(context.filters(), context.pip_install() - .arg("suds-community==0.8.5"), @r###" + .arg("suds-community==0.8.5"), @" success: true exit_code: 0 ----- stdout ----- @@ -9317,7 +9317,7 @@ fn missing_top_level() { Uninstalled 2 packages in [TIME] Installed 1 package in [TIME] ~ suds-community==0.8.5 - "### + " ); } @@ -9326,7 +9326,7 @@ fn missing_top_level() { fn sklearn() { let context = TestContext::new("3.12"); - uv_snapshot!(context.filters(), context.pip_install().arg("sklearn"), @r###" + uv_snapshot!(context.filters(), context.pip_install().arg("sklearn"), @" success: false exit_code: 1 ----- stdout ----- @@ -9355,7 +9355,7 @@ fn sklearn() { hint: This usually indicates a problem with the package or the build environment. help: `sklearn` is often confused for `scikit-learn` Did you mean to install `scikit-learn` instead? - "### + " ); } @@ -9381,7 +9381,7 @@ fn resolve_derivation_chain() -> Result<()> { uv_snapshot!(filters, context.pip_install() .arg("-e") - .arg("."), @r###" + .arg("."), @r#" success: false exit_code: 1 ----- stdout ----- @@ -9411,7 +9411,7 @@ fn resolve_derivation_chain() -> Result<()> { hint: This usually indicates a problem with the package or the build environment. help: `wsgiref` (v0.1.2) was included because `project` (v0.1.0) depends on `wsgiref` - "### + "# ); Ok(()) @@ -9426,7 +9426,7 @@ fn respect_no_installer_metadata_env_var() { uv_snapshot!(context.pip_install() .arg("urllib3==2.2.1") .arg("--strict") - .env(EnvVars::UV_NO_INSTALLER_METADATA, "1"), @r###" + .env(EnvVars::UV_NO_INSTALLER_METADATA, "1"), @" success: true exit_code: 0 ----- stdout ----- @@ -9436,7 +9436,7 @@ fn respect_no_installer_metadata_env_var() { Prepared 1 package in [TIME] Installed 1 package in [TIME] + urllib3==2.2.1 - "### + " ); context.assert_command("import urllib3").success(); @@ -9492,7 +9492,7 @@ fn test_dynamic_version_sdist_wrong_version() -> Result<()> { uv_snapshot!(context.filters(), context .pip_install() - .arg(source_dist.path()), @r###" + .arg(source_dist.path()), @" success: false exit_code: 1 ----- stdout ----- @@ -9501,7 +9501,7 @@ fn test_dynamic_version_sdist_wrong_version() -> Result<()> { Resolved 1 package in [TIME] × Failed to build `foo @ file://[TEMP_DIR]/foo-1.2.3.tar.gz` ╰─▶ Package metadata version `10.11.12` does not match given version `1.2.3` - "### + " ); Ok(()) @@ -9516,7 +9516,7 @@ fn build_tag() { uv_snapshot!(context.filters(), context.pip_install() .arg("build-tag") .arg("--find-links") - .arg(context.workspace_root.join("test/links/")), @r###" + .arg(context.workspace_root.join("test/links/")), @" success: true exit_code: 0 ----- stdout ----- @@ -9526,21 +9526,21 @@ fn build_tag() { Prepared 1 package in [TIME] Installed 1 package in [TIME] + build-tag==1.0.0 - "### + " ); // Ensure that we choose the highest build tag (5). uv_snapshot!(context.python_command() .arg("-c") .arg("import build_tag; build_tag.main()") - .current_dir(&context.temp_dir), @r###" + .current_dir(&context.temp_dir), @" success: true exit_code: 0 ----- stdout ----- 5 ----- stderr ----- - "###); + "); } #[test] @@ -9550,7 +9550,7 @@ fn missing_git_prefix() -> Result<()> { requirements_txt.touch()?; uv_snapshot!(context.pip_install() - .arg("workspace-in-root-test @ https://github.com/astral-sh/workspace-in-root-test"), @r###" + .arg("workspace-in-root-test @ https://github.com/astral-sh/workspace-in-root-test"), @" success: false exit_code: 2 ----- stdout ----- @@ -9560,7 +9560,7 @@ fn missing_git_prefix() -> Result<()> { Caused by: Direct URL (`https://github.com/astral-sh/workspace-in-root-test`) references a Git repository, but is missing the `git+` prefix (e.g., `git+https://github.com/astral-sh/workspace-in-root-test`) workspace-in-root-test @ https://github.com/astral-sh/workspace-in-root-test ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - "### + " ); Ok(()) @@ -9574,7 +9574,7 @@ fn missing_subdirectory_git() -> Result<()> { requirements_txt.touch()?; uv_snapshot!(context.pip_install() - .arg("workspace-in-root-test @ git+https://github.com/astral-sh/workspace-in-root-test#subdirectory=missing"), @r###" + .arg("workspace-in-root-test @ git+https://github.com/astral-sh/workspace-in-root-test#subdirectory=missing"), @" success: false exit_code: 1 ----- stdout ----- @@ -9582,7 +9582,7 @@ fn missing_subdirectory_git() -> Result<()> { ----- stderr ----- × Failed to download and build `workspace-in-root-test @ git+https://github.com/astral-sh/workspace-in-root-test#subdirectory=missing` ╰─▶ The source distribution `git+https://github.com/astral-sh/workspace-in-root-test#subdirectory=missing` has no subdirectory `missing` - "### + " ); Ok(()) @@ -9595,7 +9595,7 @@ fn missing_subdirectory_url() -> Result<()> { requirements_txt.touch()?; uv_snapshot!(context.pip_install() - .arg("source-distribution @ https://files.pythonhosted.org/packages/1f/e5/5b016c945d745f8b108e759d428341488a6aee8f51f07c6c4e33498bb91f/source_distribution-0.0.3.tar.gz#subdirectory=missing"), @r###" + .arg("source-distribution @ https://files.pythonhosted.org/packages/1f/e5/5b016c945d745f8b108e759d428341488a6aee8f51f07c6c4e33498bb91f/source_distribution-0.0.3.tar.gz#subdirectory=missing"), @" success: false exit_code: 1 ----- stdout ----- @@ -9603,7 +9603,7 @@ fn missing_subdirectory_url() -> Result<()> { ----- stderr ----- × Failed to download and build `source-distribution @ https://files.pythonhosted.org/packages/1f/e5/5b016c945d745f8b108e759d428341488a6aee8f51f07c6c4e33498bb91f/source_distribution-0.0.3.tar.gz#subdirectory=missing` ╰─▶ The source distribution `https://files.pythonhosted.org/packages/1f/e5/5b016c945d745f8b108e759d428341488a6aee8f51f07c6c4e33498bb91f/source_distribution-0.0.3.tar.gz#subdirectory=missing` has no subdirectory `missing` - "### + " ); Ok(()) @@ -9619,7 +9619,7 @@ fn bad_crc32() -> Result<()> { uv_snapshot!(context.pip_install() .arg("--python-platform").arg("linux") - .arg("osqp @ https://files.pythonhosted.org/packages/00/04/5959347582ab970e9b922f27585d34f7c794ed01125dac26fb4e7dd80205/osqp-1.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl"), @r" + .arg("osqp @ https://files.pythonhosted.org/packages/00/04/5959347582ab970e9b922f27585d34f7c794ed01125dac26fb4e7dd80205/osqp-1.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl"), @" success: false exit_code: 1 ----- stdout ----- @@ -9657,7 +9657,7 @@ fn static_metadata_pyproject_toml() -> Result<()> { uv_snapshot!(context.filters(), context.pip_install() .arg("-r") - .arg("pyproject.toml"), @r###" + .arg("pyproject.toml"), @" success: true exit_code: 0 ----- stdout ----- @@ -9668,7 +9668,7 @@ fn static_metadata_pyproject_toml() -> Result<()> { Installed 2 packages in [TIME] + anyio==3.7.0 + typing-extensions==4.10.0 - "### + " ); Ok(()) @@ -9696,7 +9696,7 @@ fn static_metadata_source_tree() -> Result<()> { uv_snapshot!(context.filters(), context.pip_install() .arg("-e") - .arg("."), @r###" + .arg("."), @" success: true exit_code: 0 ----- stdout ----- @@ -9708,7 +9708,7 @@ fn static_metadata_source_tree() -> Result<()> { + anyio==3.7.0 + example==0.0.0 (from file://[TEMP_DIR]/) + typing-extensions==4.10.0 - "### + " ); Ok(()) @@ -9737,7 +9737,7 @@ fn static_metadata_already_installed() -> Result<()> { uv_snapshot!(context.filters(), context.pip_install() .arg("-r") - .arg("pyproject.toml"), @r###" + .arg("pyproject.toml"), @" success: true exit_code: 0 ----- stdout ----- @@ -9748,12 +9748,12 @@ fn static_metadata_already_installed() -> Result<()> { Installed 2 packages in [TIME] + anyio==3.7.0 + typing-extensions==4.10.0 - "### + " ); uv_snapshot!(context.filters(), context.pip_install() .arg("-e") - .arg("."), @r###" + .arg("."), @" success: true exit_code: 0 ----- stdout ----- @@ -9763,7 +9763,7 @@ fn static_metadata_already_installed() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + example==0.0.0 (from file://[TEMP_DIR]/) - "### + " ); Ok(()) @@ -9784,7 +9784,7 @@ fn cyclic_build_dependency() { .arg("--index-strategy") .arg("unsafe-best-match") .arg("--no-binary") - .arg("circular-one"), @r###" + .arg("circular-one"), @" success: false exit_code: 1 ----- stdout ----- @@ -9794,7 +9794,7 @@ fn cyclic_build_dependency() { × Failed to download and build `circular-one==0.2.0` ├─▶ Failed to install requirements from `build-system.requires` ╰─▶ Cyclic build dependency detected for `circular-one` - "### + " ); // Installing without `--no-binary circular-one` should succeed, since we can use the wheel. @@ -9803,7 +9803,7 @@ fn cyclic_build_dependency() { .arg("--extra-index-url") .arg("https://test.pypi.org/simple") .arg("--index-strategy") - .arg("unsafe-best-match"), @r###" + .arg("unsafe-best-match"), @" success: true exit_code: 0 ----- stdout ----- @@ -9813,7 +9813,7 @@ fn cyclic_build_dependency() { Prepared 1 package in [TIME] Installed 1 package in [TIME] + circular-one==0.2.0 - "### + " ); } @@ -9829,7 +9829,7 @@ fn direct_url_json_git_default() -> Result<()> { uv_snapshot!(context.pip_install() .arg("-r") .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -9839,7 +9839,7 @@ fn direct_url_json_git_default() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + uv-public-pypackage==0.1.0 (from git+https://github.com/astral-test/uv-public-pypackage@b270df1a2fb5d012294e9aaf05e7e0bab1e6a389) - "### + " ); let direct_url = context.venv.child(if cfg!(windows) { @@ -9850,7 +9850,7 @@ fn direct_url_json_git_default() -> Result<()> { direct_url.assert(predicates::path::is_file()); let direct_url_content = fs_err::read_to_string(direct_url.path())?; - insta::assert_snapshot!(direct_url_content, @r###"{"url":"https://github.com/astral-test/uv-public-pypackage","vcs_info":{"vcs":"git","commit_id":"b270df1a2fb5d012294e9aaf05e7e0bab1e6a389"}}"###); + insta::assert_snapshot!(direct_url_content, @r#"{"url":"https://github.com/astral-test/uv-public-pypackage","vcs_info":{"vcs":"git","commit_id":"b270df1a2fb5d012294e9aaf05e7e0bab1e6a389"}}"#); Ok(()) } @@ -9867,7 +9867,7 @@ fn direct_url_json_git_tag() -> Result<()> { uv_snapshot!(context.pip_install() .arg("-r") .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -9877,7 +9877,7 @@ fn direct_url_json_git_tag() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + uv-public-pypackage==0.1.0 (from git+https://github.com/astral-test/uv-public-pypackage@0dacfd662c64cb4ceb16e6cf65a157a8b715b979) - "### + " ); let direct_url = context.venv.child(if cfg!(windows) { @@ -9888,7 +9888,7 @@ fn direct_url_json_git_tag() -> Result<()> { direct_url.assert(predicates::path::is_file()); let direct_url_content = fs_err::read_to_string(direct_url.path())?; - insta::assert_snapshot!(direct_url_content, @r###"{"url":"https://github.com/astral-test/uv-public-pypackage","vcs_info":{"vcs":"git","commit_id":"0dacfd662c64cb4ceb16e6cf65a157a8b715b979","requested_revision":"0.0.1"}}"###); + insta::assert_snapshot!(direct_url_content, @r#"{"url":"https://github.com/astral-test/uv-public-pypackage","vcs_info":{"vcs":"git","commit_id":"0dacfd662c64cb4ceb16e6cf65a157a8b715b979","requested_revision":"0.0.1"}}"#); Ok(()) } @@ -9904,7 +9904,7 @@ fn direct_url_json_direct_url() -> Result<()> { uv_snapshot!(context.pip_install() .arg("-r") .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -9914,7 +9914,7 @@ fn direct_url_json_direct_url() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + source-distribution==0.0.3 (from https://files.pythonhosted.org/packages/1f/e5/5b016c945d745f8b108e759d428341488a6aee8f51f07c6c4e33498bb91f/source_distribution-0.0.3.tar.gz) - "### + " ); let direct_url = context.venv.child(if cfg!(windows) { @@ -9925,7 +9925,7 @@ fn direct_url_json_direct_url() -> Result<()> { direct_url.assert(predicates::path::is_file()); let direct_url_content = fs_err::read_to_string(direct_url.path())?; - insta::assert_snapshot!(direct_url_content, @r###"{"url":"https://files.pythonhosted.org/packages/1f/e5/5b016c945d745f8b108e759d428341488a6aee8f51f07c6c4e33498bb91f/source_distribution-0.0.3.tar.gz","archive_info":{}}"###); + insta::assert_snapshot!(direct_url_content, @r#"{"url":"https://files.pythonhosted.org/packages/1f/e5/5b016c945d745f8b108e759d428341488a6aee8f51f07c6c4e33498bb91f/source_distribution-0.0.3.tar.gz","archive_info":{}}"#); Ok(()) } @@ -9960,7 +9960,7 @@ fn dependency_group() -> Result<()> { // 'bar' using path sugar context = new_context()?; uv_snapshot!(context.filters(), context.pip_install() - .arg("--group").arg("bar"), @r" + .arg("--group").arg("bar"), @" success: true exit_code: 0 ----- stdout ----- @@ -9977,7 +9977,7 @@ fn dependency_group() -> Result<()> { context = new_context()?; uv_snapshot!(context.filters(), context.pip_install() .arg("-r").arg("pyproject.toml") - .arg("--group").arg("bar"), @r" + .arg("--group").arg("bar"), @" success: true exit_code: 0 ----- stdout ----- @@ -9993,7 +9993,7 @@ fn dependency_group() -> Result<()> { // 'bar' with an explicit path context = new_context()?; uv_snapshot!(context.filters(), context.pip_install() - .arg("--group").arg("pyproject.toml:bar"), @r" + .arg("--group").arg("pyproject.toml:bar"), @" success: true exit_code: 0 ----- stdout ----- @@ -10010,7 +10010,7 @@ fn dependency_group() -> Result<()> { context = new_context()?; uv_snapshot!(context.filters(), context.pip_install() .arg("-r").arg("pyproject.toml") - .arg("--group").arg("pyproject.toml:bar"), @r" + .arg("--group").arg("pyproject.toml:bar"), @" success: true exit_code: 0 ----- stdout ----- @@ -10026,7 +10026,7 @@ fn dependency_group() -> Result<()> { // 'bar' using path sugar context = new_context()?; uv_snapshot!(context.filters(), context.pip_install() - .arg("--group").arg("foo"), @r" + .arg("--group").arg("foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -10043,7 +10043,7 @@ fn dependency_group() -> Result<()> { context = new_context()?; uv_snapshot!(context.filters(), context.pip_install() .arg("--group").arg("foo") - .arg("--group").arg("bar"), @r" + .arg("--group").arg("bar"), @" success: true exit_code: 0 ----- stdout ----- @@ -10061,7 +10061,7 @@ fn dependency_group() -> Result<()> { uv_snapshot!(context.filters(), context.pip_install() .arg("-r").arg("pyproject.toml") .arg("--group").arg("foo") - .arg("--group").arg("bar"), @r" + .arg("--group").arg("bar"), @" success: true exit_code: 0 ----- stdout ----- @@ -10100,7 +10100,7 @@ fn recursive_dependency_group() -> Result<()> { )?; uv_snapshot!(context.filters(), context.pip_install() - .arg("--group").arg("test"), @r" + .arg("--group").arg("test"), @" success: false exit_code: 2 ----- stdout ----- @@ -10132,7 +10132,7 @@ fn recursive_dependency_group() -> Result<()> { )?; uv_snapshot!(context.filters(), context.pip_install() - .arg("--group").arg("test"), @r" + .arg("--group").arg("test"), @" success: false exit_code: 2 ----- stdout ----- @@ -10168,7 +10168,7 @@ fn virtual_dependency_group() -> Result<()> { // 'bar' using path sugar let context = new_context()?; uv_snapshot!(context.filters(), context.pip_install() - .arg("--group").arg("bar"), @r" + .arg("--group").arg("bar"), @" success: true exit_code: 0 ----- stdout ----- @@ -10226,7 +10226,7 @@ fn many_pyproject_group() -> Result<()> { // 'foo' from main toml context = new_context()?; uv_snapshot!(context.filters(), context.pip_install() - .arg("--group").arg("pyproject.toml:foo"), @r" + .arg("--group").arg("pyproject.toml:foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -10240,7 +10240,7 @@ fn many_pyproject_group() -> Result<()> { // 'foo' from subtoml uv_snapshot!(context.filters(), context.pip_install() - .arg("--group").arg("subdir/pyproject.toml:foo"), @r" + .arg("--group").arg("subdir/pyproject.toml:foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -10257,7 +10257,7 @@ fn many_pyproject_group() -> Result<()> { context = new_context()?; uv_snapshot!(context.filters(), context.pip_install() .arg("--group").arg("pyproject.toml:foo") - .arg("--group").arg("subdir/pyproject.toml:foo"), @r" + .arg("--group").arg("subdir/pyproject.toml:foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -10302,7 +10302,7 @@ fn other_sources_group() -> Result<()> { context = new_context()?; uv_snapshot!(context.filters(), context.pip_install() .arg(".") - .arg("--group").arg("foo"), @r" + .arg("--group").arg("foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -10321,7 +10321,7 @@ fn other_sources_group() -> Result<()> { context = new_context()?; uv_snapshot!(context.filters(), context.pip_install() .arg("-e").arg(context.workspace_root.join("test/packages/poetry_editable")) - .arg("--group").arg("foo"), @r" + .arg("--group").arg("foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -10385,7 +10385,7 @@ fn suspicious_group() -> Result<()> { context = new_context()?; uv_snapshot!(context.filters(), context.pip_install() .arg("--group").arg("foo") - .arg("--group").arg("subdir/pyproject.toml:foo"), @r" + .arg("--group").arg("subdir/pyproject.toml:foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -10404,7 +10404,7 @@ fn suspicious_group() -> Result<()> { context = new_context()?; uv_snapshot!(context.filters(), context.pip_install() .arg("--group").arg("foo") - .arg("--group").arg("subdir/pyproject.toml:bar"), @r" + .arg("--group").arg("subdir/pyproject.toml:bar"), @" success: true exit_code: 0 ----- stdout ----- @@ -10424,7 +10424,7 @@ fn suspicious_group() -> Result<()> { context = new_context()?; uv_snapshot!(context.filters(), context.pip_install() .arg("-r").arg("subdir/pyproject.toml") - .arg("--group").arg("foo"), @r" + .arg("--group").arg("foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -10442,7 +10442,7 @@ fn suspicious_group() -> Result<()> { context = new_context()?; uv_snapshot!(context.filters(), context.pip_install() .arg("-r").arg("pyproject.toml") - .arg("--group").arg("subdir/pyproject.toml:foo"), @r" + .arg("--group").arg("subdir/pyproject.toml:foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -10513,7 +10513,7 @@ fn invalid_group() -> Result<()> { // Hey this path needs to end with "pyproject.toml"! uv_snapshot!(context.filters(), context.pip_install() - .arg("--group").arg("./:foo"), @r" + .arg("--group").arg("./:foo"), @" success: false exit_code: 2 ----- stdout ----- @@ -10526,7 +10526,7 @@ fn invalid_group() -> Result<()> { // Hey this path needs to end with "pyproject.toml"! uv_snapshot!(context.filters(), context.pip_install() - .arg("--group").arg("subdir/:foo"), @r" + .arg("--group").arg("subdir/:foo"), @" success: false exit_code: 2 ----- stdout ----- @@ -10542,7 +10542,7 @@ fn invalid_group() -> Result<()> { // we should error! uv_snapshot!(context.filters(), context.pip_install() .arg("--group").arg("bar") - .arg("--group").arg("subdir/pyproject.toml:bar"), @r" + .arg("--group").arg("subdir/pyproject.toml:bar"), @" success: false exit_code: 2 ----- stdout ----- @@ -10597,7 +10597,7 @@ fn project_and_group() -> Result<()> { context = new_context()?; uv_snapshot!(context.filters(), context.pip_install() .arg("--project").arg("subdir") - .arg("--group").arg("foo"), @r" + .arg("--group").arg("foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -10616,7 +10616,7 @@ fn project_and_group() -> Result<()> { uv_snapshot!(context.filters(), context.pip_install() .arg("--project").arg("subdir") .arg("--group").arg("subdir/pyproject.toml:bar") - .arg("--group").arg("foo"), @r" + .arg("--group").arg("foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -10636,7 +10636,7 @@ fn project_and_group() -> Result<()> { uv_snapshot!(context.filters(), context.pip_install() .arg("--project").arg("subdir") .arg("--group").arg("bar") - .arg("--group").arg("pyproject.toml:foo"), @r" + .arg("--group").arg("pyproject.toml:foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -10656,7 +10656,7 @@ fn project_and_group() -> Result<()> { uv_snapshot!(context.filters(), context.pip_install() .arg("--project").arg("subdir") .arg("--group").arg("subdir/pyproject.toml:bar") - .arg("--group").arg("pyproject.toml:foo"), @r" + .arg("--group").arg("pyproject.toml:foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -10718,7 +10718,7 @@ fn directory_and_group() -> Result<()> { uv_snapshot!(context.filters(), context.pip_install() .arg("--directory").arg("subdir") .arg("--group").arg("bar") - .arg("--group").arg("../pyproject.toml:foo"), @r" + .arg("--group").arg("../pyproject.toml:foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -10739,7 +10739,7 @@ fn directory_and_group() -> Result<()> { uv_snapshot!(context.filters(), context.pip_install() .arg("--directory").arg("subdir") .arg("--group").arg("pyproject.toml:bar") - .arg("--group").arg("../pyproject.toml:foo"), @r" + .arg("--group").arg("../pyproject.toml:foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -10761,7 +10761,7 @@ fn directory_and_group() -> Result<()> { .arg("--directory").arg("subdir") .arg("--project").arg("../") .arg("--group").arg("pyproject.toml:bar") - .arg("--group").arg("foo"), @r" + .arg("--group").arg("foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -10831,7 +10831,7 @@ fn no_sources_workspace_discovery() -> Result<()> { .touch()?; uv_snapshot!(context.filters(), context.pip_install() - .arg("."), @r###" + .arg("."), @" success: true exit_code: 0 ----- stdout ----- @@ -10842,13 +10842,13 @@ fn no_sources_workspace_discovery() -> Result<()> { Installed 2 packages in [TIME] + anyio==2.0.0 (from file://[TEMP_DIR]/anyio) + foo==1.0.0 (from file://[TEMP_DIR]/) - "### + " ); uv_snapshot!(context.filters(), context.pip_install() .arg("--upgrade") .arg("--no-sources") - .arg("."), @r###" + .arg("."), @" success: true exit_code: 0 ----- stdout ----- @@ -10863,13 +10863,13 @@ fn no_sources_workspace_discovery() -> Result<()> { ~ foo==1.0.0 (from file://[TEMP_DIR]/) + idna==3.6 + sniffio==1.3.1 - "### + " ); // Reverse direction: Check that we switch back to the workspace package with `--upgrade`. uv_snapshot!(context.filters(), context.pip_install() .arg("--upgrade") - .arg("."), @r###" + .arg("."), @" success: true exit_code: 0 ----- stdout ----- @@ -10882,14 +10882,14 @@ fn no_sources_workspace_discovery() -> Result<()> { - anyio==4.3.0 + anyio==2.0.0 (from file://[TEMP_DIR]/anyio) ~ foo==1.0.0 (from file://[TEMP_DIR]/) - "### + " ); // Test with UV_NO_SOURCES=true environment variable (should behave same as flag) uv_snapshot!(context.filters(), context.pip_install() .arg("--upgrade") .arg(".") - .env(EnvVars::UV_NO_SOURCES, "true"), @r###" + .env(EnvVars::UV_NO_SOURCES, "true"), @" success: true exit_code: 0 ----- stdout ----- @@ -10902,14 +10902,14 @@ fn no_sources_workspace_discovery() -> Result<()> { - anyio==2.0.0 (from file://[TEMP_DIR]/anyio) + anyio==4.3.0 ~ foo==1.0.0 (from file://[TEMP_DIR]/) - "### + " ); // Test UV_NO_SOURCES=false doesn't activate no-sources uv_snapshot!(context.filters(), context.pip_install() .arg("--upgrade") .arg(".") - .env(EnvVars::UV_NO_SOURCES, "false"), @r###" + .env(EnvVars::UV_NO_SOURCES, "false"), @" success: true exit_code: 0 ----- stdout ----- @@ -10922,7 +10922,7 @@ fn no_sources_workspace_discovery() -> Result<()> { - anyio==4.3.0 + anyio==2.0.0 (from file://[TEMP_DIR]/anyio) ~ foo==1.0.0 (from file://[TEMP_DIR]/) - "### + " ); // Test that CLI flag overrides env var @@ -10930,7 +10930,7 @@ fn no_sources_workspace_discovery() -> Result<()> { .arg("--upgrade") .arg("--no-sources") .arg(".") - .env(EnvVars::UV_NO_SOURCES, "False"), @r" + .env(EnvVars::UV_NO_SOURCES, "False"), @" success: true exit_code: 0 ----- stdout ----- @@ -10953,7 +10953,7 @@ fn no_sources_workspace_discovery() -> Result<()> { fn unsupported_git_scheme() { let context = TestContext::new("3.12"); uv_snapshot!(context.filters(), context.pip_install() - .arg("git+fantasy://foo"), @r###" + .arg("git+fantasy://foo"), @" success: false exit_code: 2 ----- stdout ----- @@ -10963,7 +10963,7 @@ fn unsupported_git_scheme() { Caused by: Unsupported Git URL scheme `fantasy:` in `fantasy://foo` (expected one of `https:`, `ssh:`, or `file:`) git+fantasy://foo ^^^^^^^^^^^^^^^^^ - "### + " ); } @@ -10998,7 +10998,7 @@ fn change_layout_src() -> Result<()> { .touch()?; // Installing should build the package. - uv_snapshot!(context.filters(), context.pip_install().arg("-r").arg("requirements.txt"), @r###" + uv_snapshot!(context.filters(), context.pip_install().arg("-r").arg("requirements.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -11009,18 +11009,18 @@ fn change_layout_src() -> Result<()> { Installed 2 packages in [TIME] + iniconfig==2.0.0 + project==0.1.0 (from file://[TEMP_DIR]/) - "### + " ); // Reinstalling should have no effect. - uv_snapshot!(context.filters(), context.pip_install().arg("-r").arg("requirements.txt"), @r###" + uv_snapshot!(context.filters(), context.pip_install().arg("-r").arg("requirements.txt"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Audited 1 package in [TIME] - "### + " ); // Replace the `src` layout with a flat layout. @@ -11033,7 +11033,7 @@ fn change_layout_src() -> Result<()> { .touch()?; // Installing should rebuild the package. - uv_snapshot!(context.filters(), context.pip_install().arg("-r").arg("requirements.txt"), @r###" + uv_snapshot!(context.filters(), context.pip_install().arg("-r").arg("requirements.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -11044,18 +11044,18 @@ fn change_layout_src() -> Result<()> { Uninstalled 1 package in [TIME] Installed 1 package in [TIME] ~ project==0.1.0 (from file://[TEMP_DIR]/) - "### + " ); // Reinstalling should have no effect. - uv_snapshot!(context.filters(), context.pip_install().arg("-r").arg("requirements.txt"), @r###" + uv_snapshot!(context.filters(), context.pip_install().arg("-r").arg("requirements.txt"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Audited 1 package in [TIME] - "### + " ); Ok(()) @@ -11095,7 +11095,7 @@ fn change_layout_custom_directory() -> Result<()> { .touch()?; // Installing should build the package. - uv_snapshot!(context.filters(), context.pip_install().arg("-r").arg("requirements.txt"), @r###" + uv_snapshot!(context.filters(), context.pip_install().arg("-r").arg("requirements.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -11106,11 +11106,11 @@ fn change_layout_custom_directory() -> Result<()> { Installed 2 packages in [TIME] + iniconfig==2.0.0 + project==0.1.0 (from file://[TEMP_DIR]/) - "### + " ); // Reinstalling should have no effect. - uv_snapshot!(context.filters(), context.pip_install().arg("-r").arg("requirements.txt"), @r" + uv_snapshot!(context.filters(), context.pip_install().arg("-r").arg("requirements.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -11124,7 +11124,7 @@ fn change_layout_custom_directory() -> Result<()> { fs_err::create_dir(context.temp_dir.child("build"))?; // Installing should rebuild the package. - uv_snapshot!(context.filters(), context.pip_install().arg("-r").arg("requirements.txt"), @r###" + uv_snapshot!(context.filters(), context.pip_install().arg("-r").arg("requirements.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -11135,11 +11135,11 @@ fn change_layout_custom_directory() -> Result<()> { Uninstalled 1 package in [TIME] Installed 1 package in [TIME] ~ project==0.1.0 (from file://[TEMP_DIR]/) - "### + " ); // Reinstalling should have no effect. - uv_snapshot!(context.filters(), context.pip_install().arg("-r").arg("requirements.txt"), @r" + uv_snapshot!(context.filters(), context.pip_install().arg("-r").arg("requirements.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -11153,7 +11153,7 @@ fn change_layout_custom_directory() -> Result<()> { fs_err::remove_dir(context.temp_dir.child("build"))?; // Installing should rebuild the package. - uv_snapshot!(context.filters(), context.pip_install().arg("-r").arg("requirements.txt"), @r###" + uv_snapshot!(context.filters(), context.pip_install().arg("-r").arg("requirements.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -11164,11 +11164,11 @@ fn change_layout_custom_directory() -> Result<()> { Uninstalled 1 package in [TIME] Installed 1 package in [TIME] ~ project==0.1.0 (from file://[TEMP_DIR]/) - "### + " ); // Reinstalling should have no effect. - uv_snapshot!(context.filters(), context.pip_install().arg("-r").arg("requirements.txt"), @r" + uv_snapshot!(context.filters(), context.pip_install().arg("-r").arg("requirements.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -11206,7 +11206,7 @@ fn pep_751_install_registry_wheel() -> Result<()> { uv_snapshot!(context.filters(), context.pip_install() .arg("--preview") .arg("-r") - .arg("pylock.toml"), @r" + .arg("pylock.toml"), @" success: true exit_code: 0 ----- stdout ----- @@ -11221,7 +11221,7 @@ fn pep_751_install_registry_wheel() -> Result<()> { uv_snapshot!(context.filters(), context.pip_install() .arg("--preview") .arg("-r") - .arg("pylock.toml"), @r" + .arg("pylock.toml"), @" success: true exit_code: 0 ----- stdout ----- @@ -11259,7 +11259,7 @@ fn pep_751_install_registry_sdist() -> Result<()> { uv_snapshot!(context.filters(), context.pip_install() .arg("--preview") .arg("-r") - .arg("pylock.toml"), @r" + .arg("pylock.toml"), @" success: true exit_code: 0 ----- stdout ----- @@ -11274,7 +11274,7 @@ fn pep_751_install_registry_sdist() -> Result<()> { uv_snapshot!(context.filters(), context.pip_install() .arg("--preview") .arg("-r") - .arg("pylock.toml"), @r" + .arg("pylock.toml"), @" success: true exit_code: 0 ----- stdout ----- @@ -11337,7 +11337,7 @@ fn pep_751_install_directory() -> Result<()> { uv_snapshot!(context.filters(), context.pip_install() .arg("--preview") .arg("-r") - .arg("pylock.toml"), @r" + .arg("pylock.toml"), @" success: true exit_code: 0 ----- stdout ----- @@ -11355,7 +11355,7 @@ fn pep_751_install_directory() -> Result<()> { uv_snapshot!(context.filters(), context.pip_install() .arg("--preview") .arg("-r") - .arg("pylock.toml"), @r" + .arg("pylock.toml"), @" success: true exit_code: 0 ----- stdout ----- @@ -11394,7 +11394,7 @@ fn pep_751_install_git() -> Result<()> { uv_snapshot!(context.filters(), context.pip_install() .arg("--preview") .arg("-r") - .arg("pylock.toml"), @r" + .arg("pylock.toml"), @" success: true exit_code: 0 ----- stdout ----- @@ -11409,7 +11409,7 @@ fn pep_751_install_git() -> Result<()> { uv_snapshot!(context.filters(), context.pip_install() .arg("--preview") .arg("-r") - .arg("pylock.toml"), @r" + .arg("pylock.toml"), @" success: true exit_code: 0 ----- stdout ----- @@ -11447,7 +11447,7 @@ fn pep_751_install_url_wheel() -> Result<()> { uv_snapshot!(context.filters(), context.pip_install() .arg("--preview") .arg("-r") - .arg("pylock.toml"), @r" + .arg("pylock.toml"), @" success: true exit_code: 0 ----- stdout ----- @@ -11464,7 +11464,7 @@ fn pep_751_install_url_wheel() -> Result<()> { uv_snapshot!(context.filters(), context.pip_install() .arg("--preview") .arg("-r") - .arg("pylock.toml"), @r" + .arg("pylock.toml"), @" success: true exit_code: 0 ----- stdout ----- @@ -11502,7 +11502,7 @@ fn pep_751_install_url_sdist() -> Result<()> { uv_snapshot!(context.filters(), context.pip_install() .arg("--preview") .arg("-r") - .arg("pylock.toml"), @r" + .arg("pylock.toml"), @" success: true exit_code: 0 ----- stdout ----- @@ -11519,7 +11519,7 @@ fn pep_751_install_url_sdist() -> Result<()> { uv_snapshot!(context.filters(), context.pip_install() .arg("--preview") .arg("-r") - .arg("pylock.toml"), @r" + .arg("pylock.toml"), @" success: true exit_code: 0 ----- stdout ----- @@ -11570,7 +11570,7 @@ fn pep_751_install_path_wheel() -> Result<()> { filters => context.filters(), }, { insta::assert_snapshot!( - lock, @r##" + lock, @r#" # This file was autogenerated by uv via the following command: # uv export --cache-dir [CACHE_DIR] -o pylock.toml lock-version = "1.0" @@ -11581,14 +11581,14 @@ fn pep_751_install_path_wheel() -> Result<()> { name = "iniconfig" version = "2.0.0" archive = { path = "iniconfig-2.0.0-py3-none-any.whl", hashes = { sha256 = "b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374" } } - "## + "# ); }); uv_snapshot!(context.filters(), context.pip_install() .arg("--preview") .arg("-r") - .arg("pylock.toml"), @r" + .arg("pylock.toml"), @" success: true exit_code: 0 ----- stdout ----- @@ -11602,7 +11602,7 @@ fn pep_751_install_path_wheel() -> Result<()> { uv_snapshot!(context.filters(), context.pip_install() .arg("--preview") .arg("-r") - .arg("pylock.toml"), @r" + .arg("pylock.toml"), @" success: true exit_code: 0 ----- stdout ----- @@ -11650,7 +11650,7 @@ fn pep_751_install_path_sdist() -> Result<()> { uv_snapshot!(context.filters(), context.pip_install() .arg("--preview") .arg("-r") - .arg("pylock.toml"), @r" + .arg("pylock.toml"), @" success: true exit_code: 0 ----- stdout ----- @@ -11665,7 +11665,7 @@ fn pep_751_install_path_sdist() -> Result<()> { uv_snapshot!(context.filters(), context.pip_install() .arg("--preview") .arg("-r") - .arg("pylock.toml"), @r" + .arg("pylock.toml"), @" success: true exit_code: 0 ----- stdout ----- @@ -11706,7 +11706,7 @@ fn pep_751_hash_mismatch() -> Result<()> { uv_snapshot!(context.filters(), context.pip_install() .arg("--preview") .arg("-r") - .arg("pylock.toml"), @r" + .arg("pylock.toml"), @" success: false exit_code: 1 ----- stdout ----- @@ -11763,7 +11763,7 @@ fn pep_751_mix() -> Result<()> { .arg("-r") .arg("pylock.toml") .arg("-r") - .arg("pylock.dev.toml"), @r" + .arg("pylock.dev.toml"), @" success: false exit_code: 2 ----- stdout ----- @@ -11778,7 +11778,7 @@ fn pep_751_mix() -> Result<()> { .arg("-r") .arg("pylock.toml") .arg("-r") - .arg("requirements.txt"), @r" + .arg("requirements.txt"), @" success: false exit_code: 2 ----- stdout ----- @@ -11793,7 +11793,7 @@ fn pep_751_mix() -> Result<()> { .arg("-r") .arg("pylock.toml") .arg("-c") - .arg("constraints.txt"), @r" + .arg("constraints.txt"), @" success: false exit_code: 2 ----- stdout ----- @@ -11830,7 +11830,7 @@ fn pep_751_multiple_sources() -> Result<()> { uv_snapshot!(context.filters(), context.pip_install() .arg("--preview") .arg("-r") - .arg("pylock.toml"), @r" + .arg("pylock.toml"), @" success: false exit_code: 2 ----- stdout ----- @@ -11954,7 +11954,7 @@ requires_python = "==3.13.*" uv_snapshot!(context.filters(), context.pip_install() .arg("--preview") .arg("-r") - .arg("pylock.toml"), @r" + .arg("pylock.toml"), @" success: true exit_code: 0 ----- stdout ----- @@ -11972,7 +11972,7 @@ requires_python = "==3.13.*" .arg("-r") .arg("pylock.toml") .arg("--extra") - .arg("async"), @r" + .arg("async"), @" success: true exit_code: 0 ----- stdout ----- @@ -11992,7 +11992,7 @@ requires_python = "==3.13.*" .arg("-r") .arg("pylock.toml") .arg("--group") - .arg("test"), @r" + .arg("test"), @" success: true exit_code: 0 ----- stdout ----- @@ -12009,7 +12009,7 @@ requires_python = "==3.13.*" .arg("--preview") .arg("-r") .arg("pylock.toml") - .arg("--all-extras"), @r" + .arg("--all-extras"), @" success: true exit_code: 0 ----- stdout ----- @@ -12027,7 +12027,7 @@ requires_python = "==3.13.*" .arg("-r") .arg("pylock.toml") .arg("--group") - .arg("pylock.toml:test"), @r" + .arg("pylock.toml:test"), @" success: false exit_code: 2 ----- stdout ----- @@ -12074,7 +12074,7 @@ fn pep_751_requires_python() -> Result<()> { uv_snapshot!(context.filters(), context.pip_install() .arg("--preview") .arg("-r") - .arg("pylock.toml"), @r" + .arg("pylock.toml"), @" success: false exit_code: 2 ----- stdout ----- @@ -12108,7 +12108,7 @@ async fn bogus_redirect() -> Result<()> { .arg("--default-index") .arg(redirect_server.uri()) .arg("sniffio"), - @r" + @" success: false exit_code: 2 ----- stdout ----- @@ -12149,7 +12149,7 @@ fn reserved_script_name() -> Result<()> { .child("__init__.py") .touch()?; - uv_snapshot!(context.filters(), context.pip_install().arg("."), @r" + uv_snapshot!(context.filters(), context.pip_install().arg("."), @" success: true exit_code: 0 ----- stdout ----- @@ -12179,7 +12179,7 @@ fn reserved_script_name() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.pip_install().arg("."), @r" + uv_snapshot!(context.filters(), context.pip_install().arg("."), @" success: false exit_code: 2 ----- stdout ----- @@ -12234,7 +12234,7 @@ fn pep_751_dependency() -> Result<()> { uv_snapshot!(context.filters(), context.pip_install() .arg("--preview") .arg("-r") - .arg("pylock.toml"), @r" + .arg("pylock.toml"), @" success: true exit_code: 0 ----- stdout ----- @@ -12262,7 +12262,7 @@ fn conflicting_flags_clap_bug() { .arg("--offline") .arg("install") .arg("--no-offline") - .arg("tqdm"), @r" + .arg("tqdm"), @" success: false exit_code: 2 ----- stdout ----- @@ -12281,7 +12281,7 @@ fn offline_refresh_conflict() { uv_snapshot!(context.filters(), context.pip_install() .arg("tqdm") .arg("--offline") - .arg("--refresh"), @r" + .arg("--refresh"), @" success: false exit_code: 2 ----- stdout ----- @@ -12356,7 +12356,7 @@ fn strip_shebang_arguments() -> Result<()> { "})?; // Install the package. - uv_snapshot!(context.filters(), context.pip_install().arg(project_dir.path()), @r###" + uv_snapshot!(context.filters(), context.pip_install().arg(project_dir.path()), @" success: true exit_code: 0 ----- stdout ----- @@ -12366,7 +12366,7 @@ fn strip_shebang_arguments() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + shebang-test==0.1.0 (from file://[TEMP_DIR]/shebang_test) - "###); + "); // Check the installed scripts have their shebangs stripped of arguments. let custom_script_path = venv_bin_path(&context.venv).join("custom_script"); @@ -12405,7 +12405,7 @@ fn install_python_preference() { TestContext::new_with_versions(&["3.12", "3.11"]).with_versions_as_managed(&["3.12"]); // Create a managed interpreter environment - uv_snapshot!(context.filters(), context.venv(), @r" + uv_snapshot!(context.filters(), context.venv(), @" success: true exit_code: 0 ----- stdout ----- @@ -12417,7 +12417,7 @@ fn install_python_preference() { "); // Install a package, requesting managed Python - uv_snapshot!(context.filters(), context.pip_install().arg("anyio").arg("--managed-python"), @r" + uv_snapshot!(context.filters(), context.pip_install().arg("anyio").arg("--managed-python"), @" success: true exit_code: 0 ----- stdout ----- @@ -12433,7 +12433,7 @@ fn install_python_preference() { // Install a package, requesting unmanaged Python // This is allowed, because the virtual environment already exists - uv_snapshot!(context.filters(), context.pip_install().arg("anyio").arg("--no-managed-python"), @r" + uv_snapshot!(context.filters(), context.pip_install().arg("anyio").arg("--no-managed-python"), @" success: true exit_code: 0 ----- stdout ----- @@ -12444,7 +12444,7 @@ fn install_python_preference() { // This also works with `VIRTUAL_ENV` unset uv_snapshot!(context.filters(), context.pip_install() - .arg("anyio").arg("--no-managed-python").env_remove(EnvVars::VIRTUAL_ENV), @r" + .arg("anyio").arg("--no-managed-python").env_remove(EnvVars::VIRTUAL_ENV), @" success: true exit_code: 0 ----- stdout ----- @@ -12470,7 +12470,7 @@ fn config_settings_package() -> Result<()> { // Install the editable package. uv_snapshot!(context.filters(), context.pip_install() .arg("-r") - .arg("requirements.txt"), @r###" + .arg("requirements.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -12481,7 +12481,7 @@ fn config_settings_package() -> Result<()> { Installed 2 packages in [TIME] + iniconfig==2.0.0 + setuptools-editable==0.1.0 (from file://[WORKSPACE]/test/packages/setuptools_editable) - "### + " ); // When installed without `editable_mode=compat`, the `finder.py` file should be present. @@ -12492,7 +12492,7 @@ fn config_settings_package() -> Result<()> { // Uninstall the package. uv_snapshot!(context.filters(), context.pip_uninstall() - .arg("setuptools-editable"), @r###" + .arg("setuptools-editable"), @" success: true exit_code: 0 ----- stdout ----- @@ -12500,14 +12500,14 @@ fn config_settings_package() -> Result<()> { ----- stderr ----- Uninstalled 1 package in [TIME] - setuptools-editable==0.1.0 (from file://[WORKSPACE]/test/packages/setuptools_editable) - "###); + "); // Install the editable package with `editable_mode=compat`, scoped to the package. uv_snapshot!(context.filters(), context.pip_install() .arg("-r") .arg("requirements.txt") .arg("--config-settings-package") - .arg("setuptools-editable:editable_mode=compat"), @r" + .arg("setuptools-editable:editable_mode=compat"), @" success: true exit_code: 0 ----- stdout ----- @@ -12528,7 +12528,7 @@ fn config_settings_package() -> Result<()> { // Uninstall the package. uv_snapshot!(context.filters(), context.pip_uninstall() - .arg("setuptools-editable"), @r###" + .arg("setuptools-editable"), @" success: true exit_code: 0 ----- stdout ----- @@ -12536,7 +12536,7 @@ fn config_settings_package() -> Result<()> { ----- stderr ----- Uninstalled 1 package in [TIME] - setuptools-editable==0.1.0 (from file://[WORKSPACE]/test/packages/setuptools_editable) - "###); + "); // Install the editable package with `editable_mode=compat`, by scoped to a different package. uv_snapshot!(context.filters(), context.pip_install() @@ -12544,7 +12544,7 @@ fn config_settings_package() -> Result<()> { .arg("requirements.txt") .arg("--config-settings-package") .arg("setuptools:editable_mode=compat") - , @r" + , @" success: true exit_code: 0 ----- stdout ----- @@ -12570,7 +12570,7 @@ fn reject_invalid_archive_member_names() { let context = TestContext::new("3.12").with_exclude_newer("2025-10-07T00:00:00Z"); uv_snapshot!(context.filters(), context.pip_install() - .arg("cbwheeldiff2==0.0.1"), @r" + .arg("cbwheeldiff2==0.0.1"), @" success: false exit_code: 1 ----- stdout ----- @@ -12589,7 +12589,7 @@ fn reject_invalid_streaming_zip() { let context = TestContext::new("3.12").with_exclude_newer("2025-07-10T00:00:00Z"); uv_snapshot!(context.filters(), context.pip_install() - .arg("cbwheelstreamtest==0.0.1"), @r" + .arg("cbwheelstreamtest==0.0.1"), @" success: false exit_code: 1 ----- stdout ----- @@ -12608,7 +12608,7 @@ fn reject_invalid_double_zip() { let context = TestContext::new("3.12").with_exclude_newer("2025-07-10T00:00:00Z"); uv_snapshot!(context.filters(), context.pip_install() - .arg("cbwheelziptest==0.0.2"), @r" + .arg("cbwheelziptest==0.0.2"), @" success: false exit_code: 1 ----- stdout ----- @@ -12627,7 +12627,7 @@ fn reject_invalid_central_directory_offset() { let context = TestContext::new("3.12"); uv_snapshot!(context.filters(), context.pip_install() - .arg("attrs @ https://pub-c6f28d316acd406eae43501e51ad30fa.r2.dev/zip1/attrs-25.3.0-py3-none-any.whl"), @r" + .arg("attrs @ https://pub-c6f28d316acd406eae43501e51ad30fa.r2.dev/zip1/attrs-25.3.0-py3-none-any.whl"), @" success: false exit_code: 1 ----- stdout ----- @@ -12647,7 +12647,7 @@ fn reject_invalid_crc32_mismatch() { let context = TestContext::new("3.12"); uv_snapshot!(context.filters(), context.pip_install() - .arg("attrs @ https://pub-c6f28d316acd406eae43501e51ad30fa.r2.dev/zip2/attrs-25.3.0-py3-none-any.whl"), @r" + .arg("attrs @ https://pub-c6f28d316acd406eae43501e51ad30fa.r2.dev/zip2/attrs-25.3.0-py3-none-any.whl"), @" success: false exit_code: 1 ----- stdout ----- @@ -12666,7 +12666,7 @@ fn reject_invalid_crc32_non_data_descriptor() { let context = TestContext::new("3.12"); uv_snapshot!(context.filters(), context.pip_install() - .arg("attrs @ https://pub-c6f28d316acd406eae43501e51ad30fa.r2.dev/zip3/attrs-25.3.0-py3-none-any.whl"), @r" + .arg("attrs @ https://pub-c6f28d316acd406eae43501e51ad30fa.r2.dev/zip3/attrs-25.3.0-py3-none-any.whl"), @" success: false exit_code: 1 ----- stdout ----- @@ -12685,7 +12685,7 @@ fn reject_invalid_duplicate_extra_field() { let context = TestContext::new("3.12"); uv_snapshot!(context.filters(), context.pip_install() - .arg("attrs @ https://pub-c6f28d316acd406eae43501e51ad30fa.r2.dev/zip4/attrs-25.3.0-py3-none-any.whl"), @r" + .arg("attrs @ https://pub-c6f28d316acd406eae43501e51ad30fa.r2.dev/zip4/attrs-25.3.0-py3-none-any.whl"), @" success: false exit_code: 1 ----- stdout ----- @@ -12703,7 +12703,7 @@ fn reject_invalid_short_usize() { let context = TestContext::new("3.12"); uv_snapshot!(context.filters(), context.pip_install() - .arg("attrs @ https://pub-c6f28d316acd406eae43501e51ad30fa.r2.dev/zip5/attrs-25.3.0-py3-none-any.whl"), @r" + .arg("attrs @ https://pub-c6f28d316acd406eae43501e51ad30fa.r2.dev/zip5/attrs-25.3.0-py3-none-any.whl"), @" success: false exit_code: 1 ----- stdout ----- @@ -12722,7 +12722,7 @@ fn reject_invalid_chained_extra_field() { let context = TestContext::new("3.12"); uv_snapshot!(context.filters(), context.pip_install() - .arg("attrs @ https://pub-c6f28d316acd406eae43501e51ad30fa.r2.dev/zip6/attrs-25.3.0-py3-none-any.whl"), @r" + .arg("attrs @ https://pub-c6f28d316acd406eae43501e51ad30fa.r2.dev/zip6/attrs-25.3.0-py3-none-any.whl"), @" success: false exit_code: 1 ----- stdout ----- @@ -12740,7 +12740,7 @@ fn reject_invalid_short_usize_zip64() { let context = TestContext::new("3.12"); uv_snapshot!(context.filters(), context.pip_install() - .arg("attrs @ https://pub-c6f28d316acd406eae43501e51ad30fa.r2.dev/zip7/attrs-25.3.0-py3-none-any.whl"), @r" + .arg("attrs @ https://pub-c6f28d316acd406eae43501e51ad30fa.r2.dev/zip7/attrs-25.3.0-py3-none-any.whl"), @" success: false exit_code: 1 ----- stdout ----- @@ -12805,7 +12805,7 @@ fn already_installed_url_dependency_no_sources() -> Result<()> { .touch()?; // Install `foo`. - uv_snapshot!(context.filters(), context.pip_install().arg("./foo"), @r" + uv_snapshot!(context.filters(), context.pip_install().arg("./foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -12819,7 +12819,7 @@ fn already_installed_url_dependency_no_sources() -> Result<()> { "); // Install `bar` with `--no-sources`. - uv_snapshot!(context.filters(), context.pip_install().arg("./bar").arg("--no-sources"), @r" + uv_snapshot!(context.filters(), context.pip_install().arg("./bar").arg("--no-sources"), @" success: true exit_code: 0 ----- stdout ----- @@ -12918,7 +12918,7 @@ fn pip_install_build_dependencies_respect_locked_versions() -> Result<()> { "#})?; // Ensure our build backend is checking the version correctly - uv_snapshot!(context.filters(), context.pip_install().arg(".").env(EnvVars::EXPECTED_ANYIO_VERSION, "3.0"), @r" + uv_snapshot!(context.filters(), context.pip_install().arg(".").env(EnvVars::EXPECTED_ANYIO_VERSION, "3.0"), @" success: false exit_code: 1 ----- stdout ----- @@ -12952,7 +12952,7 @@ fn pip_install_build_dependencies_respect_locked_versions() -> Result<()> { "#})?; // The child should be built with anyio 4.0 - uv_snapshot!(context.filters(), context.pip_install().arg(".").env(EnvVars::EXPECTED_ANYIO_VERSION, "4.0"), @r" + uv_snapshot!(context.filters(), context.pip_install().arg(".").env(EnvVars::EXPECTED_ANYIO_VERSION, "4.0"), @" success: true exit_code: 0 ----- stdout ----- @@ -12986,7 +12986,7 @@ fn pip_install_build_dependencies_respect_locked_versions() -> Result<()> { // The child should be rebuilt with anyio 3.7, without `--reinstall` uv_snapshot!(context.filters(), context.pip_install().arg(".") - .arg("--reinstall-package").arg("child").env(EnvVars::EXPECTED_ANYIO_VERSION, "4.0"), @r" + .arg("--reinstall-package").arg("child").env(EnvVars::EXPECTED_ANYIO_VERSION, "4.0"), @" success: false exit_code: 1 ----- stdout ----- @@ -13006,7 +13006,7 @@ fn pip_install_build_dependencies_respect_locked_versions() -> Result<()> { "); uv_snapshot!(context.filters(), context.pip_install().arg(".") - .arg("--reinstall-package").arg("child").env(EnvVars::EXPECTED_ANYIO_VERSION, "3.7"), @r" + .arg("--reinstall-package").arg("child").env(EnvVars::EXPECTED_ANYIO_VERSION, "3.7"), @" success: true exit_code: 0 ----- stdout ----- @@ -13027,7 +13027,7 @@ fn pip_install_build_dependencies_respect_locked_versions() -> Result<()> { uv_snapshot!(context.filters(), context.pip_install().arg(".") .arg("--preview-features").arg("extra-build-dependencies") .arg("--reinstall-package").arg("child") - .env(EnvVars::EXPECTED_ANYIO_VERSION, "3.7"), @r" + .env(EnvVars::EXPECTED_ANYIO_VERSION, "3.7"), @" success: true exit_code: 0 ----- stdout ----- @@ -13079,7 +13079,7 @@ fn overlapping_packages_warning() -> Result<()> { uv_snapshot!(context.filters(), context.pip_install() .arg("--no-deps") .arg(&built_by_uv) - .arg(also_build_by_uv.path()), @r" + .arg(also_build_by_uv.path()), @" success: true exit_code: 0 ----- stdout ----- @@ -13102,7 +13102,7 @@ fn overlapping_packages_warning() -> Result<()> { .arg("--preview-features") .arg("detect-module-conflicts") .arg(&built_by_uv) - .arg(also_build_by_uv.path()), @r" + .arg(also_build_by_uv.path()), @" success: true exit_code: 0 ----- stdout ----- @@ -13121,7 +13121,7 @@ fn overlapping_packages_warning() -> Result<()> { uv_snapshot!(context.pip_install() .arg("--no-deps") .arg("poetry") - .arg("poetry-core"), @r" + .arg("poetry-core"), @" success: true exit_code: 0 ----- stdout ----- @@ -13137,7 +13137,7 @@ fn overlapping_packages_warning() -> Result<()> { // Check that we can uninstall even if the venv is bogus. uv_snapshot!(context.filters(), context.pip_uninstall() - .arg("built_by_uv"), @r" + .arg("built_by_uv"), @" success: true exit_code: 0 ----- stdout ----- @@ -13148,7 +13148,7 @@ fn overlapping_packages_warning() -> Result<()> { " ); uv_snapshot!(context.filters(), context.pip_uninstall() - .arg("also_built_by_uv"), @r" + .arg("also_built_by_uv"), @" success: true exit_code: 0 ----- stdout ----- @@ -13162,7 +13162,7 @@ fn overlapping_packages_warning() -> Result<()> { // Check that installing one of the packages on their own doesn't warn. uv_snapshot!(context.filters(), context.pip_install() .arg("--no-deps") - .arg(built_by_uv), @r" + .arg(built_by_uv), @" success: true exit_code: 0 ----- stdout ----- @@ -13177,7 +13177,7 @@ fn overlapping_packages_warning() -> Result<()> { // Currently, we don't warn if we install them one wheel at a time. uv_snapshot!(context.filters(), context.pip_install() .arg("--no-deps") - .arg(also_build_by_uv.path()), @r" + .arg(also_build_by_uv.path()), @" success: true exit_code: 0 ----- stdout ----- @@ -13224,7 +13224,7 @@ fn transitive_dependency_config_settings_invalidation() -> Result<()> { // Install the local `idna` package. uv_snapshot!(context.filters(), context.pip_install() - .arg(context.temp_dir.child("idna").path()), @r" + .arg(context.temp_dir.child("idna").path()), @" success: true exit_code: 0 ----- stdout ----- @@ -13243,7 +13243,7 @@ fn transitive_dependency_config_settings_invalidation() -> Result<()> { // https://github.com/astral-sh/uv/pull/15389, this would panic. uv_snapshot!(context.filters(), context.pip_install() .arg("anyio") - .arg("--config-settings=foo=bar"), @r" + .arg("--config-settings=foo=bar"), @" success: true exit_code: 0 ----- stdout ----- @@ -13267,7 +13267,7 @@ fn switch_platform() { uv_snapshot!(context.pip_install() .arg("cffi") .arg("--python-platform") - .arg("windows"), @r" + .arg("windows"), @" success: true exit_code: 0 ----- stdout ----- @@ -13281,7 +13281,7 @@ fn switch_platform() { " ); - uv_snapshot!(context.pip_check().arg("--python-platform").arg("windows"), @r" + uv_snapshot!(context.pip_check().arg("--python-platform").arg("windows"), @" success: true exit_code: 0 ----- stdout ----- @@ -13292,7 +13292,7 @@ fn switch_platform() { " ); - uv_snapshot!(context.pip_check().arg("--python-platform").arg("linux"), @r" + uv_snapshot!(context.pip_check().arg("--python-platform").arg("linux"), @" success: false exit_code: 1 ----- stdout ----- @@ -13307,7 +13307,7 @@ fn switch_platform() { uv_snapshot!(context.pip_install() .arg("cffi") .arg("--python-platform") - .arg("linux"), @r" + .arg("linux"), @" success: true exit_code: 0 ----- stdout ----- @@ -13357,7 +13357,7 @@ fn pip_install_no_sources_editable_to_registry_switch() -> Result<()> { // Step 1: Install as editable first. uv_snapshot!(context.filters(), context.pip_install() .arg("--editable") - .arg("./local_pkg"), @r" + .arg("./local_pkg"), @" success: true exit_code: 0 ----- stdout ----- @@ -13373,7 +13373,7 @@ fn pip_install_no_sources_editable_to_registry_switch() -> Result<()> { // Step 2: Use `--no-sources`; we should retain the package. uv_snapshot!(context.filters(), context.pip_install() .arg("iniconfig") - .arg("--no-sources"), @r" + .arg("--no-sources"), @" success: true exit_code: 0 ----- stdout ----- @@ -13399,7 +13399,7 @@ fn install_with_system_interpreter() { uv_snapshot!(context.filters(), context.pip_install() .arg("--system") - .arg("anyio"), @r" + .arg("anyio"), @" success: false exit_code: 2 ----- stdout ----- @@ -13427,14 +13427,14 @@ fn install_missing_python_no_target() { // Request Python 3.12; which should fail uv_snapshot!(context.filters(), context.pip_install() .arg("--python").arg("3.12") - .arg("anyio"), @r###" + .arg("anyio"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: No virtual environment found for Python 3.12; run `uv venv` to create an environment, or pass `--system` to install into a non-virtual environment - "### + " ); } @@ -13451,7 +13451,7 @@ fn install_missing_python_with_target() { uv_snapshot!(context.filters(), context.pip_install() .arg("anyio") - .arg("--target").arg(target_dir.path()), @r" + .arg("--target").arg(target_dir.path()), @" success: true exit_code: 0 ----- stdout ----- @@ -13482,20 +13482,20 @@ fn install_missing_python_version_with_target() { uv_snapshot!(context.filters(), context.pip_install() .arg("anyio") .arg("--python").arg("3.12") - .arg("--target").arg(target_dir.path()), @r###" - success: true - exit_code: 0 - ----- stdout ----- + .arg("--target").arg(target_dir.path()), @" + success: true + exit_code: 0 + ----- stdout ----- - ----- stderr ----- - Using CPython 3.12.12 - Resolved 3 packages in [TIME] - Prepared 3 packages in [TIME] - Installed 3 packages in [TIME] - + anyio==4.3.0 - + idna==3.6 - + sniffio==1.3.1 - "### + ----- stderr ----- + Using CPython 3.12.12 + Resolved 3 packages in [TIME] + Prepared 3 packages in [TIME] + Installed 3 packages in [TIME] + + anyio==4.3.0 + + idna==3.6 + + sniffio==1.3.1 + " ); } @@ -13554,7 +13554,7 @@ fn build_backend_wrong_wheel_platform() -> Result<()> { // A Python 3.13 host with a 3.13 implicit target works. context.venv().arg("-p").arg("3.13").assert().success(); - uv_snapshot!(context.filters(), context.pip_install().arg("./child"), @r" + uv_snapshot!(context.filters(), context.pip_install().arg("./child"), @" success: true exit_code: 0 ----- stdout ----- @@ -13568,7 +13568,7 @@ fn build_backend_wrong_wheel_platform() -> Result<()> { // A Python 3.13 host with a 3.12 explicit target fails. context.venv().arg("-p").arg("3.13").assert().success(); - uv_snapshot!(context.filters(), context.pip_install().arg("--python-version").arg("3.12").arg("./child"), @r" + uv_snapshot!(context.filters(), context.pip_install().arg("--python-version").arg("3.12").arg("./child"), @" success: false exit_code: 1 ----- stdout ----- @@ -13581,7 +13581,7 @@ fn build_backend_wrong_wheel_platform() -> Result<()> { // A python 3.12 host with a 3.13 explicit target works. context.venv().arg("-p").arg("3.13").assert().success(); - uv_snapshot!(context.filters(), context.pip_install().arg("--python-version").arg("3.13").arg("./child"), @r" + uv_snapshot!(context.filters(), context.pip_install().arg("--python-version").arg("3.13").arg("./child"), @" success: true exit_code: 0 ----- stdout ----- @@ -13596,7 +13596,7 @@ fn build_backend_wrong_wheel_platform() -> Result<()> { // A Python 3.13 host with a 3.12 explicit target fails. context.venv().arg("-p").arg("3.13").assert().success(); - uv_snapshot!(context.filters(), context.pip_install().arg("--python-version").arg("3.12").arg("./child"), @r" + uv_snapshot!(context.filters(), context.pip_install().arg("--python-version").arg("3.12").arg("./child"), @" success: false exit_code: 1 ----- stdout ----- @@ -13631,7 +13631,7 @@ fn build_backend_wrong_wheel_platform() -> Result<()> { // A build host of 3.13 works. context.venv().arg("-p").arg("3.13").assert().success(); - uv_snapshot!(context.filters(), context.pip_install().arg("--python-version").arg("3.12").arg("."), @r" + uv_snapshot!(context.filters(), context.pip_install().arg("--python-version").arg("3.12").arg("."), @" success: true exit_code: 0 ----- stdout ----- @@ -13645,7 +13645,7 @@ fn build_backend_wrong_wheel_platform() -> Result<()> { // A build host of 3.12 fails. context.venv().arg("-p").arg("3.12").assert().success(); - uv_snapshot!(context.filters(), context.pip_install().arg("--python-version").arg("3.12").arg("."), @r" + uv_snapshot!(context.filters(), context.pip_install().arg("--python-version").arg("3.12").arg("."), @" success: false exit_code: 1 ----- stdout ----- diff --git a/crates/uv/tests/it/pip_install_scenarios.rs b/crates/uv/tests/it/pip_install_scenarios.rs index b2e43fa88..66d9a1a56 100644 --- a/crates/uv/tests/it/pip_install_scenarios.rs +++ b/crates/uv/tests/it/pip_install_scenarios.rs @@ -45,7 +45,7 @@ fn requires_exact_version_does_not_exist() { uv_snapshot!(filters, command(&context) .arg("requires-exact-version-does-not-exist-a==2.0.0") - , @r" + , @" success: false exit_code: 1 ----- stdout ----- @@ -81,7 +81,7 @@ fn requires_greater_version_does_not_exist() { uv_snapshot!(filters, command(&context) .arg("requires-greater-version-does-not-exist-a>1.0.0") - , @r" + , @" success: false exit_code: 1 ----- stdout ----- @@ -118,7 +118,7 @@ fn requires_less_version_does_not_exist() { uv_snapshot!(filters, command(&context) .arg("requires-less-version-does-not-exist-a<2.0.0") - , @r" + , @" success: false exit_code: 1 ----- stdout ----- @@ -151,7 +151,7 @@ fn requires_package_does_not_exist() { uv_snapshot!(filters, command(&context) .arg("requires-package-does-not-exist-a") - , @r" + , @" success: false exit_code: 1 ----- stdout ----- @@ -188,7 +188,7 @@ fn transitive_requires_package_does_not_exist() { uv_snapshot!(filters, command(&context) .arg("transitive-requires-package-does-not-exist-a") - , @r" + , @" success: false exit_code: 1 ----- stdout ----- @@ -275,7 +275,7 @@ fn dependency_excludes_non_contiguous_range_of_compatible_versions() { .arg("dependency-excludes-non-contiguous-range-of-compatible-versions-a") .arg("dependency-excludes-non-contiguous-range-of-compatible-versions-b<3.0.0,>=2.0.0") .arg("dependency-excludes-non-contiguous-range-of-compatible-versions-c") - , @r" + , @" success: false exit_code: 1 ----- stdout ----- @@ -378,7 +378,7 @@ fn dependency_excludes_range_of_compatible_versions() { .arg("dependency-excludes-range-of-compatible-versions-a") .arg("dependency-excludes-range-of-compatible-versions-b<3.0.0,>=2.0.0") .arg("dependency-excludes-range-of-compatible-versions-c") - , @r" + , @" success: false exit_code: 1 ----- stdout ----- @@ -451,7 +451,7 @@ fn excluded_only_compatible_version() { uv_snapshot!(filters, command(&context) .arg("excluded-only-compatible-version-a!=2.0.0") .arg("excluded-only-compatible-version-b<3.0.0,>=2.0.0") - , @r" + , @" success: false exit_code: 1 ----- stdout ----- @@ -503,7 +503,7 @@ fn excluded_only_version() { uv_snapshot!(filters, command(&context) .arg("excluded-only-version-a!=1.0.0") - , @r" + , @" success: false exit_code: 1 ----- stdout ----- @@ -566,7 +566,7 @@ fn all_extras_required() { uv_snapshot!(filters, command(&context) .arg("all-extras-required-a[all]") - , @r" + , @" success: true exit_code: 0 ----- stdout ----- @@ -617,7 +617,7 @@ fn extra_does_not_exist_backtrack() { uv_snapshot!(filters, command(&context) .arg("extra-does-not-exist-backtrack-a[extra]") - , @r" + , @" success: true exit_code: 0 ----- stdout ----- @@ -667,7 +667,7 @@ fn extra_incompatible_with_extra_not_requested() { uv_snapshot!(filters, command(&context) .arg("extra-incompatible-with-extra-not-requested-a[extra_c]") - , @r" + , @" success: true exit_code: 0 ----- stdout ----- @@ -718,7 +718,7 @@ fn extra_incompatible_with_extra() { uv_snapshot!(filters, command(&context) .arg("extra-incompatible-with-extra-a[extra_b,extra_c]") - , @r" + , @" success: false exit_code: 1 ----- stdout ----- @@ -766,7 +766,7 @@ fn extra_incompatible_with_root() { uv_snapshot!(filters, command(&context) .arg("extra-incompatible-with-root-a[extra]") .arg("extra-incompatible-with-root-b==2.0.0") - , @r" + , @" success: false exit_code: 1 ----- stdout ----- @@ -810,7 +810,7 @@ fn extra_required() { uv_snapshot!(filters, command(&context) .arg("extra-required-a[extra]") - , @r" + , @" success: true exit_code: 0 ----- stdout ----- @@ -849,7 +849,7 @@ fn missing_extra() { uv_snapshot!(filters, command(&context) .arg("missing-extra-a[extra]") - , @r" + , @" success: true exit_code: 0 ----- stdout ----- @@ -900,7 +900,7 @@ fn multiple_extras_required() { uv_snapshot!(filters, command(&context) .arg("multiple-extras-required-a[extra_b,extra_c]") - , @r" + , @" success: true exit_code: 0 ----- stdout ----- @@ -945,7 +945,7 @@ fn direct_incompatible_versions() { uv_snapshot!(filters, command(&context) .arg("direct-incompatible-versions-a==1.0.0") .arg("direct-incompatible-versions-a==2.0.0") - , @r" + , @" success: false exit_code: 1 ----- stdout ----- @@ -985,7 +985,7 @@ fn transitive_incompatible_versions() { uv_snapshot!(filters, command(&context) .arg("transitive-incompatible-versions-a==1.0.0") - , @r" + , @" success: false exit_code: 1 ----- stdout ----- @@ -1029,7 +1029,7 @@ fn transitive_incompatible_with_root_version() { uv_snapshot!(filters, command(&context) .arg("transitive-incompatible-with-root-version-a") .arg("transitive-incompatible-with-root-version-b==1.0.0") - , @r" + , @" success: false exit_code: 1 ----- stdout ----- @@ -1078,7 +1078,7 @@ fn transitive_incompatible_with_transitive() { uv_snapshot!(filters, command(&context) .arg("transitive-incompatible-with-transitive-a") .arg("transitive-incompatible-with-transitive-b") - , @r" + , @" success: false exit_code: 1 ----- stdout ----- @@ -1118,7 +1118,7 @@ fn local_greater_than_or_equal() { uv_snapshot!(filters, command(&context) .arg("local-greater-than-or-equal-a>=1.2.3") - , @r" + , @" success: true exit_code: 0 ----- stdout ----- @@ -1156,7 +1156,7 @@ fn local_greater_than() { uv_snapshot!(filters, command(&context) .arg("local-greater-than-a>1.2.3") - , @r" + , @" success: false exit_code: 1 ----- stdout ----- @@ -1193,7 +1193,7 @@ fn local_less_than_or_equal() { uv_snapshot!(filters, command(&context) .arg("local-less-than-or-equal-a<=1.2.3") - , @r" + , @" success: true exit_code: 0 ----- stdout ----- @@ -1231,7 +1231,7 @@ fn local_less_than() { uv_snapshot!(filters, command(&context) .arg("local-less-than-a<1.2.3") - , @r" + , @" success: false exit_code: 1 ----- stdout ----- @@ -1270,7 +1270,7 @@ fn local_not_latest() { uv_snapshot!(filters, command(&context) .arg("local-not-latest-a>=1") - , @r" + , @" success: true exit_code: 0 ----- stdout ----- @@ -1309,7 +1309,7 @@ fn local_not_used_with_sdist() { uv_snapshot!(filters, command(&context) .arg("local-not-used-with-sdist-a==1.2.3") - , @r" + , @" success: true exit_code: 0 ----- stdout ----- @@ -1349,7 +1349,7 @@ fn local_simple() { uv_snapshot!(filters, command(&context) .arg("local-simple-a==1.2.3") - , @r" + , @" success: true exit_code: 0 ----- stdout ----- @@ -1400,7 +1400,7 @@ fn local_transitive_backtrack() { uv_snapshot!(filters, command(&context) .arg("local-transitive-backtrack-a") .arg("local-transitive-backtrack-b==2.0.0+foo") - , @r" + , @" success: true exit_code: 0 ----- stdout ----- @@ -1448,7 +1448,7 @@ fn local_transitive_conflicting() { uv_snapshot!(filters, command(&context) .arg("local-transitive-conflicting-a") .arg("local-transitive-conflicting-b==2.0.0+foo") - , @r" + , @" success: false exit_code: 1 ----- stdout ----- @@ -1493,7 +1493,7 @@ fn local_transitive_confounding() { uv_snapshot!(filters, command(&context) .arg("local-transitive-confounding-a") - , @r" + , @" success: true exit_code: 0 ----- stdout ----- @@ -1542,7 +1542,7 @@ fn local_transitive_greater_than_or_equal() { uv_snapshot!(filters, command(&context) .arg("local-transitive-greater-than-or-equal-a") .arg("local-transitive-greater-than-or-equal-b==2.0.0+foo") - , @r" + , @" success: true exit_code: 0 ----- stdout ----- @@ -1590,7 +1590,7 @@ fn local_transitive_greater_than() { uv_snapshot!(filters, command(&context) .arg("local-transitive-greater-than-a") .arg("local-transitive-greater-than-b==2.0.0+foo") - , @r" + , @" success: false exit_code: 1 ----- stdout ----- @@ -1636,7 +1636,7 @@ fn local_transitive_less_than_or_equal() { uv_snapshot!(filters, command(&context) .arg("local-transitive-less-than-or-equal-a") .arg("local-transitive-less-than-or-equal-b==2.0.0+foo") - , @r" + , @" success: true exit_code: 0 ----- stdout ----- @@ -1684,7 +1684,7 @@ fn local_transitive_less_than() { uv_snapshot!(filters, command(&context) .arg("local-transitive-less-than-a") .arg("local-transitive-less-than-b==2.0.0+foo") - , @r" + , @" success: false exit_code: 1 ----- stdout ----- @@ -1730,7 +1730,7 @@ fn local_transitive() { uv_snapshot!(filters, command(&context) .arg("local-transitive-a") .arg("local-transitive-b==2.0.0+foo") - , @r" + , @" success: true exit_code: 0 ----- stdout ----- @@ -1772,7 +1772,7 @@ fn local_used_without_sdist() { uv_snapshot!(filters, command(&context) .arg("local-used-without-sdist-a==1.2.3") - , @r" + , @" success: true exit_code: 0 ----- stdout ----- @@ -1811,7 +1811,7 @@ fn post_equal_available() { uv_snapshot!(filters, command(&context) .arg("post-equal-available-a==1.2.3.post0") - , @r" + , @" success: true exit_code: 0 ----- stdout ----- @@ -1850,7 +1850,7 @@ fn post_equal_not_available() { uv_snapshot!(filters, command(&context) .arg("post-equal-not-available-a==1.2.3.post0") - , @r" + , @" success: false exit_code: 1 ----- stdout ----- @@ -1887,7 +1887,7 @@ fn post_greater_than_or_equal_post() { uv_snapshot!(filters, command(&context) .arg("post-greater-than-or-equal-post-a>=1.2.3.post0") - , @r" + , @" success: true exit_code: 0 ----- stdout ----- @@ -1925,7 +1925,7 @@ fn post_greater_than_or_equal() { uv_snapshot!(filters, command(&context) .arg("post-greater-than-or-equal-a>=1.2.3") - , @r" + , @" success: true exit_code: 0 ----- stdout ----- @@ -1965,7 +1965,7 @@ fn post_greater_than_post_not_available() { uv_snapshot!(filters, command(&context) .arg("post-greater-than-post-not-available-a>1.2.3.post2") - , @r" + , @" success: false exit_code: 1 ----- stdout ----- @@ -2001,7 +2001,7 @@ fn post_greater_than_post() { uv_snapshot!(filters, command(&context) .arg("post-greater-than-post-a>1.2.3.post0") - , @r" + , @" success: true exit_code: 0 ----- stdout ----- @@ -2039,7 +2039,7 @@ fn post_greater_than() { uv_snapshot!(filters, command(&context) .arg("post-greater-than-a>1.2.3") - , @r" + , @" success: false exit_code: 1 ----- stdout ----- @@ -2074,7 +2074,7 @@ fn post_less_than_or_equal() { uv_snapshot!(filters, command(&context) .arg("post-less-than-or-equal-a<=1.2.3") - , @r" + , @" success: false exit_code: 1 ----- stdout ----- @@ -2109,7 +2109,7 @@ fn post_less_than() { uv_snapshot!(filters, command(&context) .arg("post-less-than-a<1.2.3") - , @r" + , @" success: false exit_code: 1 ----- stdout ----- @@ -2145,7 +2145,7 @@ fn post_local_greater_than_post() { uv_snapshot!(filters, command(&context) .arg("post-local-greater-than-post-a>1.2.3.post1") - , @r" + , @" success: false exit_code: 1 ----- stdout ----- @@ -2181,7 +2181,7 @@ fn post_local_greater_than() { uv_snapshot!(filters, command(&context) .arg("post-local-greater-than-a>1.2.3") - , @r" + , @" success: false exit_code: 1 ----- stdout ----- @@ -2216,7 +2216,7 @@ fn post_simple() { uv_snapshot!(filters, command(&context) .arg("post-simple-a==1.2.3") - , @r" + , @" success: false exit_code: 1 ----- stdout ----- @@ -2255,7 +2255,7 @@ fn package_multiple_prereleases_kinds() { uv_snapshot!(filters, command(&context) .arg("package-multiple-prereleases-kinds-a>=1.0.0a1") - , @r" + , @" success: true exit_code: 0 ----- stdout ----- @@ -2297,7 +2297,7 @@ fn package_multiple_prereleases_numbers() { uv_snapshot!(filters, command(&context) .arg("package-multiple-prereleases-numbers-a>=1.0.0a1") - , @r" + , @" success: true exit_code: 0 ----- stdout ----- @@ -2337,7 +2337,7 @@ fn package_only_prereleases_boundary() { uv_snapshot!(filters, command(&context) .arg("package-only-prereleases-boundary-a<0.2.0") - , @r" + , @" success: true exit_code: 0 ----- stdout ----- @@ -2376,7 +2376,7 @@ fn package_only_prereleases_in_range() { uv_snapshot!(filters, command(&context) .arg("package-only-prereleases-in-range-a>0.1.0") - , @r" + , @" success: false exit_code: 1 ----- stdout ----- @@ -2414,7 +2414,7 @@ fn package_only_prereleases() { uv_snapshot!(filters, command(&context) .arg("package-only-prereleases-a") - , @r" + , @" success: true exit_code: 0 ----- stdout ----- @@ -2458,7 +2458,7 @@ fn package_prerelease_specified_mixed_available() { uv_snapshot!(filters, command(&context) .arg("package-prerelease-specified-mixed-available-a>=0.1.0a1") - , @r" + , @" success: true exit_code: 0 ----- stdout ----- @@ -2503,7 +2503,7 @@ fn package_prerelease_specified_only_final_available() { uv_snapshot!(filters, command(&context) .arg("package-prerelease-specified-only-final-available-a>=0.1.0a1") - , @r" + , @" success: true exit_code: 0 ----- stdout ----- @@ -2551,7 +2551,7 @@ fn package_prerelease_specified_only_prerelease_available() { uv_snapshot!(filters, command(&context) .arg("package-prerelease-specified-only-prerelease-available-a>=0.1.0a1") - , @r" + , @" success: true exit_code: 0 ----- stdout ----- @@ -2595,7 +2595,7 @@ fn package_prereleases_boundary() { uv_snapshot!(filters, command(&context) .arg("--prerelease=allow") .arg("package-prereleases-boundary-a<0.2.0") - , @r" + , @" success: true exit_code: 0 ----- stdout ----- @@ -2636,7 +2636,7 @@ fn package_prereleases_global_boundary() { uv_snapshot!(filters, command(&context) .arg("--prerelease=allow") .arg("package-prereleases-global-boundary-a<0.2.0") - , @r" + , @" success: true exit_code: 0 ----- stdout ----- @@ -2680,7 +2680,7 @@ fn package_prereleases_specifier_boundary() { uv_snapshot!(filters, command(&context) .arg("package-prereleases-specifier-boundary-a<0.2.0a2") - , @r" + , @" success: true exit_code: 0 ----- stdout ----- @@ -2723,7 +2723,7 @@ fn requires_package_only_prereleases_in_range_global_opt_in() { uv_snapshot!(filters, command(&context) .arg("--prerelease=allow") .arg("requires-package-only-prereleases-in-range-global-opt-in-a>0.1.0") - , @r" + , @" success: true exit_code: 0 ----- stdout ----- @@ -2764,7 +2764,7 @@ fn requires_package_prerelease_and_final_any() { uv_snapshot!(filters, command(&context) .arg("requires-package-prerelease-and-final-any-a") - , @r" + , @" success: true exit_code: 0 ----- stdout ----- @@ -2814,7 +2814,7 @@ fn transitive_package_only_prereleases_in_range_opt_in() { uv_snapshot!(filters, command(&context) .arg("transitive-package-only-prereleases-in-range-opt-in-a") .arg("transitive-package-only-prereleases-in-range-opt-in-b>0.0.0a1") - , @r" + , @" success: true exit_code: 0 ----- stdout ----- @@ -2865,7 +2865,7 @@ fn transitive_package_only_prereleases_in_range() { uv_snapshot!(filters, command(&context) .arg("transitive-package-only-prereleases-in-range-a") - , @r" + , @" success: false exit_code: 1 ----- stdout ----- @@ -2908,7 +2908,7 @@ fn transitive_package_only_prereleases() { uv_snapshot!(filters, command(&context) .arg("transitive-package-only-prereleases-a") - , @r" + , @" success: true exit_code: 0 ----- stdout ----- @@ -2988,7 +2988,7 @@ fn transitive_prerelease_and_stable_dependency_many_versions_holes() { uv_snapshot!(filters, command(&context) .arg("transitive-prerelease-and-stable-dependency-many-versions-holes-a") .arg("transitive-prerelease-and-stable-dependency-many-versions-holes-b") - , @r" + , @" success: false exit_code: 1 ----- stdout ----- @@ -3083,7 +3083,7 @@ fn transitive_prerelease_and_stable_dependency_many_versions() { uv_snapshot!(filters, command(&context) .arg("transitive-prerelease-and-stable-dependency-many-versions-a") .arg("transitive-prerelease-and-stable-dependency-many-versions-b") - , @r" + , @" success: false exit_code: 1 ----- stdout ----- @@ -3144,7 +3144,7 @@ fn transitive_prerelease_and_stable_dependency_opt_in() { .arg("transitive-prerelease-and-stable-dependency-opt-in-a") .arg("transitive-prerelease-and-stable-dependency-opt-in-b") .arg("transitive-prerelease-and-stable-dependency-opt-in-c>=0.0.0a1") - , @r" + , @" success: true exit_code: 0 ----- stdout ----- @@ -3207,7 +3207,7 @@ fn transitive_prerelease_and_stable_dependency() { uv_snapshot!(filters, command(&context) .arg("transitive-prerelease-and-stable-dependency-a") .arg("transitive-prerelease-and-stable-dependency-b") - , @r" + , @" success: false exit_code: 1 ----- stdout ----- @@ -3256,7 +3256,7 @@ fn python_greater_than_current_backtrack() { uv_snapshot!(filters, command(&context) .arg("python-greater-than-current-backtrack-a") - , @r" + , @" success: true exit_code: 0 ----- stdout ----- @@ -3301,7 +3301,7 @@ fn python_greater_than_current_excluded() { uv_snapshot!(filters, command(&context) .arg("python-greater-than-current-excluded-a>=2.0.0") - , @r" + , @" success: false exit_code: 1 ----- stdout ----- @@ -3371,7 +3371,7 @@ fn python_greater_than_current_many() { uv_snapshot!(filters, command(&context) .arg("python-greater-than-current-many-a==1.0.0") - , @r" + , @" success: false exit_code: 1 ----- stdout ----- @@ -3445,7 +3445,7 @@ fn python_greater_than_current() { uv_snapshot!(filters, command(&context) .arg("python-greater-than-current-a==1.0.0") - , @r" + , @" success: false exit_code: 1 ----- stdout ----- @@ -3482,7 +3482,7 @@ fn python_less_than_current() { uv_snapshot!(filters, command(&context) .arg("python-less-than-current-a==1.0.0") - , @r" + , @" success: true exit_code: 0 ----- stdout ----- @@ -3520,7 +3520,7 @@ fn python_version_does_not_exist() { uv_snapshot!(filters, command(&context) .arg("python-version-does-not-exist-a==1.0.0") - , @r" + , @" success: false exit_code: 1 ----- stdout ----- @@ -3558,7 +3558,7 @@ fn no_binary() { .arg("--no-binary") .arg("no-binary-a") .arg("no-binary-a") - , @r" + , @" success: true exit_code: 0 ----- stdout ----- @@ -3597,7 +3597,7 @@ fn no_build() { .arg("--only-binary") .arg("no-build-a") .arg("no-build-a") - , @r" + , @" success: true exit_code: 0 ----- stdout ----- @@ -3635,7 +3635,7 @@ fn no_sdist_no_wheels_with_matching_abi() { uv_snapshot!(filters, command(&context) .arg("--python-platform=x86_64-manylinux2014") .arg("no-sdist-no-wheels-with-matching-abi-a") - , @r" + , @" success: false exit_code: 1 ----- stdout ----- @@ -3674,7 +3674,7 @@ fn no_sdist_no_wheels_with_matching_platform() { uv_snapshot!(filters, command(&context) .arg("--python-platform=x86_64-manylinux2014") .arg("no-sdist-no-wheels-with-matching-platform-a") - , @r" + , @" success: false exit_code: 1 ----- stdout ----- @@ -3713,7 +3713,7 @@ fn no_sdist_no_wheels_with_matching_python() { uv_snapshot!(filters, command(&context) .arg("--python-platform=x86_64-manylinux2014") .arg("no-sdist-no-wheels-with-matching-python-a") - , @r" + , @" success: false exit_code: 1 ----- stdout ----- @@ -3753,7 +3753,7 @@ fn no_wheels_no_build() { .arg("--only-binary") .arg("no-wheels-no-build-a") .arg("no-wheels-no-build-a") - , @r" + , @" success: false exit_code: 1 ----- stdout ----- @@ -3791,7 +3791,7 @@ fn no_wheels_with_matching_platform() { uv_snapshot!(filters, command(&context) .arg("no-wheels-with-matching-platform-a") - , @r" + , @" success: true exit_code: 0 ----- stdout ----- @@ -3826,7 +3826,7 @@ fn no_wheels() { uv_snapshot!(filters, command(&context) .arg("no-wheels-a") - , @r" + , @" success: true exit_code: 0 ----- stdout ----- @@ -3863,7 +3863,7 @@ fn only_wheels_no_binary() { .arg("--no-binary") .arg("only-wheels-no-binary-a") .arg("only-wheels-no-binary-a") - , @r" + , @" success: false exit_code: 1 ----- stdout ----- @@ -3901,7 +3901,7 @@ fn only_wheels() { uv_snapshot!(filters, command(&context) .arg("only-wheels-a") - , @r" + , @" success: true exit_code: 0 ----- stdout ----- @@ -3936,7 +3936,7 @@ fn specific_tag_and_default() { uv_snapshot!(filters, command(&context) .arg("specific-tag-and-default-a") - , @r" + , @" success: true exit_code: 0 ----- stdout ----- @@ -3972,7 +3972,7 @@ fn package_only_yanked_in_range() { uv_snapshot!(filters, command(&context) .arg("package-only-yanked-in-range-a>0.1.0") - , @r" + , @" success: false exit_code: 1 ----- stdout ----- @@ -4012,7 +4012,7 @@ fn package_only_yanked() { uv_snapshot!(filters, command(&context) .arg("package-only-yanked-a") - , @r" + , @" success: false exit_code: 1 ----- stdout ----- @@ -4053,7 +4053,7 @@ fn package_yanked_specified_mixed_available() { uv_snapshot!(filters, command(&context) .arg("package-yanked-specified-mixed-available-a>=0.1.0") - , @r" + , @" success: true exit_code: 0 ----- stdout ----- @@ -4092,7 +4092,7 @@ fn requires_package_yanked_and_unyanked_any() { uv_snapshot!(filters, command(&context) .arg("requires-package-yanked-and-unyanked-any-a") - , @r" + , @" success: true exit_code: 0 ----- stdout ----- @@ -4187,7 +4187,7 @@ fn transitive_package_only_yanked_in_range() { uv_snapshot!(filters, command(&context) .arg("transitive-package-only-yanked-in-range-a") - , @r" + , @" success: false exit_code: 1 ----- stdout ----- @@ -4232,7 +4232,7 @@ fn transitive_package_only_yanked() { uv_snapshot!(filters, command(&context) .arg("transitive-package-only-yanked-a") - , @r" + , @" success: false exit_code: 1 ----- stdout ----- @@ -4352,7 +4352,7 @@ fn transitive_yanked_and_unyanked_dependency() { uv_snapshot!(filters, command(&context) .arg("transitive-yanked-and-unyanked-dependency-a") .arg("transitive-yanked-and-unyanked-dependency-b") - , @r" + , @" success: false exit_code: 1 ----- stdout ----- diff --git a/crates/uv/tests/it/pip_list.rs b/crates/uv/tests/it/pip_list.rs index 830aeaf5e..1b823458e 100644 --- a/crates/uv/tests/it/pip_list.rs +++ b/crates/uv/tests/it/pip_list.rs @@ -13,13 +13,13 @@ fn list_empty_columns() { uv_snapshot!(context.pip_list() .arg("--format") - .arg("columns"), @r###" + .arg("columns"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- - "### + " ); } @@ -29,13 +29,13 @@ fn list_empty_freeze() { uv_snapshot!(context.pip_list() .arg("--format") - .arg("freeze"), @r###" + .arg("freeze"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- - "### + " ); } @@ -45,14 +45,14 @@ fn list_empty_json() { uv_snapshot!(context.pip_list() .arg("--format") - .arg("json"), @r###" + .arg("json"), @" success: true exit_code: 0 ----- stdout ----- [] ----- stderr ----- - "### + " ); } @@ -67,7 +67,7 @@ fn list_single_no_editable() -> Result<()> { uv_snapshot!(context.pip_install() .arg("-r") .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -77,12 +77,12 @@ fn list_single_no_editable() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + markupsafe==2.1.3 - "### + " ); context.assert_command("import markupsafe").success(); - uv_snapshot!(context.pip_list(), @r###" + uv_snapshot!(context.pip_list(), @" success: true exit_code: 0 ----- stdout ----- @@ -91,7 +91,7 @@ fn list_single_no_editable() -> Result<()> { markupsafe 2.1.3 ----- stderr ----- - "### + " ); Ok(()) @@ -108,7 +108,7 @@ fn list_outdated_columns() -> Result<()> { uv_snapshot!(context.pip_install() .arg("-r") .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -120,10 +120,10 @@ fn list_outdated_columns() -> Result<()> { + anyio==3.0.0 + idna==3.6 + sniffio==1.3.1 - "### + " ); - uv_snapshot!(context.pip_list().arg("--outdated"), @r###" + uv_snapshot!(context.pip_list().arg("--outdated"), @" success: true exit_code: 0 ----- stdout ----- @@ -132,7 +132,7 @@ fn list_outdated_columns() -> Result<()> { anyio 3.0.0 4.3.0 wheel ----- stderr ----- - "### + " ); Ok(()) @@ -149,7 +149,7 @@ fn list_outdated_json() -> Result<()> { uv_snapshot!(context.pip_install() .arg("-r") .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -161,17 +161,17 @@ fn list_outdated_json() -> Result<()> { + anyio==3.0.0 + idna==3.6 + sniffio==1.3.1 - "### + " ); - uv_snapshot!(context.pip_list().arg("--outdated").arg("--format").arg("json"), @r###" + uv_snapshot!(context.pip_list().arg("--outdated").arg("--format").arg("json"), @r#" success: true exit_code: 0 ----- stdout ----- [{"name":"anyio","version":"3.0.0","latest_version":"4.3.0","latest_filetype":"wheel"}] ----- stderr ----- - "### + "# ); Ok(()) @@ -181,14 +181,14 @@ fn list_outdated_json() -> Result<()> { fn list_outdated_freeze() { let context = TestContext::new("3.12"); - uv_snapshot!(context.pip_list().arg("--outdated").arg("--format").arg("freeze"), @r###" + uv_snapshot!(context.pip_list().arg("--outdated").arg("--format").arg("freeze"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: `--outdated` cannot be used with `--format freeze` - "### + " ); } @@ -206,7 +206,7 @@ fn list_outdated_git() -> Result<()> { uv_snapshot!(context.pip_install() .arg("-r") .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -217,10 +217,10 @@ fn list_outdated_git() -> Result<()> { Installed 2 packages in [TIME] + iniconfig==1.0.0 + uv-public-pypackage==0.1.0 (from git+https://github.com/astral-test/uv-public-pypackage@0dacfd662c64cb4ceb16e6cf65a157a8b715b979) - "### + " ); - uv_snapshot!(context.pip_list().arg("--outdated"), @r###" + uv_snapshot!(context.pip_list().arg("--outdated"), @" success: true exit_code: 0 ----- stdout ----- @@ -229,7 +229,7 @@ fn list_outdated_git() -> Result<()> { iniconfig 1.0.0 2.0.0 wheel ----- stderr ----- - "### + " ); Ok(()) @@ -246,7 +246,7 @@ fn list_outdated_index() -> Result<()> { uv_snapshot!(context.pip_install() .arg("-r") .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -258,13 +258,13 @@ fn list_outdated_index() -> Result<()> { + anyio==3.0.0 + idna==3.6 + sniffio==1.3.1 - "### + " ); uv_snapshot!(context.pip_list() .arg("--outdated") .arg("--index-url") - .arg("https://test.pypi.org/simple"), @r###" + .arg("https://test.pypi.org/simple"), @" success: true exit_code: 0 ----- stdout ----- @@ -273,7 +273,7 @@ fn list_outdated_index() -> Result<()> { anyio 3.0.0 3.5.0 wheel ----- stderr ----- - "### + " ); Ok(()) @@ -287,7 +287,7 @@ fn list_editable() { // Install the editable package. uv_snapshot!(context.filters(), context.pip_install() .arg("-e") - .arg(context.workspace_root.join("test/packages/poetry_editable")), @r###" + .arg(context.workspace_root.join("test/packages/poetry_editable")), @" success: true exit_code: 0 ----- stdout ----- @@ -300,7 +300,7 @@ fn list_editable() { + idna==3.6 + poetry-editable==0.1.0 (from file://[WORKSPACE]/test/packages/poetry_editable) + sniffio==1.3.1 - "### + " ); let filters = context @@ -309,7 +309,7 @@ fn list_editable() { .chain(vec![(r"\-\-\-\-\-\-+.*", "[UNDERLINE]"), (" +", " ")]) .collect::>(); - uv_snapshot!(filters, context.pip_list(), @r###" + uv_snapshot!(filters, context.pip_list(), @" success: true exit_code: 0 ----- stdout ----- @@ -321,7 +321,7 @@ fn list_editable() { sniffio 1.3.1 ----- stderr ----- - "### + " ); } @@ -333,7 +333,7 @@ fn list_editable_only() { // Install the editable package. uv_snapshot!(context.filters(), context.pip_install() .arg("-e") - .arg(context.workspace_root.join("test/packages/poetry_editable")), @r###" + .arg(context.workspace_root.join("test/packages/poetry_editable")), @" success: true exit_code: 0 ----- stdout ----- @@ -346,7 +346,7 @@ fn list_editable_only() { + idna==3.6 + poetry-editable==0.1.0 (from file://[WORKSPACE]/test/packages/poetry_editable) + sniffio==1.3.1 - "### + " ); let filters = context @@ -356,7 +356,7 @@ fn list_editable_only() { .collect::>(); uv_snapshot!(filters, context.pip_list() - .arg("--editable"), @r###" + .arg("--editable"), @" success: true exit_code: 0 ----- stdout ----- @@ -365,11 +365,11 @@ fn list_editable_only() { poetry-editable 0.1.0 [WORKSPACE]/test/packages/poetry_editable ----- stderr ----- - "### + " ); uv_snapshot!(filters, context.pip_list() - .arg("--exclude-editable"), @r###" + .arg("--exclude-editable"), @" success: true exit_code: 0 ----- stdout ----- @@ -380,12 +380,12 @@ fn list_editable_only() { sniffio 1.3.1 ----- stderr ----- - "### + " ); uv_snapshot!(filters, context.pip_list() .arg("--editable") - .arg("--exclude-editable"), @r###" + .arg("--exclude-editable"), @" success: false exit_code: 2 ----- stdout ----- @@ -396,7 +396,7 @@ fn list_editable_only() { Usage: uv pip list --cache-dir [CACHE_DIR] --editable --exclude-newer For more information, try '--help'. - "### + " ); } @@ -408,7 +408,7 @@ fn list_exclude() { // Install the editable package. uv_snapshot!(context.filters(), context.pip_install() .arg("-e") - .arg(context.workspace_root.join("test/packages/poetry_editable")), @r###" + .arg(context.workspace_root.join("test/packages/poetry_editable")), @" success: true exit_code: 0 ----- stdout ----- @@ -421,7 +421,7 @@ fn list_exclude() { + idna==3.6 + poetry-editable==0.1.0 (from file://[WORKSPACE]/test/packages/poetry_editable) + sniffio==1.3.1 - "### + " ); let filters = context @@ -432,7 +432,7 @@ fn list_exclude() { uv_snapshot!(filters, context.pip_list() .arg("--exclude") - .arg("numpy"), @r###" + .arg("numpy"), @" success: true exit_code: 0 ----- stdout ----- @@ -444,12 +444,12 @@ fn list_exclude() { sniffio 1.3.1 ----- stderr ----- - "### + " ); uv_snapshot!(filters, context.pip_list() .arg("--exclude") - .arg("poetry-editable"), @r###" + .arg("poetry-editable"), @" success: true exit_code: 0 ----- stdout ----- @@ -460,14 +460,14 @@ fn list_exclude() { sniffio 1.3.1 ----- stderr ----- - "### + " ); uv_snapshot!(filters, context.pip_list() .arg("--exclude") .arg("numpy") .arg("--exclude") - .arg("poetry-editable"), @r###" + .arg("poetry-editable"), @" success: true exit_code: 0 ----- stdout ----- @@ -478,7 +478,7 @@ fn list_exclude() { sniffio 1.3.1 ----- stderr ----- - "### + " ); } @@ -491,7 +491,7 @@ fn list_format_json() { // Install the editable package. uv_snapshot!(context.filters(), context.pip_install() .arg("-e") - .arg(context.workspace_root.join("test/packages/poetry_editable")), @r###" + .arg(context.workspace_root.join("test/packages/poetry_editable")), @" success: true exit_code: 0 ----- stdout ----- @@ -504,7 +504,7 @@ fn list_format_json() { + idna==3.6 + poetry-editable==0.1.0 (from file://[WORKSPACE]/test/packages/poetry_editable) + sniffio==1.3.1 - "### + " ); let filters: Vec<_> = context @@ -514,38 +514,38 @@ fn list_format_json() { .collect(); uv_snapshot!(filters, context.pip_list() - .arg("--format=json"), @r###" + .arg("--format=json"), @r#" success: true exit_code: 0 ----- stdout ----- [{"name":"anyio","version":"4.3.0"},{"name":"idna","version":"3.6"},{"name":"poetry-editable","version":"0.1.0","editable_project_location":"[WORKSPACE]/test/packages/poetry_editable"},{"name":"sniffio","version":"1.3.1"}] ----- stderr ----- - "### + "# ); uv_snapshot!(filters, context.pip_list() .arg("--format=json") - .arg("--editable"), @r###" + .arg("--editable"), @r#" success: true exit_code: 0 ----- stdout ----- [{"name":"poetry-editable","version":"0.1.0","editable_project_location":"[WORKSPACE]/test/packages/poetry_editable"}] ----- stderr ----- - "### + "# ); uv_snapshot!(filters, context.pip_list() .arg("--format=json") - .arg("--exclude-editable"), @r###" + .arg("--exclude-editable"), @r#" success: true exit_code: 0 ----- stdout ----- [{"name":"anyio","version":"4.3.0"},{"name":"idna","version":"3.6"},{"name":"sniffio","version":"1.3.1"}] ----- stderr ----- - "### + "# ); } @@ -558,7 +558,7 @@ fn list_format_freeze() { uv_snapshot!(context.filters(), context .pip_install() .arg("-e") - .arg(context.workspace_root.join("test/packages/poetry_editable")), @r###" + .arg(context.workspace_root.join("test/packages/poetry_editable")), @" success: true exit_code: 0 ----- stdout ----- @@ -571,7 +571,7 @@ fn list_format_freeze() { + idna==3.6 + poetry-editable==0.1.0 (from file://[WORKSPACE]/test/packages/poetry_editable) + sniffio==1.3.1 - "### + " ); let filters = context @@ -581,7 +581,7 @@ fn list_format_freeze() { .collect::>(); uv_snapshot!(filters, context.pip_list() - .arg("--format=freeze"), @r###" + .arg("--format=freeze"), @" success: true exit_code: 0 ----- stdout ----- @@ -591,24 +591,24 @@ fn list_format_freeze() { sniffio==1.3.1 ----- stderr ----- - "### + " ); uv_snapshot!(filters, context.pip_list() .arg("--format=freeze") - .arg("--editable"), @r###" + .arg("--editable"), @" success: true exit_code: 0 ----- stdout ----- poetry-editable==0.1.0 ----- stderr ----- - "### + " ); uv_snapshot!(filters, context.pip_list() .arg("--format=freeze") - .arg("--exclude-editable"), @r###" + .arg("--exclude-editable"), @" success: true exit_code: 0 ----- stdout ----- @@ -617,7 +617,7 @@ fn list_format_freeze() { sniffio==1.3.1 ----- stderr ----- - "### + " ); } @@ -658,7 +658,7 @@ Version: 0.22.0 .collect::>(); uv_snapshot!(filters, context.pip_list() - .arg("--editable"), @r###" + .arg("--editable"), @" success: true exit_code: 0 ----- stdout ----- @@ -667,7 +667,7 @@ Version: 0.22.0 zstandard 0.22.0 [TEMP_DIR]/zstandard_project ----- stderr ----- - "### + " ); Ok(()) @@ -701,7 +701,7 @@ Version: 0.1-bulbasaur .collect::>(); uv_snapshot!(filters, context.pip_list() - .arg("--editable"), @r###" + .arg("--editable"), @" success: false exit_code: 2 ----- stdout ----- @@ -709,7 +709,7 @@ Version: 0.1-bulbasaur ----- stderr ----- error: Failed to read metadata from: `[SITE_PACKAGES]/paramiko.egg-link` Caused by: after parsing `0.1-b`, found `ulbasaur`, which is not part of a valid version - "### + " ); Ok(()) @@ -724,7 +724,7 @@ fn list_ignores_quiet_flag_format_freeze() { uv_snapshot!(context.filters(), context .pip_install() .arg("-e") - .arg(context.workspace_root.join("test/packages/poetry_editable")), @r###" + .arg(context.workspace_root.join("test/packages/poetry_editable")), @" success: true exit_code: 0 ----- stdout ----- @@ -737,7 +737,7 @@ fn list_ignores_quiet_flag_format_freeze() { + idna==3.6 + poetry-editable==0.1.0 (from file://[WORKSPACE]/test/packages/poetry_editable) + sniffio==1.3.1 - "### + " ); let filters = context @@ -748,7 +748,7 @@ fn list_ignores_quiet_flag_format_freeze() { uv_snapshot!(filters, context.pip_list() .arg("--format=freeze") - .arg("--quiet"), @r###" + .arg("--quiet"), @" success: true exit_code: 0 ----- stdout ----- @@ -758,26 +758,26 @@ fn list_ignores_quiet_flag_format_freeze() { sniffio==1.3.1 ----- stderr ----- - "### + " ); uv_snapshot!(filters, context.pip_list() .arg("--format=freeze") .arg("--editable") - .arg("--quiet"), @r###" + .arg("--quiet"), @" success: true exit_code: 0 ----- stdout ----- poetry-editable==0.1.0 ----- stderr ----- - "### + " ); uv_snapshot!(filters, context.pip_list() .arg("--format=freeze") .arg("--exclude-editable") - .arg("--quiet"), @r###" + .arg("--quiet"), @" success: true exit_code: 0 ----- stdout ----- @@ -786,7 +786,7 @@ fn list_ignores_quiet_flag_format_freeze() { sniffio==1.3.1 ----- stderr ----- - "### + " ); } @@ -813,7 +813,7 @@ fn list_target() -> Result<()> { // List packages in the target directory. uv_snapshot!(context.filters(), context.pip_list() .arg("--target") - .arg(target.path()), @r###" + .arg(target.path()), @" success: true exit_code: 0 ----- stdout ----- @@ -823,17 +823,17 @@ fn list_target() -> Result<()> { tomli 2.0.1 ----- stderr ----- - "### + " ); // Without --target, the packages should not be visible. - uv_snapshot!(context.pip_list(), @r###" + uv_snapshot!(context.pip_list(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- - "### + " ); Ok(()) @@ -862,7 +862,7 @@ fn list_prefix() -> Result<()> { // List packages in the prefix directory. uv_snapshot!(context.filters(), context.pip_list() .arg("--prefix") - .arg(prefix.path()), @r###" + .arg(prefix.path()), @" success: true exit_code: 0 ----- stdout ----- @@ -872,17 +872,17 @@ fn list_prefix() -> Result<()> { tomli 2.0.1 ----- stderr ----- - "### + " ); // Without --prefix, the packages should not be visible. - uv_snapshot!(context.pip_list(), @r###" + uv_snapshot!(context.pip_list(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- - "### + " ); Ok(()) diff --git a/crates/uv/tests/it/pip_show.rs b/crates/uv/tests/it/pip_show.rs index 1ff30025d..bbe6bfa2b 100644 --- a/crates/uv/tests/it/pip_show.rs +++ b/crates/uv/tests/it/pip_show.rs @@ -14,14 +14,14 @@ use crate::common::{TestContext, uv_snapshot}; fn show_empty() { let context = TestContext::new("3.12"); - uv_snapshot!(context.pip_show(), @r###" + uv_snapshot!(context.pip_show(), @" success: false exit_code: 1 ----- stdout ----- ----- stderr ----- warning: Please provide a package name or names. - "### + " ); } @@ -37,7 +37,7 @@ fn show_requires_multiple() -> Result<()> { .pip_install() .arg("-r") .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -51,12 +51,12 @@ fn show_requires_multiple() -> Result<()> { + idna==3.6 + requests==2.31.0 + urllib3==2.2.1 - "### + " ); context.assert_command("import requests").success(); uv_snapshot!(context.filters(), context.pip_show() - .arg("requests"), @r###" + .arg("requests"), @" success: true exit_code: 0 ----- stdout ----- @@ -67,7 +67,7 @@ fn show_requires_multiple() -> Result<()> { Required-by: ----- stderr ----- - "### + " ); Ok(()) @@ -87,7 +87,7 @@ fn show_python_version_marker() -> Result<()> { .pip_install() .arg("-r") .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -97,7 +97,7 @@ fn show_python_version_marker() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + click==8.1.7 - "### + " ); context.assert_command("import click").success(); @@ -108,7 +108,7 @@ fn show_python_version_marker() -> Result<()> { } uv_snapshot!(filters, context.pip_show() - .arg("click"), @r###" + .arg("click"), @" success: true exit_code: 0 ----- stdout ----- @@ -119,7 +119,7 @@ fn show_python_version_marker() -> Result<()> { Required-by: ----- stderr ----- - "### + " ); Ok(()) @@ -137,7 +137,7 @@ fn show_found_single_package() -> Result<()> { .pip_install() .arg("-r") .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -147,13 +147,13 @@ fn show_found_single_package() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + markupsafe==2.1.3 - "### + " ); context.assert_command("import markupsafe").success(); uv_snapshot!(context.filters(), context.pip_show() - .arg("markupsafe"), @r###" + .arg("markupsafe"), @" success: true exit_code: 0 ----- stdout ----- @@ -164,7 +164,7 @@ fn show_found_single_package() -> Result<()> { Required-by: ----- stderr ----- - "### + " ); Ok(()) @@ -186,7 +186,7 @@ fn show_found_multiple_packages() -> Result<()> { .pip_install() .arg("-r") .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -197,14 +197,14 @@ fn show_found_multiple_packages() -> Result<()> { Installed 2 packages in [TIME] + markupsafe==2.1.3 + pip==21.3.1 - "### + " ); context.assert_command("import markupsafe").success(); uv_snapshot!(context.filters(), context.pip_show() .arg("markupsafe") - .arg("pip"), @r###" + .arg("pip"), @" success: true exit_code: 0 ----- stdout ----- @@ -221,7 +221,7 @@ fn show_found_multiple_packages() -> Result<()> { Required-by: ----- stderr ----- - "### + " ); Ok(()) @@ -243,7 +243,7 @@ fn show_found_one_out_of_three() -> Result<()> { .pip_install() .arg("-r") .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -254,7 +254,7 @@ fn show_found_one_out_of_three() -> Result<()> { Installed 2 packages in [TIME] + markupsafe==2.1.3 + pip==21.3.1 - "### + " ); context.assert_command("import markupsafe").success(); @@ -262,7 +262,7 @@ fn show_found_one_out_of_three() -> Result<()> { uv_snapshot!(context.filters(), context.pip_show() .arg("markupsafe") .arg("flask") - .arg("django"), @r###" + .arg("django"), @" success: true exit_code: 0 ----- stdout ----- @@ -274,7 +274,7 @@ fn show_found_one_out_of_three() -> Result<()> { ----- stderr ----- warning: Package(s) not found for: django, flask - "### + " ); Ok(()) @@ -296,7 +296,7 @@ fn show_found_one_out_of_two_quiet() -> Result<()> { .pip_install() .arg("-r") .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -307,7 +307,7 @@ fn show_found_one_out_of_two_quiet() -> Result<()> { Installed 2 packages in [TIME] + markupsafe==2.1.3 + pip==21.3.1 - "### + " ); context.assert_command("import markupsafe").success(); @@ -316,13 +316,13 @@ fn show_found_one_out_of_two_quiet() -> Result<()> { uv_snapshot!(context.pip_show() .arg("markupsafe") .arg("flask") - .arg("--quiet"), @r###" + .arg("--quiet"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- - "### + " ); Ok(()) @@ -344,7 +344,7 @@ fn show_empty_quiet() -> Result<()> { .pip_install() .arg("-r") .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -355,7 +355,7 @@ fn show_empty_quiet() -> Result<()> { Installed 2 packages in [TIME] + markupsafe==2.1.3 + pip==21.3.1 - "### + " ); context.assert_command("import markupsafe").success(); @@ -363,13 +363,13 @@ fn show_empty_quiet() -> Result<()> { // Flask isn't installed, so the command should fail. uv_snapshot!(context.pip_show() .arg("flask") - .arg("--quiet"), @r###" + .arg("--quiet"), @" success: false exit_code: 1 ----- stdout ----- ----- stderr ----- - "### + " ); Ok(()) @@ -394,7 +394,7 @@ fn show_editable() -> Result<()> { .success(); uv_snapshot!(context.filters(), context.pip_show() - .arg("poetry-editable"), @r###" + .arg("poetry-editable"), @" success: true exit_code: 0 ----- stdout ----- @@ -406,7 +406,7 @@ fn show_editable() -> Result<()> { Required-by: ----- stderr ----- - "### + " ); Ok(()) @@ -428,7 +428,7 @@ fn show_required_by_multiple() -> Result<()> { .pip_install() .arg("-r") .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -444,14 +444,14 @@ fn show_required_by_multiple() -> Result<()> { + requests==2.31.0 + sniffio==1.3.1 + urllib3==2.2.1 - "### + " ); context.assert_command("import requests").success(); // idna is required by anyio and requests uv_snapshot!(context.filters(), context.pip_show() - .arg("idna"), @r###" + .arg("idna"), @" success: true exit_code: 0 ----- stdout ----- @@ -462,7 +462,7 @@ fn show_required_by_multiple() -> Result<()> { Required-by: anyio, requests ----- stderr ----- - "### + " ); Ok(()) @@ -476,7 +476,7 @@ fn show_files() { uv_snapshot!(context .pip_install() .arg("requests==2.31.0") - .arg("--strict"), @r#" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -490,12 +490,12 @@ fn show_files() { + idna==3.6 + requests==2.31.0 + urllib3==2.2.1 - "# + " ); // Windows has a different files order. #[cfg(not(windows))] - uv_snapshot!(context.filters(), context.pip_show().arg("requests").arg("--files"), @r#" + uv_snapshot!(context.filters(), context.pip_show().arg("requests").arg("--files"), @" success: true exit_code: 0 ----- stdout ----- @@ -532,7 +532,7 @@ fn show_files() { requests/utils.py ----- stderr ----- - "#); + "); } #[test] @@ -559,7 +559,7 @@ fn show_target() -> Result<()> { uv_snapshot!(context.filters(), context.pip_show() .arg("markupsafe") .arg("--target") - .arg(target.path()), @r###" + .arg(target.path()), @" success: true exit_code: 0 ----- stdout ----- @@ -570,18 +570,18 @@ fn show_target() -> Result<()> { Required-by: ----- stderr ----- - "### + " ); // Without --target, the package should not be found. - uv_snapshot!(context.pip_show().arg("markupsafe"), @r###" + uv_snapshot!(context.pip_show().arg("markupsafe"), @" success: false exit_code: 1 ----- stdout ----- ----- stderr ----- warning: Package(s) not found for: markupsafe - "### + " ); Ok(()) @@ -611,7 +611,7 @@ fn show_prefix() -> Result<()> { uv_snapshot!(context.filters(), context.pip_show() .arg("markupsafe") .arg("--prefix") - .arg(prefix.path()), @r###" + .arg(prefix.path()), @" success: true exit_code: 0 ----- stdout ----- @@ -622,18 +622,18 @@ fn show_prefix() -> Result<()> { Required-by: ----- stderr ----- - "### + " ); // Without --prefix, the package should not be found. - uv_snapshot!(context.pip_show().arg("markupsafe"), @r###" + uv_snapshot!(context.pip_show().arg("markupsafe"), @" success: false exit_code: 1 ----- stdout ----- ----- stderr ----- warning: Package(s) not found for: markupsafe - "### + " ); Ok(()) diff --git a/crates/uv/tests/it/pip_sync.rs b/crates/uv/tests/it/pip_sync.rs index 17c5caf8e..62828bb90 100644 --- a/crates/uv/tests/it/pip_sync.rs +++ b/crates/uv/tests/it/pip_sync.rs @@ -21,14 +21,14 @@ fn missing_requirements_txt() { uv_snapshot!(context.pip_sync() .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: File not found: `requirements.txt` - "###); + "); requirements_txt.assert(predicates::path::missing()); } @@ -43,7 +43,7 @@ fn missing_venv() -> Result<()> { requirements.write_str("anyio")?; fs::remove_dir_all(&context.venv)?; - uv_snapshot!(context.filters(), context.pip_sync().arg("requirements.txt"), @r" + uv_snapshot!(context.filters(), context.pip_sync().arg("requirements.txt"), @" success: false exit_code: 2 ----- stdout ----- @@ -56,7 +56,7 @@ fn missing_venv() -> Result<()> { assert!(predicates::path::missing().eval(&context.venv)); // If not "active", we hint to create one - uv_snapshot!(context.filters(), context.pip_sync().arg("requirements.txt").env_remove(EnvVars::VIRTUAL_ENV), @r" + uv_snapshot!(context.filters(), context.pip_sync().arg("requirements.txt").env_remove(EnvVars::VIRTUAL_ENV), @" success: false exit_code: 2 ----- stdout ----- @@ -76,14 +76,14 @@ fn missing_system() -> Result<()> { let requirements = context.temp_dir.child("requirements.txt"); requirements.write_str("anyio")?; - uv_snapshot!(context.filters(), context.pip_sync().arg("requirements.txt").arg("--system"), @r###" + uv_snapshot!(context.filters(), context.pip_sync().arg("requirements.txt").arg("--system"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: No system Python installation found - "###); + "); Ok(()) } @@ -99,7 +99,7 @@ fn install() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -109,7 +109,7 @@ fn install() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + markupsafe==2.1.3 - "### + " ); // Counterpart for the `compile()` test. @@ -148,7 +148,7 @@ fn install_copy() -> Result<()> { .arg("requirements.txt") .arg("--link-mode") .arg("copy") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -158,7 +158,7 @@ fn install_copy() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + markupsafe==2.1.3 - "### + " ); context @@ -187,7 +187,7 @@ fn install_hardlink() -> Result<()> { .arg("requirements.txt") .arg("--link-mode") .arg("hardlink") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -197,7 +197,7 @@ fn install_hardlink() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + markupsafe==2.1.3 - "### + " ); context @@ -227,7 +227,7 @@ fn install_symlink() -> Result<()> { .arg("requirements.txt") .arg("--link-mode") .arg("symlink") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -237,7 +237,7 @@ fn install_symlink() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + markupsafe==2.1.3 - "### + " ); context @@ -267,7 +267,7 @@ fn install_symlink_no_cache() -> Result<()> { .arg("--link-mode") .arg("symlink") .arg("--no-cache") - .arg("--strict"), @r###" + .arg("--strict"), @" success: false exit_code: 2 ----- stdout ----- @@ -276,7 +276,7 @@ fn install_symlink_no_cache() -> Result<()> { Resolved 1 package in [TIME] Prepared 1 package in [TIME] error: Symlink-based installation is not supported with `--no-cache`. The created environment will be rendered unusable by the removal of the cache. - "### + " ); Ok(()) @@ -292,7 +292,7 @@ fn install_many() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -303,7 +303,7 @@ fn install_many() -> Result<()> { Installed 2 packages in [TIME] + markupsafe==2.1.3 + tomli==2.0.1 - "### + " ); context @@ -330,7 +330,7 @@ fn noop() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -338,7 +338,7 @@ fn noop() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] Audited 1 package in [TIME] - "### + " ); context @@ -357,7 +357,7 @@ fn pip_sync_empty() -> Result<()> { requirements_txt.touch()?; uv_snapshot!(context.pip_sync() - .arg("requirements.txt"), @r###" + .arg("requirements.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -365,12 +365,12 @@ fn pip_sync_empty() -> Result<()> { ----- stderr ----- warning: Requirements file `requirements.txt` does not contain any dependencies No requirements found (hint: use `--allow-empty-requirements` to clear the environment) - "### + " ); uv_snapshot!(context.pip_sync() .arg("requirements.txt") - .arg("--allow-empty-requirements"), @r###" + .arg("--allow-empty-requirements"), @" success: true exit_code: 0 ----- stdout ----- @@ -379,7 +379,7 @@ fn pip_sync_empty() -> Result<()> { warning: Requirements file `requirements.txt` does not contain any dependencies Resolved in [TIME] Audited in [TIME] - "### + " ); // Install a package. @@ -394,7 +394,7 @@ fn pip_sync_empty() -> Result<()> { requirements_txt.write_str("")?; uv_snapshot!(context.pip_sync() .arg("requirements.txt") - .arg("--allow-empty-requirements"), @r###" + .arg("--allow-empty-requirements"), @" success: true exit_code: 0 ----- stdout ----- @@ -404,7 +404,7 @@ fn pip_sync_empty() -> Result<()> { Resolved in [TIME] Uninstalled 1 package in [TIME] - iniconfig==2.0.0 - "### + " ); Ok(()) @@ -435,7 +435,7 @@ fn link() -> Result<()> { uv_snapshot!(cmd .arg(requirements_txt.path()) - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -444,7 +444,7 @@ fn link() -> Result<()> { Resolved 1 package in [TIME] Installed 1 package in [TIME] + iniconfig==2.0.0 - "### + " ); context2 @@ -479,7 +479,7 @@ fn add_remove() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -491,7 +491,7 @@ fn add_remove() -> Result<()> { Installed 1 package in [TIME] - iniconfig==2.0.0 + tomli==2.0.1 - "### + " ); context.assert_command("import tomli").success(); @@ -521,7 +521,7 @@ fn install_sequential() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -531,7 +531,7 @@ fn install_sequential() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + tomli==2.0.1 - "### + " ); context @@ -562,7 +562,7 @@ fn upgrade() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -574,7 +574,7 @@ fn upgrade() -> Result<()> { Installed 1 package in [TIME] - tomli==2.0.0 + tomli==2.0.1 - "### + " ); context.assert_command("import tomli").success(); @@ -592,7 +592,7 @@ fn install_url() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -602,7 +602,7 @@ fn install_url() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + werkzeug==2.0.0 (from https://files.pythonhosted.org/packages/ff/1d/960bb4017c68674a1cb099534840f18d3def3ce44aed12b5ed8b78e0153e/Werkzeug-2.0.0-py3-none-any.whl) - "### + " ); context.assert_command("import werkzeug").success(); @@ -621,7 +621,7 @@ fn install_git_commit() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -631,7 +631,7 @@ fn install_git_commit() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + uv-public-pypackage==0.1.0 (from git+https://github.com/astral-test/uv-public-pypackage@b270df1a2fb5d012294e9aaf05e7e0bab1e6a389) - "### + " ); context @@ -654,7 +654,7 @@ fn install_git_tag() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -664,7 +664,7 @@ fn install_git_tag() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + uv-public-pypackage==0.1.0 (from git+https://github.com/astral-test/uv-public-pypackage@0dacfd662c64cb4ceb16e6cf65a157a8b715b979) - "### + " ); context @@ -685,7 +685,7 @@ fn install_git_subdirectories() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -696,7 +696,7 @@ fn install_git_subdirectories() -> Result<()> { Installed 2 packages in [TIME] + example-pkg-a==1 (from git+https://github.com/pypa/sample-namespace-packages.git@df7530eeb8fa0cb7dbb8ecb28363e8e36bfa2f45#subdirectory=pkg_resources/pkg_a) + example-pkg-b==1 (from git+https://github.com/pypa/sample-namespace-packages.git@df7530eeb8fa0cb7dbb8ecb28363e8e36bfa2f45#subdirectory=pkg_resources/pkg_b) - "### + " ); context.assert_command("import example_pkg").success(); @@ -716,7 +716,7 @@ fn install_sdist() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -726,7 +726,7 @@ fn install_sdist() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + source-distribution==0.0.1 - "### + " ); context @@ -746,7 +746,7 @@ fn install_sdist_url() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -756,7 +756,7 @@ fn install_sdist_url() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + source-distribution==0.0.1 (from https://files.pythonhosted.org/packages/10/1f/57aa4cce1b1abf6b433106676e15f9fa2c92ed2bd4cf77c3b50a9e9ac773/source_distribution-0.0.1.tar.gz) - "### + " ); context @@ -782,7 +782,7 @@ fn install_sdist_archive_type_bz2() -> Result<()> { uv_snapshot!(context.filters(), context.pip_sync() .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -792,7 +792,7 @@ fn install_sdist_archive_type_bz2() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + bz2==1.0.0 (from file://[WORKSPACE]/test/links/bz2-1.0.0.tar.bz2) - "### + " ); Ok(()) @@ -816,7 +816,7 @@ fn install_url_then_install_url() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -824,7 +824,7 @@ fn install_url_then_install_url() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] Audited 1 package in [TIME] - "### + " ); context.assert_command("import werkzeug").success(); @@ -853,7 +853,7 @@ fn install_url_then_install_version() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -861,7 +861,7 @@ fn install_url_then_install_version() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] Audited 1 package in [TIME] - "### + " ); context.assert_command("import werkzeug").success(); @@ -890,7 +890,7 @@ fn install_version_then_install_url() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -902,7 +902,7 @@ fn install_version_then_install_url() -> Result<()> { Installed 1 package in [TIME] - werkzeug==2.0.0 + werkzeug==2.0.0 (from https://files.pythonhosted.org/packages/ff/1d/960bb4017c68674a1cb099534840f18d3def3ce44aed12b5ed8b78e0153e/Werkzeug-2.0.0-py3-none-any.whl) - "### + " ); context.assert_command("import werkzeug").success(); @@ -922,7 +922,7 @@ fn install_numpy_py38() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -932,7 +932,7 @@ fn install_numpy_py38() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + numpy==1.24.4 - "### + " ); context.assert_command("import numpy").success(); @@ -951,7 +951,7 @@ fn install_no_index() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.txt") .arg("--no-index") - .arg("--strict"), @r###" + .arg("--strict"), @" success: false exit_code: 1 ----- stdout ----- @@ -961,7 +961,7 @@ fn install_no_index() -> Result<()> { ╰─▶ Because iniconfig was not found in the provided package locations and you require iniconfig==2.0.0, we can conclude that your requirements are unsatisfiable. hint: Packages were unavailable because index lookups were disabled and no additional package locations were provided (try: `--find-links `) - "### + " ); context.assert_command("import iniconfig").failure(); @@ -980,7 +980,7 @@ fn install_no_index_cached() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -990,7 +990,7 @@ fn install_no_index_cached() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + iniconfig==2.0.0 - "### + " ); context.assert_command("import iniconfig").success(); @@ -1000,7 +1000,7 @@ fn install_no_index_cached() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.txt") .arg("--no-index") - .arg("--strict"), @r###" + .arg("--strict"), @" success: false exit_code: 1 ----- stdout ----- @@ -1010,7 +1010,7 @@ fn install_no_index_cached() -> Result<()> { ╰─▶ Because iniconfig was not found in the provided package locations and you require iniconfig==2.0.0, we can conclude that your requirements are unsatisfiable. hint: Packages were unavailable because index lookups were disabled and no additional package locations were provided (try: `--find-links `) - "### + " ); context.assert_command("import iniconfig").failure(); @@ -1028,7 +1028,7 @@ fn warn_on_yanked() -> Result<()> { uv_snapshot!(context.filters(), windows_filters=false, context.pip_sync() .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @r#" success: true exit_code: 0 ----- stdout ----- @@ -1039,7 +1039,7 @@ fn warn_on_yanked() -> Result<()> { Installed 1 package in [TIME] + colorama==0.4.2 warning: `colorama==0.4.2` is yanked (reason: "Bad build, missing files, will not install") - "### + "# ); Ok(()) @@ -1056,7 +1056,7 @@ fn warn_on_yanked_dry_run() -> Result<()> { uv_snapshot!(context.filters(), windows_filters=false, context.pip_sync() .arg("requirements.txt") .arg("--dry-run") - .arg("--strict"), @r###" + .arg("--strict"), @r#" success: true exit_code: 0 ----- stdout ----- @@ -1067,7 +1067,7 @@ fn warn_on_yanked_dry_run() -> Result<()> { Would install 1 package + colorama==0.4.2 warning: `colorama==0.4.2` is yanked (reason: "Bad build, missing files, will not install") - "### + "# ); Ok(()) @@ -1093,7 +1093,7 @@ fn install_local_wheel() -> Result<()> { uv_snapshot!(context.filters(), context.pip_sync() .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -1103,7 +1103,7 @@ fn install_local_wheel() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + tomli==2.0.1 (from file://[TEMP_DIR]/tomli-2.0.1-py3-none-any.whl) - "### + " ); context.assert_command("import tomli").success(); @@ -1115,7 +1115,7 @@ fn install_local_wheel() -> Result<()> { uv_snapshot!(context.filters(), context.pip_sync() .arg("requirements.txt") .arg("--strict") - , @r###" + , @" success: true exit_code: 0 ----- stdout ----- @@ -1124,7 +1124,7 @@ fn install_local_wheel() -> Result<()> { Resolved 1 package in [TIME] Installed 1 package in [TIME] + tomli==2.0.1 (from file://[TEMP_DIR]/tomli-2.0.1-py3-none-any.whl) - "### + " ); context.assert_command("import tomli").success(); @@ -1140,7 +1140,7 @@ fn install_local_wheel() -> Result<()> { uv_snapshot!(context.filters(), context.pip_sync() .arg("requirements.txt") .arg("--strict") - , @r###" + , @" success: true exit_code: 0 ----- stdout ----- @@ -1150,7 +1150,7 @@ fn install_local_wheel() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + tomli==2.0.1 (from file://[TEMP_DIR]/tomli-2.0.1-py3-none-any.whl) - "### + " ); context.assert_command("import tomli").success(); @@ -1161,7 +1161,7 @@ fn install_local_wheel() -> Result<()> { // Reinstall into the same virtual environment. The wheel should be reinstalled. uv_snapshot!(context.filters(), context.pip_sync() .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -1172,13 +1172,13 @@ fn install_local_wheel() -> Result<()> { Uninstalled 1 package in [TIME] Installed 1 package in [TIME] ~ tomli==2.0.1 (from file://[TEMP_DIR]/tomli-2.0.1-py3-none-any.whl) - "### + " ); // Reinstall into the same virtual environment. The wheel should _not_ be reinstalled. uv_snapshot!(context.filters(), context.pip_sync() .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -1186,7 +1186,7 @@ fn install_local_wheel() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] Audited 1 package in [TIME] - "### + " ); context.assert_command("import tomli").success(); @@ -1197,7 +1197,7 @@ fn install_local_wheel() -> Result<()> { uv_snapshot!(context.filters(), context.pip_sync() .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -1205,7 +1205,7 @@ fn install_local_wheel() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] Audited 1 package in [TIME] - "### + " ); context.assert_command("import tomli").success(); @@ -1233,7 +1233,7 @@ fn mismatched_version() -> Result<()> { uv_snapshot!(context.filters(), context.pip_sync() .arg("requirements.txt") - .arg("--strict"), @r" + .arg("--strict"), @" success: false exit_code: 2 ----- stdout ----- @@ -1249,7 +1249,7 @@ fn mismatched_version() -> Result<()> { uv_snapshot!(context.filters(), context.pip_sync() .arg("requirements.txt") .arg("--strict") - .env(EnvVars::UV_SKIP_WHEEL_FILENAME_CHECK, "1"), @r" + .env(EnvVars::UV_SKIP_WHEEL_FILENAME_CHECK, "1"), @" success: true exit_code: 0 ----- stdout ----- @@ -1284,7 +1284,7 @@ fn mismatched_name() -> Result<()> { uv_snapshot!(context.filters(), context.pip_sync() .arg("requirements.txt") - .arg("--strict"), @r" + .arg("--strict"), @" success: false exit_code: 1 ----- stdout ----- @@ -1321,7 +1321,7 @@ fn install_local_source_distribution() -> Result<()> { uv_snapshot!(context.filters(), context.pip_sync() .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -1331,7 +1331,7 @@ fn install_local_source_distribution() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + wheel==0.42.0 (from file://[TEMP_DIR]/wheel-0.42.0.tar.gz) - "### + " ); context.assert_command("import wheel").success(); @@ -1360,7 +1360,7 @@ fn install_build_system_no_backend() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -1370,7 +1370,7 @@ fn install_build_system_no_backend() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + build-system-no-backend==0.1.0 (from https://files.pythonhosted.org/packages/ec/25/1e531108ca027dc3a3b37d351f4b86d811df4884c6a81cd99e73b8b589f5/build-system-no-backend-0.1.0.tar.gz) - "### + " ); context @@ -1390,7 +1390,7 @@ fn install_url_source_dist_cached() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -1400,7 +1400,7 @@ fn install_url_source_dist_cached() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + source-distribution==0.0.1 (from https://files.pythonhosted.org/packages/10/1f/57aa4cce1b1abf6b433106676e15f9fa2c92ed2bd4cf77c3b50a9e9ac773/source_distribution-0.0.1.tar.gz) - "### + " ); context @@ -1413,7 +1413,7 @@ fn install_url_source_dist_cached() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.txt") .arg("--strict") - , @r###" + , @" success: true exit_code: 0 ----- stdout ----- @@ -1422,7 +1422,7 @@ fn install_url_source_dist_cached() -> Result<()> { Resolved 1 package in [TIME] Installed 1 package in [TIME] + source-distribution==0.0.1 (from https://files.pythonhosted.org/packages/10/1f/57aa4cce1b1abf6b433106676e15f9fa2c92ed2bd4cf77c3b50a9e9ac773/source_distribution-0.0.1.tar.gz) - "### + " ); context @@ -1437,20 +1437,20 @@ fn install_url_source_dist_cached() -> Result<()> { .collect::>(); uv_snapshot!( filters, - context.clean().arg("source_distribution"), @r###" + context.clean().arg("source_distribution"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Removed [N] files ([SIZE]) - "### + " ); uv_snapshot!(context.pip_sync() .arg("requirements.txt") .arg("--strict") - , @r###" + , @" success: true exit_code: 0 ----- stdout ----- @@ -1460,7 +1460,7 @@ fn install_url_source_dist_cached() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + source-distribution==0.0.1 (from https://files.pythonhosted.org/packages/10/1f/57aa4cce1b1abf6b433106676e15f9fa2c92ed2bd4cf77c3b50a9e9ac773/source_distribution-0.0.1.tar.gz) - "### + " ); context @@ -1481,7 +1481,7 @@ fn install_git_source_dist_cached() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -1491,7 +1491,7 @@ fn install_git_source_dist_cached() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + uv-public-pypackage==0.1.0 (from git+https://github.com/astral-test/uv-public-pypackage@b270df1a2fb5d012294e9aaf05e7e0bab1e6a389) - "### + " ); context @@ -1504,7 +1504,7 @@ fn install_git_source_dist_cached() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.txt") .arg("--strict") - , @r###" + , @" success: true exit_code: 0 ----- stdout ----- @@ -1513,7 +1513,7 @@ fn install_git_source_dist_cached() -> Result<()> { Resolved 1 package in [TIME] Installed 1 package in [TIME] + uv-public-pypackage==0.1.0 (from git+https://github.com/astral-test/uv-public-pypackage@b270df1a2fb5d012294e9aaf05e7e0bab1e6a389) - "### + " ); context @@ -1532,20 +1532,20 @@ fn install_git_source_dist_cached() -> Result<()> { context.filters() }; uv_snapshot!(filters, context.clean() - .arg("werkzeug"), @r###" + .arg("werkzeug"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- No cache entries found - "### + " ); uv_snapshot!(context.pip_sync() .arg("requirements.txt") .arg("--strict") - , @r###" + , @" success: true exit_code: 0 ----- stdout ----- @@ -1554,7 +1554,7 @@ fn install_git_source_dist_cached() -> Result<()> { Resolved 1 package in [TIME] Installed 1 package in [TIME] + uv-public-pypackage==0.1.0 (from git+https://github.com/astral-test/uv-public-pypackage@b270df1a2fb5d012294e9aaf05e7e0bab1e6a389) - "### + " ); context @@ -1574,7 +1574,7 @@ fn install_registry_source_dist_cached() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -1584,7 +1584,7 @@ fn install_registry_source_dist_cached() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + source-distribution==0.0.1 - "### + " ); context @@ -1597,7 +1597,7 @@ fn install_registry_source_dist_cached() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.txt") .arg("--strict") - , @r###" + , @" success: true exit_code: 0 ----- stdout ----- @@ -1606,7 +1606,7 @@ fn install_registry_source_dist_cached() -> Result<()> { Resolved 1 package in [TIME] Installed 1 package in [TIME] + source-distribution==0.0.1 - "### + " ); context @@ -1620,20 +1620,20 @@ fn install_registry_source_dist_cached() -> Result<()> { .chain(context.filters()) .collect::>(); uv_snapshot!(filters, context.clean() - .arg("source_distribution"), @r###" + .arg("source_distribution"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Removed [N] files ([SIZE]) - "### + " ); uv_snapshot!(context.pip_sync() .arg("requirements.txt") .arg("--strict") - , @r###" + , @" success: true exit_code: 0 ----- stdout ----- @@ -1643,7 +1643,7 @@ fn install_registry_source_dist_cached() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + source-distribution==0.0.1 - "### + " ); context @@ -1673,7 +1673,7 @@ fn install_path_source_dist_cached() -> Result<()> { uv_snapshot!(context.filters(), context.pip_sync() .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -1683,7 +1683,7 @@ fn install_path_source_dist_cached() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + source-distribution==0.0.1 (from file://[TEMP_DIR]/source_distribution-0.0.1.tar.gz) - "### + " ); context @@ -1696,7 +1696,7 @@ fn install_path_source_dist_cached() -> Result<()> { uv_snapshot!(context.filters(), context.pip_sync() .arg("requirements.txt") .arg("--strict") - , @r###" + , @" success: true exit_code: 0 ----- stdout ----- @@ -1705,7 +1705,7 @@ fn install_path_source_dist_cached() -> Result<()> { Resolved 1 package in [TIME] Installed 1 package in [TIME] + source-distribution==0.0.1 (from file://[TEMP_DIR]/source_distribution-0.0.1.tar.gz) - "### + " ); context @@ -1720,20 +1720,20 @@ fn install_path_source_dist_cached() -> Result<()> { .collect::>(); uv_snapshot!( filters, - context.clean().arg("source-distribution"), @r###" + context.clean().arg("source-distribution"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Removed [N] files ([SIZE]) - "### + " ); uv_snapshot!(context.filters(), context.pip_sync() .arg("requirements.txt") .arg("--strict") - , @r###" + , @" success: true exit_code: 0 ----- stdout ----- @@ -1743,7 +1743,7 @@ fn install_path_source_dist_cached() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + source-distribution==0.0.1 (from file://[TEMP_DIR]/source_distribution-0.0.1.tar.gz) - "### + " ); context @@ -1771,7 +1771,7 @@ fn install_path_built_dist_cached() -> Result<()> { uv_snapshot!(context.filters(), context.pip_sync() .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -1781,7 +1781,7 @@ fn install_path_built_dist_cached() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + tomli==2.0.1 (from file://[TEMP_DIR]/tomli-2.0.1-py3-none-any.whl) - "### + " ); context.assert_command("import tomli").success(); @@ -1792,7 +1792,7 @@ fn install_path_built_dist_cached() -> Result<()> { uv_snapshot!(context.filters(), context.pip_sync() .arg("requirements.txt") .arg("--strict") - , @r###" + , @" success: true exit_code: 0 ----- stdout ----- @@ -1801,7 +1801,7 @@ fn install_path_built_dist_cached() -> Result<()> { Resolved 1 package in [TIME] Installed 1 package in [TIME] + tomli==2.0.1 (from file://[TEMP_DIR]/tomli-2.0.1-py3-none-any.whl) - "### + " ); context.assert_command("import tomli").success(); @@ -1814,20 +1814,20 @@ fn install_path_built_dist_cached() -> Result<()> { .collect::>(); uv_snapshot!( filters, - context.clean().arg("tomli"), @r###" + context.clean().arg("tomli"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Removed [N] files ([SIZE]) - "### + " ); uv_snapshot!(context.filters(), context.pip_sync() .arg("requirements.txt") .arg("--strict") - , @r###" + , @" success: true exit_code: 0 ----- stdout ----- @@ -1837,7 +1837,7 @@ fn install_path_built_dist_cached() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + tomli==2.0.1 (from file://[TEMP_DIR]/tomli-2.0.1-py3-none-any.whl) - "### + " ); context.assert_command("import tomli").success(); @@ -1863,7 +1863,7 @@ fn install_url_built_dist_cached() -> Result<()> { }; uv_snapshot!(context_filters, context.pip_sync() .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -1873,7 +1873,7 @@ fn install_url_built_dist_cached() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + tqdm==4.66.1 (from https://files.pythonhosted.org/packages/00/e5/f12a80907d0884e6dff9c16d0c0114d81b8cd07dc3ae54c5e962cc83037e/tqdm-4.66.1-py3-none-any.whl) - "### + " ); context.assert_command("import tqdm").success(); @@ -1884,7 +1884,7 @@ fn install_url_built_dist_cached() -> Result<()> { uv_snapshot!(context_filters, context.pip_sync() .arg("requirements.txt") .arg("--strict") - , @r###" + , @" success: true exit_code: 0 ----- stdout ----- @@ -1893,7 +1893,7 @@ fn install_url_built_dist_cached() -> Result<()> { Resolved 1 package in [TIME] Installed 1 package in [TIME] + tqdm==4.66.1 (from https://files.pythonhosted.org/packages/00/e5/f12a80907d0884e6dff9c16d0c0114d81b8cd07dc3ae54c5e962cc83037e/tqdm-4.66.1-py3-none-any.whl) - "### + " ); context.assert_command("import tqdm").success(); @@ -1906,20 +1906,20 @@ fn install_url_built_dist_cached() -> Result<()> { .collect::>(); uv_snapshot!( filters, - context.clean().arg("tqdm"), @r###" + context.clean().arg("tqdm"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Removed [N] files ([SIZE]) - "### + " ); uv_snapshot!(context_filters, context.pip_sync() .arg("requirements.txt") .arg("--strict") - , @r###" + , @" success: true exit_code: 0 ----- stdout ----- @@ -1929,7 +1929,7 @@ fn install_url_built_dist_cached() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + tqdm==4.66.1 (from https://files.pythonhosted.org/packages/00/e5/f12a80907d0884e6dff9c16d0c0114d81b8cd07dc3ae54c5e962cc83037e/tqdm-4.66.1-py3-none-any.whl) - "### + " ); context.assert_command("import tqdm").success(); @@ -1947,7 +1947,7 @@ fn duplicate_package_overlap() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: false exit_code: 1 ----- stdout ----- @@ -1955,7 +1955,7 @@ fn duplicate_package_overlap() -> Result<()> { ----- stderr ----- × No solution found when resolving dependencies: ╰─▶ Because you require markupsafe==2.1.3 and markupsafe==2.1.2, we can conclude that your requirements are unsatisfiable. - "### + " ); Ok(()) @@ -1971,7 +1971,7 @@ fn duplicate_package_disjoint() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -1981,7 +1981,7 @@ fn duplicate_package_disjoint() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + markupsafe==2.1.3 - "### + " ); Ok(()) @@ -1997,7 +1997,7 @@ fn reinstall() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -2008,7 +2008,7 @@ fn reinstall() -> Result<()> { Installed 2 packages in [TIME] + markupsafe==2.1.3 + tomli==2.0.1 - "### + " ); context.assert_command("import markupsafe").success(); @@ -2018,7 +2018,7 @@ fn reinstall() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.txt") .arg("--reinstall") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -2030,7 +2030,7 @@ fn reinstall() -> Result<()> { Installed 2 packages in [TIME] ~ markupsafe==2.1.3 ~ tomli==2.0.1 - "### + " ); context.assert_command("import markupsafe").success(); @@ -2049,7 +2049,7 @@ fn reinstall_package() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -2060,7 +2060,7 @@ fn reinstall_package() -> Result<()> { Installed 2 packages in [TIME] + markupsafe==2.1.3 + tomli==2.0.1 - "### + " ); context.assert_command("import markupsafe").success(); @@ -2071,7 +2071,7 @@ fn reinstall_package() -> Result<()> { .arg("requirements.txt") .arg("--reinstall-package") .arg("tomli") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -2082,7 +2082,7 @@ fn reinstall_package() -> Result<()> { Uninstalled 1 package in [TIME] Installed 1 package in [TIME] ~ tomli==2.0.1 - "### + " ); context.assert_command("import markupsafe").success(); @@ -2102,7 +2102,7 @@ fn reinstall_git() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -2112,7 +2112,7 @@ fn reinstall_git() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + uv-public-pypackage==0.1.0 (from git+https://github.com/astral-test/uv-public-pypackage@b270df1a2fb5d012294e9aaf05e7e0bab1e6a389) - "### + " ); context @@ -2124,7 +2124,7 @@ fn reinstall_git() -> Result<()> { .arg("requirements.txt") .arg("--reinstall-package") .arg("uv-public-pypackage") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -2135,7 +2135,7 @@ fn reinstall_git() -> Result<()> { Uninstalled 1 package in [TIME] Installed 1 package in [TIME] ~ uv-public-pypackage==0.1.0 (from git+https://github.com/astral-test/uv-public-pypackage@b270df1a2fb5d012294e9aaf05e7e0bab1e6a389) - "### + " ); context @@ -2155,7 +2155,7 @@ fn refresh() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -2166,7 +2166,7 @@ fn refresh() -> Result<()> { Installed 2 packages in [TIME] + markupsafe==2.1.3 + tomli==2.0.1 - "### + " ); context.assert_command("import markupsafe").success(); @@ -2180,7 +2180,7 @@ fn refresh() -> Result<()> { .arg("requirements.txt") .arg("--refresh") .arg("--strict") - , @r###" + , @" success: true exit_code: 0 ----- stdout ----- @@ -2191,7 +2191,7 @@ fn refresh() -> Result<()> { Installed 2 packages in [TIME] + markupsafe==2.1.3 + tomli==2.0.1 - "### + " ); context.assert_command("import markupsafe").success(); @@ -2210,7 +2210,7 @@ fn refresh_package() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -2221,7 +2221,7 @@ fn refresh_package() -> Result<()> { Installed 2 packages in [TIME] + markupsafe==2.1.3 + tomli==2.0.1 - "### + " ); context.assert_command("import markupsafe").success(); @@ -2236,7 +2236,7 @@ fn refresh_package() -> Result<()> { .arg("--refresh-package") .arg("tomli") .arg("--strict") - , @r###" + , @" success: true exit_code: 0 ----- stdout ----- @@ -2247,7 +2247,7 @@ fn refresh_package() -> Result<()> { Installed 2 packages in [TIME] + markupsafe==2.1.3 + tomli==2.0.1 - "### + " ); context.assert_command("import markupsafe").success(); @@ -2277,7 +2277,7 @@ fn sync_editable() -> Result<()> { // Install the editable package. uv_snapshot!(context.filters(), context.pip_sync() - .arg(requirements_txt.path()), @r###" + .arg(requirements_txt.path()), @" success: true exit_code: 0 ----- stdout ----- @@ -2288,12 +2288,12 @@ fn sync_editable() -> Result<()> { Installed 2 packages in [TIME] + anyio==3.7.0 + poetry-editable==0.1.0 (from file://[TEMP_DIR]/poetry_editable) - "### + " ); // Re-install the editable package. This is a no-op. uv_snapshot!(context.filters(), context.pip_sync() - .arg(requirements_txt.path()), @r###" + .arg(requirements_txt.path()), @" success: true exit_code: 0 ----- stdout ----- @@ -2301,14 +2301,14 @@ fn sync_editable() -> Result<()> { ----- stderr ----- Resolved 2 packages in [TIME] Audited 2 packages in [TIME] - "### + " ); // Reinstall the editable package. This won't trigger a rebuild, but it will trigger an install. uv_snapshot!(context.filters(), context.pip_sync() .arg(requirements_txt.path()) .arg("--reinstall-package") - .arg("poetry-editable"), @r###" + .arg("poetry-editable"), @" success: true exit_code: 0 ----- stdout ----- @@ -2319,7 +2319,7 @@ fn sync_editable() -> Result<()> { Uninstalled 1 package in [TIME] Installed 1 package in [TIME] ~ poetry-editable==0.1.0 (from file://[TEMP_DIR]/poetry_editable) - "### + " ); let python_source_file = poetry_editable.path().join("poetry_editable/__init__.py"); @@ -2358,7 +2358,7 @@ fn sync_editable() -> Result<()> { // Reinstall the editable package. This won't trigger a rebuild or reinstall, since we only // detect changes to metadata files (like `pyproject.toml`). uv_snapshot!(context.filters(), context.pip_sync() - .arg(requirements_txt.path()), @r###" + .arg(requirements_txt.path()), @" success: true exit_code: 0 ----- stdout ----- @@ -2366,7 +2366,7 @@ fn sync_editable() -> Result<()> { ----- stderr ----- Resolved 2 packages in [TIME] Audited 2 packages in [TIME] - "### + " ); // Modify the `pyproject.toml` file. @@ -2379,7 +2379,7 @@ fn sync_editable() -> Result<()> { // Reinstall the editable package. This will trigger a rebuild and reinstall. uv_snapshot!(context.filters(), context.pip_sync() - .arg(requirements_txt.path()), @r###" + .arg(requirements_txt.path()), @" success: true exit_code: 0 ----- stdout ----- @@ -2391,7 +2391,7 @@ fn sync_editable() -> Result<()> { Installed 1 package in [TIME] - poetry-editable==0.1.0 (from file://[TEMP_DIR]/poetry_editable) + poetry-editable==0.1.1 (from file://[TEMP_DIR]/poetry_editable) - "### + " ); // Modify the `pyproject.toml` file. @@ -2404,7 +2404,7 @@ fn sync_editable() -> Result<()> { // Reinstall the editable package. This will trigger a rebuild and reinstall. uv_snapshot!(context.filters(), context.pip_sync() - .arg(requirements_txt.path()), @r###" + .arg(requirements_txt.path()), @" success: true exit_code: 0 ----- stdout ----- @@ -2415,7 +2415,7 @@ fn sync_editable() -> Result<()> { Uninstalled 1 package in [TIME] Installed 1 package in [TIME] ~ poetry-editable==0.1.1 (from file://[TEMP_DIR]/poetry_editable) - "### + " ); Ok(()) @@ -2440,7 +2440,7 @@ fn sync_editable_and_registry() -> Result<()> { uv_snapshot!(context.filters(), context.pip_sync() .arg(requirements_txt.path()) - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -2455,7 +2455,7 @@ fn sync_editable_and_registry() -> Result<()> { warning: The package `black` requires `packaging>=22.0`, but it's not installed warning: The package `black` requires `pathspec>=0.9.0`, but it's not installed warning: The package `black` requires `platformdirs>=2`, but it's not installed - "### + " ); // Install the editable version of Black. This should remove the registry-based version. @@ -2467,7 +2467,7 @@ fn sync_editable_and_registry() -> Result<()> { })?; uv_snapshot!(context.filters(), context.pip_sync() - .arg(requirements_txt.path()), @r###" + .arg(requirements_txt.path()), @" success: true exit_code: 0 ----- stdout ----- @@ -2479,7 +2479,7 @@ fn sync_editable_and_registry() -> Result<()> { Installed 1 package in [TIME] - black==24.1.0 + black==0.1.0 (from file://[TEMP_DIR]/black_editable) - "### + " ); // Re-install the registry-based version of Black. This should be a no-op, since we have a @@ -2491,7 +2491,7 @@ fn sync_editable_and_registry() -> Result<()> { })?; uv_snapshot!(context.filters(), context.pip_sync() - .arg(requirements_txt.path()), @r###" + .arg(requirements_txt.path()), @" success: true exit_code: 0 ----- stdout ----- @@ -2499,7 +2499,7 @@ fn sync_editable_and_registry() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] Audited 1 package in [TIME] - "### + " ); // Re-install Black at a specific version. This should replace the editable version. @@ -2511,7 +2511,7 @@ fn sync_editable_and_registry() -> Result<()> { uv_snapshot!(context.filters(), context.pip_sync() .arg(requirements_txt.path()) - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -2528,7 +2528,7 @@ fn sync_editable_and_registry() -> Result<()> { warning: The package `black` requires `packaging>=22.0`, but it's not installed warning: The package `black` requires `pathspec>=0.9.0`, but it's not installed warning: The package `black` requires `platformdirs>=2`, but it's not installed - "### + " ); Ok(()) @@ -2552,7 +2552,7 @@ fn sync_editable_and_local() -> Result<()> { })?; uv_snapshot!(context.filters(), context.pip_sync() - .arg(requirements_txt.path()), @r###" + .arg(requirements_txt.path()), @" success: true exit_code: 0 ----- stdout ----- @@ -2562,7 +2562,7 @@ fn sync_editable_and_local() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + black==0.1.0 (from file://[TEMP_DIR]/black_editable) - "### + " ); // Install the non-editable version of Black. This should replace the editable version. @@ -2573,7 +2573,7 @@ fn sync_editable_and_local() -> Result<()> { })?; uv_snapshot!(context.filters(), context.pip_sync() - .arg(requirements_txt.path()), @r###" + .arg(requirements_txt.path()), @" success: true exit_code: 0 ----- stdout ----- @@ -2584,7 +2584,7 @@ fn sync_editable_and_local() -> Result<()> { Uninstalled 1 package in [TIME] Installed 1 package in [TIME] ~ black==0.1.0 (from file://[TEMP_DIR]/black_editable) - "### + " ); // Reinstall the editable version of Black. This should replace the non-editable version. @@ -2595,7 +2595,7 @@ fn sync_editable_and_local() -> Result<()> { })?; uv_snapshot!(context.filters(), context.pip_sync() - .arg(requirements_txt.path()), @r###" + .arg(requirements_txt.path()), @" success: true exit_code: 0 ----- stdout ----- @@ -2605,7 +2605,7 @@ fn sync_editable_and_local() -> Result<()> { Uninstalled 1 package in [TIME] Installed 1 package in [TIME] ~ black==0.1.0 (from file://[TEMP_DIR]/black_editable) - "### + " ); Ok(()) @@ -2622,7 +2622,7 @@ fn incompatible_wheel() -> Result<()> { uv_snapshot!(context.filters(), context.pip_sync() .arg("requirements.txt") - .arg("--strict"), @r" + .arg("--strict"), @" success: false exit_code: 1 ----- stdout ----- @@ -2649,7 +2649,7 @@ fn sync_legacy_sdist_pep_517() -> Result<()> { requirements_in.write_str("flake8 @ https://files.pythonhosted.org/packages/66/53/3ad4a3b74d609b3b9008a10075c40e7c8909eae60af53623c3888f7a529a/flake8-6.0.0.tar.gz")?; uv_snapshot!(context.pip_sync() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -2659,7 +2659,7 @@ fn sync_legacy_sdist_pep_517() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + flake8==6.0.0 (from https://files.pythonhosted.org/packages/66/53/3ad4a3b74d609b3b9008a10075c40e7c8909eae60af53623c3888f7a529a/flake8-6.0.0.tar.gz) - "### + " ); Ok(()) @@ -2681,7 +2681,7 @@ fn find_links() -> Result<()> { uv_snapshot!(context.filters(), context.pip_sync() .arg("requirements.txt") .arg("--find-links") - .arg(context.workspace_root.join("test/links/")), @r###" + .arg(context.workspace_root.join("test/links/")), @" success: true exit_code: 0 ----- stdout ----- @@ -2694,7 +2694,7 @@ fn find_links() -> Result<()> { + numpy==1.26.3 + tqdm==1000.0.0 + werkzeug==3.0.1 (from https://files.pythonhosted.org/packages/c3/fc/254c3e9b5feb89ff5b9076a23218dafbc99c96ac5941e900b71206e6313b/werkzeug-3.0.1-py3-none-any.whl) - "### + " ); Ok(()) @@ -2714,7 +2714,7 @@ fn find_links_no_index_match() -> Result<()> { .arg("requirements.txt") .arg("--no-index") .arg("--find-links") - .arg(context.workspace_root.join("test/links/")), @r###" + .arg(context.workspace_root.join("test/links/")), @" success: true exit_code: 0 ----- stdout ----- @@ -2724,7 +2724,7 @@ fn find_links_no_index_match() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + tqdm==1000.0.0 - "### + " ); Ok(()) @@ -2744,7 +2744,7 @@ fn find_links_offline_match() -> Result<()> { .arg("requirements.txt") .arg("--offline") .arg("--find-links") - .arg(context.workspace_root.join("test/links/")), @r###" + .arg(context.workspace_root.join("test/links/")), @" success: true exit_code: 0 ----- stdout ----- @@ -2754,7 +2754,7 @@ fn find_links_offline_match() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + tqdm==1000.0.0 - "### + " ); Ok(()) @@ -2775,7 +2775,7 @@ fn find_links_offline_no_match() -> Result<()> { .arg("requirements.txt") .arg("--offline") .arg("--find-links") - .arg(context.workspace_root.join("test/links/")), @r###" + .arg(context.workspace_root.join("test/links/")), @" success: false exit_code: 1 ----- stdout ----- @@ -2785,7 +2785,7 @@ fn find_links_offline_no_match() -> Result<()> { ╰─▶ Because numpy was not found in the cache and you require numpy, we can conclude that your requirements are unsatisfiable. hint: Packages were unavailable because the network was disabled. When the network is disabled, registry packages may only be read from the cache. - "### + " ); Ok(()) @@ -2805,7 +2805,7 @@ fn find_links_wheel_cache() -> Result<()> { uv_snapshot!(context.filters(), context.pip_sync() .arg("requirements.txt") .arg("--find-links") - .arg(context.workspace_root.join("test/links/")), @r###" + .arg(context.workspace_root.join("test/links/")), @" success: true exit_code: 0 ----- stdout ----- @@ -2815,7 +2815,7 @@ fn find_links_wheel_cache() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + tqdm==1000.0.0 - "### + " ); // Reinstall `tqdm` with `--reinstall`. Ensure that the wheel is reused. @@ -2823,7 +2823,7 @@ fn find_links_wheel_cache() -> Result<()> { .arg("requirements.txt") .arg("--reinstall") .arg("--find-links") - .arg(context.workspace_root.join("test/links/")), @r###" + .arg(context.workspace_root.join("test/links/")), @" success: true exit_code: 0 ----- stdout ----- @@ -2834,7 +2834,7 @@ fn find_links_wheel_cache() -> Result<()> { Uninstalled 1 package in [TIME] Installed 1 package in [TIME] ~ tqdm==1000.0.0 - "### + " ); Ok(()) @@ -2855,7 +2855,7 @@ fn find_links_source_cache() -> Result<()> { uv_snapshot!(context.filters(), context.pip_sync() .arg("requirements.txt") .arg("--find-links") - .arg(context.workspace_root.join("test/links/")), @r###" + .arg(context.workspace_root.join("test/links/")), @" success: true exit_code: 0 ----- stdout ----- @@ -2865,7 +2865,7 @@ fn find_links_source_cache() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + tqdm==999.0.0 - "### + " ); // Reinstall `tqdm` with `--reinstall`. Ensure that the wheel is reused. @@ -2873,7 +2873,7 @@ fn find_links_source_cache() -> Result<()> { .arg("requirements.txt") .arg("--reinstall") .arg("--find-links") - .arg(context.workspace_root.join("test/links/")), @r###" + .arg(context.workspace_root.join("test/links/")), @" success: true exit_code: 0 ----- stdout ----- @@ -2884,7 +2884,7 @@ fn find_links_source_cache() -> Result<()> { Uninstalled 1 package in [TIME] Installed 1 package in [TIME] ~ tqdm==999.0.0 - "### + " ); Ok(()) @@ -2900,7 +2900,7 @@ fn offline() -> Result<()> { // Install with `--offline` with an empty cache. uv_snapshot!(context.pip_sync() .arg("requirements.in") - .arg("--offline"), @r###" + .arg("--offline"), @" success: false exit_code: 1 ----- stdout ----- @@ -2910,12 +2910,12 @@ fn offline() -> Result<()> { ╰─▶ Because black was not found in the cache and you require black==23.10.1, we can conclude that your requirements are unsatisfiable. hint: Packages were unavailable because the network was disabled. When the network is disabled, registry packages may only be read from the cache. - "### + " ); // Populate the cache. uv_snapshot!(context.pip_sync() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -2925,7 +2925,7 @@ fn offline() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + black==23.10.1 - "### + " ); // Install with `--offline` with a populated cache. @@ -2934,7 +2934,7 @@ fn offline() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.in") .arg("--offline") - , @r###" + , @" success: true exit_code: 0 ----- stdout ----- @@ -2943,7 +2943,7 @@ fn offline() -> Result<()> { Resolved 1 package in [TIME] Installed 1 package in [TIME] + black==23.10.1 - "### + " ); Ok(()) @@ -2962,7 +2962,7 @@ fn compatible_constraint() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.txt") .arg("--constraint") - .arg("constraints.txt"), @r###" + .arg("constraints.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -2972,7 +2972,7 @@ fn compatible_constraint() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + anyio==3.7.0 - "### + " ); Ok(()) @@ -2991,7 +2991,7 @@ fn incompatible_constraint() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.txt") .arg("--constraint") - .arg("constraints.txt"), @r###" + .arg("constraints.txt"), @" success: false exit_code: 1 ----- stdout ----- @@ -2999,7 +2999,7 @@ fn incompatible_constraint() -> Result<()> { ----- stderr ----- × No solution found when resolving dependencies: ╰─▶ Because you require anyio==3.7.0 and anyio==3.6.0, we can conclude that your requirements are unsatisfiable. - "### + " ); Ok(()) @@ -3018,7 +3018,7 @@ fn irrelevant_constraint() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.txt") .arg("--constraint") - .arg("constraints.txt"), @r###" + .arg("constraints.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -3028,7 +3028,7 @@ fn irrelevant_constraint() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + anyio==3.7.0 - "### + " ); Ok(()) @@ -3042,7 +3042,7 @@ fn repeat_requirement_identical() -> Result<()> { requirements_in.write_str("anyio\nanyio")?; uv_snapshot!(context.pip_sync() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -3052,7 +3052,7 @@ fn repeat_requirement_identical() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + anyio==4.3.0 - "###); + "); Ok(()) } @@ -3065,7 +3065,7 @@ fn repeat_requirement_compatible() -> Result<()> { requirements_in.write_str("anyio\nanyio==4.0.0")?; uv_snapshot!(context.pip_sync() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -3075,7 +3075,7 @@ fn repeat_requirement_compatible() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + anyio==4.0.0 - "###); + "); Ok(()) } @@ -3088,7 +3088,7 @@ fn repeat_requirement_incompatible() -> Result<()> { requirements_in.write_str("anyio<4.0.0\nanyio==4.0.0")?; uv_snapshot!(context.pip_sync() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: false exit_code: 1 ----- stdout ----- @@ -3096,7 +3096,7 @@ fn repeat_requirement_incompatible() -> Result<()> { ----- stderr ----- × No solution found when resolving dependencies: ╰─▶ Because you require anyio<4.0.0 and anyio==4.0.0, we can conclude that your requirements are unsatisfiable. - "###); + "); Ok(()) } @@ -3111,7 +3111,7 @@ fn tar_dont_preserve_mtime() -> Result<()> { requirements_txt.write_str("tomli @ https://files.pythonhosted.org/packages/c0/3f/d7af728f075fb08564c5949a9c95e44352e23dee646869fa104a3b2060a3/tomli-2.0.1.tar.gz")?; uv_snapshot!(context.pip_sync() - .arg("requirements.txt"), @r###" + .arg("requirements.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -3121,7 +3121,7 @@ fn tar_dont_preserve_mtime() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + tomli==2.0.1 (from https://files.pythonhosted.org/packages/c0/3f/d7af728f075fb08564c5949a9c95e44352e23dee646869fa104a3b2060a3/tomli-2.0.1.tar.gz) - "###); + "); Ok(()) } @@ -3134,7 +3134,7 @@ fn set_read_permissions() -> Result<()> { requirements_in.write_str("databricks==0.2")?; uv_snapshot!(context.pip_sync() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -3144,7 +3144,7 @@ fn set_read_permissions() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + databricks==0.2 - "###); + "); Ok(()) } @@ -3214,7 +3214,7 @@ requires-python = ">=3.8" requirements_in.write_str(&format!("-e {}", editable_dir.path().display()))?; uv_snapshot!(context.filters(), context.pip_sync() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -3224,12 +3224,12 @@ requires-python = ">=3.8" Prepared 1 package in [TIME] Installed 1 package in [TIME] + example==0.0.0 (from file://[TEMP_DIR]/editable) - "### + " ); // Installing again should be a no-op. uv_snapshot!(context.filters(), context.pip_sync() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -3237,7 +3237,7 @@ requires-python = ">=3.8" ----- stderr ----- Resolved 1 package in [TIME] Audited 1 package in [TIME] - "### + " ); // Modify the editable package. @@ -3254,7 +3254,7 @@ requires-python = ">=3.8" // Re-installing should update the package. uv_snapshot!(context.filters(), context.pip_sync() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -3265,7 +3265,7 @@ requires-python = ">=3.8" Uninstalled 1 package in [TIME] Installed 1 package in [TIME] ~ example==0.0.0 (from file://[TEMP_DIR]/editable) - "### + " ); Ok(()) @@ -3282,7 +3282,7 @@ fn compile() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.txt") .arg("--compile") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -3293,7 +3293,7 @@ fn compile() -> Result<()> { Installed 1 package in [TIME] Bytecode compiled 3 files in [TIME] + markupsafe==2.1.3 - "### + " ); assert!( @@ -3320,7 +3320,7 @@ fn recompile() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -3330,13 +3330,13 @@ fn recompile() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + markupsafe==2.1.3 - "### + " ); uv_snapshot!(context.pip_sync() .arg("requirements.txt") .arg("--compile") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -3344,7 +3344,7 @@ fn recompile() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] Bytecode compiled 3 files in [TIME] - "### + " ); assert!( @@ -3386,7 +3386,7 @@ requires-python = ">=3.13" requirements_in.write_str(&format!("-e {}", editable_dir.path().display()))?; uv_snapshot!(context.filters(), context.pip_sync() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: false exit_code: 1 ----- stdout ----- @@ -3395,7 +3395,7 @@ requires-python = ">=3.13" × No solution found when resolving dependencies: ╰─▶ Because the current Python version (3.12.[X]) does not satisfy Python>=3.13 and example==0.0.0 depends on Python>=3.13, we can conclude that example==0.0.0 cannot be used. And because only example==0.0.0 is available and you require example, we can conclude that your requirements are unsatisfiable. - "### + " ); Ok(()) @@ -3426,7 +3426,7 @@ requires-python = ">=3.13" requirements_in.write_str(&format!("example @ {}", editable_dir.path().display()))?; uv_snapshot!(context.filters(), context.pip_sync() - .arg("requirements.in"), @r###" + .arg("requirements.in"), @" success: false exit_code: 1 ----- stdout ----- @@ -3435,7 +3435,7 @@ requires-python = ">=3.13" × No solution found when resolving dependencies: ╰─▶ Because the current Python version (3.12.[X]) does not satisfy Python>=3.13 and example==0.0.0 depends on Python>=3.13, we can conclude that example==0.0.0 cannot be used. And because only example==0.0.0 is available and you require example, we can conclude that your requirements are unsatisfiable. - "### + " ); Ok(()) @@ -3453,7 +3453,7 @@ fn require_hashes_unknown_algorithm() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.txt") - .arg("--require-hashes"), @r" + .arg("--require-hashes"), @" success: false exit_code: 2 ----- stdout ----- @@ -3476,7 +3476,7 @@ fn require_hashes_missing_hash() -> Result<()> { // Install without error when `--require-hashes` is omitted. uv_snapshot!(context.pip_sync() - .arg("requirements.txt"), @r###" + .arg("requirements.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -3486,20 +3486,20 @@ fn require_hashes_missing_hash() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + anyio==4.0.0 - "### + " ); // Error when `--require-hashes` is provided. uv_snapshot!(context.pip_sync() .arg("requirements.txt") - .arg("--require-hashes"), @r###" + .arg("--require-hashes"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: In `--require-hashes` mode, all requirements must have a hash, but none were provided for: anyio==4.0.0 - "### + " ); Ok(()) @@ -3517,7 +3517,7 @@ fn require_hashes_missing_version() -> Result<()> { // Install without error when `--require-hashes` is omitted. uv_snapshot!(context.pip_sync() - .arg("requirements.txt"), @r###" + .arg("requirements.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -3527,20 +3527,20 @@ fn require_hashes_missing_version() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + anyio==4.3.0 - "### + " ); // Error when `--require-hashes` is provided. uv_snapshot!(context.pip_sync() .arg("requirements.txt") - .arg("--require-hashes"), @r###" + .arg("--require-hashes"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: In `--require-hashes` mode, all requirements must have their versions pinned with `==`, but found: anyio - "### + " ); Ok(()) @@ -3558,7 +3558,7 @@ fn require_hashes_invalid_operator() -> Result<()> { // Install without error when `--require-hashes` is omitted. uv_snapshot!(context.pip_sync() - .arg("requirements.txt"), @r###" + .arg("requirements.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -3568,20 +3568,20 @@ fn require_hashes_invalid_operator() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + anyio==4.3.0 - "### + " ); // Error when `--require-hashes` is provided. uv_snapshot!(context.pip_sync() .arg("requirements.txt") - .arg("--require-hashes"), @r###" + .arg("--require-hashes"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: In `--require-hashes` mode, all requirements must have their versions pinned with `==`, but found: anyio>4.0.0 - "### + " ); Ok(()) @@ -3600,7 +3600,7 @@ fn require_hashes_wheel_no_binary() -> Result<()> { .arg("requirements.txt") .arg("--no-binary") .arg(":all:") - .arg("--require-hashes"), @r###" + .arg("--require-hashes"), @" success: false exit_code: 1 ----- stdout ----- @@ -3615,7 +3615,7 @@ fn require_hashes_wheel_no_binary() -> Result<()> { Computed: sha256:f7ed51751b2c2add651e5747c891b47e26d2a21be5d32d9311dfe9692f3e5d7a - "### + " ); Ok(()) @@ -3634,7 +3634,7 @@ fn require_hashes_wheel_only_binary() -> Result<()> { .arg("requirements.txt") .arg("--only-binary") .arg(":all:") - .arg("--require-hashes"), @r###" + .arg("--require-hashes"), @" success: true exit_code: 0 ----- stdout ----- @@ -3644,7 +3644,7 @@ fn require_hashes_wheel_only_binary() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + anyio==4.0.0 - "### + " ); Ok(()) @@ -3663,7 +3663,7 @@ fn require_hashes_source_no_binary() -> Result<()> { .arg("requirements.txt") .arg("--no-binary") .arg(":all:") - .arg("--require-hashes"), @r###" + .arg("--require-hashes"), @" success: true exit_code: 0 ----- stdout ----- @@ -3673,7 +3673,7 @@ fn require_hashes_source_no_binary() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + source-distribution==0.0.1 - "### + " ); Ok(()) @@ -3692,7 +3692,7 @@ fn require_hashes_source_only_binary() -> Result<()> { .arg("requirements.txt") .arg("--only-binary") .arg(":all:") - .arg("--require-hashes"), @r###" + .arg("--require-hashes"), @" success: false exit_code: 1 ----- stdout ----- @@ -3707,7 +3707,7 @@ fn require_hashes_source_only_binary() -> Result<()> { Computed: sha256:cfdb2b588b9fc25ede96d8db56ed50848b0b649dca3dd1df0b11f683bb9e0b5f - "### + " ); Ok(()) @@ -3724,7 +3724,7 @@ fn require_hashes_wrong_digest() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.txt") - .arg("--require-hashes"), @r###" + .arg("--require-hashes"), @" success: false exit_code: 1 ----- stdout ----- @@ -3739,7 +3739,7 @@ fn require_hashes_wrong_digest() -> Result<()> { Computed: sha256:cfdb2b588b9fc25ede96d8db56ed50848b0b649dca3dd1df0b11f683bb9e0b5f - "### + " ); Ok(()) @@ -3756,7 +3756,7 @@ fn require_hashes_wrong_algorithm() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.txt") - .arg("--require-hashes"), @r###" + .arg("--require-hashes"), @" success: false exit_code: 1 ----- stdout ----- @@ -3771,7 +3771,7 @@ fn require_hashes_wrong_algorithm() -> Result<()> { Computed: sha512:f30761c1e8725b49c498273b90dba4b05c0fd157811994c806183062cb6647e773364ce45f0e1ff0b10e32fe6d0232ea5ad39476ccf37109d6b49603a09c11c2 - "### + " ); Ok(()) @@ -3788,7 +3788,7 @@ fn require_hashes_source_url() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.txt") - .arg("--require-hashes"), @r###" + .arg("--require-hashes"), @" success: true exit_code: 0 ----- stdout ----- @@ -3798,14 +3798,14 @@ fn require_hashes_source_url() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + source-distribution==0.0.1 (from https://files.pythonhosted.org/packages/10/1f/57aa4cce1b1abf6b433106676e15f9fa2c92ed2bd4cf77c3b50a9e9ac773/source_distribution-0.0.1.tar.gz) - "### + " ); // Reinstall with the right hash, and verify that it's reused. uv_snapshot!(context.pip_sync() .arg("requirements.txt") .arg("--reinstall") - .arg("--require-hashes"), @r###" + .arg("--require-hashes"), @" success: true exit_code: 0 ----- stdout ----- @@ -3816,7 +3816,7 @@ fn require_hashes_source_url() -> Result<()> { Uninstalled 1 package in [TIME] Installed 1 package in [TIME] ~ source-distribution==0.0.1 (from https://files.pythonhosted.org/packages/10/1f/57aa4cce1b1abf6b433106676e15f9fa2c92ed2bd4cf77c3b50a9e9ac773/source_distribution-0.0.1.tar.gz) - "### + " ); // Reinstall with the wrong hash, and verify that it's rejected despite being cached. @@ -3827,7 +3827,7 @@ fn require_hashes_source_url() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.txt") .arg("--reinstall") - .arg("--require-hashes"), @r###" + .arg("--require-hashes"), @" success: false exit_code: 1 ----- stdout ----- @@ -3841,7 +3841,7 @@ fn require_hashes_source_url() -> Result<()> { Computed: sha256:1f83ed7498336c7f2ab9b002cf22583d91115ebc624053dc4eb3a45694490106 - "### + " ); Ok(()) @@ -3858,7 +3858,7 @@ fn require_hashes_source_url_mismatch() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.txt") - .arg("--require-hashes"), @r###" + .arg("--require-hashes"), @" success: false exit_code: 1 ----- stdout ----- @@ -3872,7 +3872,7 @@ fn require_hashes_source_url_mismatch() -> Result<()> { Computed: sha256:1f83ed7498336c7f2ab9b002cf22583d91115ebc624053dc4eb3a45694490106 - "### + " ); Ok(()) @@ -3889,7 +3889,7 @@ fn require_hashes_wheel_url() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.txt") - .arg("--require-hashes"), @r###" + .arg("--require-hashes"), @" success: true exit_code: 0 ----- stdout ----- @@ -3899,14 +3899,14 @@ fn require_hashes_wheel_url() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + anyio==4.0.0 (from https://files.pythonhosted.org/packages/36/55/ad4de788d84a630656ece71059665e01ca793c04294c463fd84132f40fe6/anyio-4.0.0-py3-none-any.whl) - "### + " ); // Reinstall with the right hash, and verify that it's reused. uv_snapshot!(context.pip_sync() .arg("requirements.txt") .arg("--reinstall") - .arg("--require-hashes"), @r###" + .arg("--require-hashes"), @" success: true exit_code: 0 ----- stdout ----- @@ -3917,7 +3917,7 @@ fn require_hashes_wheel_url() -> Result<()> { Uninstalled 1 package in [TIME] Installed 1 package in [TIME] ~ anyio==4.0.0 (from https://files.pythonhosted.org/packages/36/55/ad4de788d84a630656ece71059665e01ca793c04294c463fd84132f40fe6/anyio-4.0.0-py3-none-any.whl) - "### + " ); // Reinstall with the wrong hash, and verify that it's rejected despite being cached. @@ -3928,7 +3928,7 @@ fn require_hashes_wheel_url() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.txt") .arg("--reinstall") - .arg("--require-hashes"), @r###" + .arg("--require-hashes"), @" success: false exit_code: 1 ----- stdout ----- @@ -3943,7 +3943,7 @@ fn require_hashes_wheel_url() -> Result<()> { Computed: sha256:cfdb2b588b9fc25ede96d8db56ed50848b0b649dca3dd1df0b11f683bb9e0b5f - "### + " ); // Sync a new dependency and include the wrong hash for anyio. Verify that we reuse anyio @@ -3955,7 +3955,7 @@ fn require_hashes_wheel_url() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.txt") - .arg("--require-hashes"), @r###" + .arg("--require-hashes"), @" success: true exit_code: 0 ----- stdout ----- @@ -3965,7 +3965,7 @@ fn require_hashes_wheel_url() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + iniconfig==2.0.0 - "### + " ); Ok(()) @@ -3982,7 +3982,7 @@ fn require_hashes_wheel_url_mismatch() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.txt") - .arg("--require-hashes"), @r###" + .arg("--require-hashes"), @" success: false exit_code: 1 ----- stdout ----- @@ -3997,7 +3997,7 @@ fn require_hashes_wheel_url_mismatch() -> Result<()> { Computed: sha256:cfdb2b588b9fc25ede96d8db56ed50848b0b649dca3dd1df0b11f683bb9e0b5f - "### + " ); Ok(()) @@ -4015,7 +4015,7 @@ fn require_hashes_git() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.txt") - .arg("--require-hashes"), @r###" + .arg("--require-hashes"), @" success: false exit_code: 1 ----- stdout ----- @@ -4023,7 +4023,7 @@ fn require_hashes_git() -> Result<()> { ----- stderr ----- × Failed to download and build `anyio @ git+https://github.com/agronholm/anyio@4a23745badf5bf5ef7928f1e346e9986bd696d82` ╰─▶ Hash-checking is not supported for Git repositories: `anyio @ git+https://github.com/agronholm/anyio@4a23745badf5bf5ef7928f1e346e9986bd696d82` - "### + " ); Ok(()) @@ -4045,7 +4045,7 @@ fn require_hashes_source_tree() -> Result<()> { uv_snapshot!(context.filters(), context.pip_sync() .arg("requirements.txt") - .arg("--require-hashes"), @r###" + .arg("--require-hashes"), @" success: false exit_code: 1 ----- stdout ----- @@ -4053,7 +4053,7 @@ fn require_hashes_source_tree() -> Result<()> { ----- stderr ----- × Failed to build `black @ file://[WORKSPACE]/test/packages/black_editable` ╰─▶ Hash-checking is not supported for local directories: `black @ file://[WORKSPACE]/test/packages/black_editable` - "### + " ); Ok(()) @@ -4069,7 +4069,7 @@ fn require_hashes_re_download() -> Result<()> { // Install without `--require-hashes`. uv_snapshot!(context.pip_sync() - .arg("requirements.txt"), @r###" + .arg("requirements.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -4079,7 +4079,7 @@ fn require_hashes_re_download() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + anyio==4.0.0 - "### + " ); // Reinstall with `--require-hashes`, and the wrong hash. @@ -4090,7 +4090,7 @@ fn require_hashes_re_download() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.txt") .arg("--reinstall") - .arg("--require-hashes"), @r###" + .arg("--require-hashes"), @" success: false exit_code: 1 ----- stdout ----- @@ -4105,7 +4105,7 @@ fn require_hashes_re_download() -> Result<()> { Computed: sha256:cfdb2b588b9fc25ede96d8db56ed50848b0b649dca3dd1df0b11f683bb9e0b5f - "### + " ); // Reinstall with `--require-hashes`, and the right hash. @@ -4116,7 +4116,7 @@ fn require_hashes_re_download() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.txt") .arg("--reinstall") - .arg("--require-hashes"), @r###" + .arg("--require-hashes"), @" success: true exit_code: 0 ----- stdout ----- @@ -4127,7 +4127,7 @@ fn require_hashes_re_download() -> Result<()> { Uninstalled 1 package in [TIME] Installed 1 package in [TIME] ~ anyio==4.0.0 - "### + " ); Ok(()) @@ -4149,7 +4149,7 @@ fn require_hashes_wheel_path() -> Result<()> { uv_snapshot!(context.filters(), context.pip_sync() .arg("requirements.txt") - .arg("--require-hashes"), @r###" + .arg("--require-hashes"), @" success: true exit_code: 0 ----- stdout ----- @@ -4159,7 +4159,7 @@ fn require_hashes_wheel_path() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + tqdm==1000.0.0 (from file://[WORKSPACE]/test/links/tqdm-1000.0.0-py3-none-any.whl) - "### + " ); Ok(()) @@ -4181,7 +4181,7 @@ fn require_hashes_wheel_path_mismatch() -> Result<()> { uv_snapshot!(context.filters(), context.pip_sync() .arg("requirements.txt") - .arg("--require-hashes"), @r###" + .arg("--require-hashes"), @" success: false exit_code: 1 ----- stdout ----- @@ -4196,7 +4196,7 @@ fn require_hashes_wheel_path_mismatch() -> Result<()> { Computed: sha256:a34996d4bd5abb2336e14ff0a2d22b92cfd0f0ed344e6883041ce01953276a13 - "### + " ); Ok(()) @@ -4218,7 +4218,7 @@ fn require_hashes_source_path() -> Result<()> { uv_snapshot!(context.filters(), context.pip_sync() .arg("requirements.txt") - .arg("--require-hashes"), @r###" + .arg("--require-hashes"), @" success: true exit_code: 0 ----- stdout ----- @@ -4228,7 +4228,7 @@ fn require_hashes_source_path() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + tqdm==999.0.0 (from file://[WORKSPACE]/test/links/tqdm-999.0.0.tar.gz) - "### + " ); Ok(()) @@ -4250,7 +4250,7 @@ fn require_hashes_source_path_mismatch() -> Result<()> { uv_snapshot!(context.filters(), context.pip_sync() .arg("requirements.txt") - .arg("--require-hashes"), @r###" + .arg("--require-hashes"), @" success: false exit_code: 1 ----- stdout ----- @@ -4264,7 +4264,7 @@ fn require_hashes_source_path_mismatch() -> Result<()> { Computed: sha256:89fa05cffa7f457658373b85de302d24d0c205ceda2819a8739e324b75e9430b - "### + " ); Ok(()) @@ -4283,7 +4283,7 @@ fn require_hashes_unnamed() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.txt") - .arg("--require-hashes"), @r###" + .arg("--require-hashes"), @" success: true exit_code: 0 ----- stdout ----- @@ -4293,7 +4293,7 @@ fn require_hashes_unnamed() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + anyio==4.0.0 (from https://files.pythonhosted.org/packages/36/55/ad4de788d84a630656ece71059665e01ca793c04294c463fd84132f40fe6/anyio-4.0.0-py3-none-any.whl) - "### + " ); Ok(()) @@ -4314,14 +4314,14 @@ fn require_hashes_editable() -> Result<()> { // Install the editable packages. uv_snapshot!(context.filters(), context.pip_sync() .arg(requirements_txt.path()) - .arg("--require-hashes"), @r###" + .arg("--require-hashes"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: In `--require-hashes` mode, all requirements must have a hash, but none were provided for: file://[WORKSPACE]/test/packages/black_editable[d] - "### + " ); Ok(()) @@ -4338,14 +4338,14 @@ fn require_hashes_repeated_dependency() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.txt") - .arg("--require-hashes"), @r###" + .arg("--require-hashes"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: In `--require-hashes` mode, all requirements must have their versions pinned with `==`, but found: anyio - "### + " ); // Reverse the order. @@ -4355,14 +4355,14 @@ fn require_hashes_repeated_dependency() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.txt") - .arg("--require-hashes"), @r###" + .arg("--require-hashes"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: In `--require-hashes` mode, all requirements must have their versions pinned with `==`, but found: anyio - "### + " ); Ok(()) @@ -4383,7 +4383,7 @@ fn require_hashes_repeated_hash() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.txt") - .arg("--require-hashes"), @r###" + .arg("--require-hashes"), @" success: true exit_code: 0 ----- stdout ----- @@ -4393,7 +4393,7 @@ fn require_hashes_repeated_hash() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + anyio==4.0.0 (from https://files.pythonhosted.org/packages/36/55/ad4de788d84a630656ece71059665e01ca793c04294c463fd84132f40fe6/anyio-4.0.0-py3-none-any.whl) - "### + " ); // Use a different hash, but both are correct. @@ -4407,7 +4407,7 @@ fn require_hashes_repeated_hash() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.txt") .arg("--require-hashes") - .arg("--reinstall"), @r###" + .arg("--reinstall"), @" success: true exit_code: 0 ----- stdout ----- @@ -4418,7 +4418,7 @@ fn require_hashes_repeated_hash() -> Result<()> { Uninstalled 1 package in [TIME] Installed 1 package in [TIME] ~ anyio==4.0.0 (from https://files.pythonhosted.org/packages/36/55/ad4de788d84a630656ece71059665e01ca793c04294c463fd84132f40fe6/anyio-4.0.0-py3-none-any.whl) - "### + " ); // Use a different hash. The first hash is wrong, but that's fine, since we use the last hash. @@ -4432,7 +4432,7 @@ fn require_hashes_repeated_hash() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.txt") .arg("--require-hashes") - .arg("--reinstall"), @r###" + .arg("--reinstall"), @" success: true exit_code: 0 ----- stdout ----- @@ -4443,7 +4443,7 @@ fn require_hashes_repeated_hash() -> Result<()> { Uninstalled 1 package in [TIME] Installed 1 package in [TIME] ~ anyio==4.0.0 (from https://files.pythonhosted.org/packages/36/55/ad4de788d84a630656ece71059665e01ca793c04294c463fd84132f40fe6/anyio-4.0.0-py3-none-any.whl) - "### + " ); // Use a different hash. The second hash is wrong. This should fail, since we use the last hash. @@ -4457,7 +4457,7 @@ fn require_hashes_repeated_hash() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.txt") .arg("--require-hashes") - .arg("--reinstall"), @r###" + .arg("--reinstall"), @" success: false exit_code: 1 ----- stdout ----- @@ -4472,7 +4472,7 @@ fn require_hashes_repeated_hash() -> Result<()> { Computed: md5:420d85e19168705cdf0223621b18831a - "### + " ); Ok(()) @@ -4490,7 +4490,7 @@ fn require_hashes_at_least_one() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.txt") - .arg("--require-hashes"), @r###" + .arg("--require-hashes"), @" success: true exit_code: 0 ----- stdout ----- @@ -4500,7 +4500,7 @@ fn require_hashes_at_least_one() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + anyio==4.0.0 - "### + " ); // Reinstall, requesting both `sha256` and `sha512`. We should reinstall from the cache, since @@ -4512,7 +4512,7 @@ fn require_hashes_at_least_one() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.txt") .arg("--reinstall") - .arg("--require-hashes"), @r###" + .arg("--require-hashes"), @" success: true exit_code: 0 ----- stdout ----- @@ -4523,7 +4523,7 @@ fn require_hashes_at_least_one() -> Result<()> { Uninstalled 1 package in [TIME] Installed 1 package in [TIME] ~ anyio==4.0.0 - "### + " ); // This should be true even if the second hash is wrong. @@ -4534,7 +4534,7 @@ fn require_hashes_at_least_one() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.txt") .arg("--reinstall") - .arg("--require-hashes"), @r###" + .arg("--require-hashes"), @" success: true exit_code: 0 ----- stdout ----- @@ -4545,7 +4545,7 @@ fn require_hashes_at_least_one() -> Result<()> { Uninstalled 1 package in [TIME] Installed 1 package in [TIME] ~ anyio==4.0.0 - "### + " ); Ok(()) @@ -4566,7 +4566,7 @@ fn require_hashes_find_links_no_hash() -> Result<()> { .arg("--reinstall") .arg("--require-hashes") .arg("--find-links") - .arg("https://raw.githubusercontent.com/astral-test/astral-test-hash/main/no-hash/simple-html/example-a-961b4c22/index.html"), @r###" + .arg("https://raw.githubusercontent.com/astral-test/astral-test-hash/main/no-hash/simple-html/example-a-961b4c22/index.html"), @" success: true exit_code: 0 ----- stdout ----- @@ -4576,7 +4576,7 @@ fn require_hashes_find_links_no_hash() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + example-a-961b4c22==1.0.0 - "### + " ); // Second, use an incorrect hash. @@ -4588,7 +4588,7 @@ fn require_hashes_find_links_no_hash() -> Result<()> { .arg("--reinstall") .arg("--require-hashes") .arg("--find-links") - .arg("https://raw.githubusercontent.com/astral-test/astral-test-hash/main/no-hash/simple-html/example-a-961b4c22/index.html"), @r###" + .arg("https://raw.githubusercontent.com/astral-test/astral-test-hash/main/no-hash/simple-html/example-a-961b4c22/index.html"), @" success: false exit_code: 1 ----- stdout ----- @@ -4603,7 +4603,7 @@ fn require_hashes_find_links_no_hash() -> Result<()> { Computed: sha256:5d69f0b590514103234f0c3526563856f04d044d8d0ea1073a843ae429b3187e - "### + " ); // Third, use the hash from the source distribution. This will actually fail, when it _could_ @@ -4617,7 +4617,7 @@ fn require_hashes_find_links_no_hash() -> Result<()> { .arg("--reinstall") .arg("--require-hashes") .arg("--find-links") - .arg("https://raw.githubusercontent.com/astral-test/astral-test-hash/main/no-hash/simple-html/example-a-961b4c22/index.html"), @r###" + .arg("https://raw.githubusercontent.com/astral-test/astral-test-hash/main/no-hash/simple-html/example-a-961b4c22/index.html"), @" success: false exit_code: 1 ----- stdout ----- @@ -4632,7 +4632,7 @@ fn require_hashes_find_links_no_hash() -> Result<()> { Computed: sha256:5d69f0b590514103234f0c3526563856f04d044d8d0ea1073a843ae429b3187e - "### + " ); // Fourth, use the hash from the source distribution, and disable wheels. This should succeed. @@ -4647,7 +4647,7 @@ fn require_hashes_find_links_no_hash() -> Result<()> { .arg("--reinstall") .arg("--require-hashes") .arg("--find-links") - .arg("https://raw.githubusercontent.com/astral-test/astral-test-hash/main/no-hash/simple-html/example-a-961b4c22/index.html"), @r###" + .arg("https://raw.githubusercontent.com/astral-test/astral-test-hash/main/no-hash/simple-html/example-a-961b4c22/index.html"), @" success: true exit_code: 0 ----- stdout ----- @@ -4658,7 +4658,7 @@ fn require_hashes_find_links_no_hash() -> Result<()> { Uninstalled 1 package in [TIME] Installed 1 package in [TIME] ~ example-a-961b4c22==1.0.0 - "### + " ); Ok(()) @@ -4677,7 +4677,7 @@ fn require_hashes_find_links_valid_hash() -> Result<()> { .arg("requirements.txt") .arg("--require-hashes") .arg("--find-links") - .arg("https://raw.githubusercontent.com/astral-test/astral-test-hash/main/valid-hash/simple-html/example-a-961b4c22/index.html"), @r###" + .arg("https://raw.githubusercontent.com/astral-test/astral-test-hash/main/valid-hash/simple-html/example-a-961b4c22/index.html"), @" success: true exit_code: 0 ----- stdout ----- @@ -4687,7 +4687,7 @@ fn require_hashes_find_links_valid_hash() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + example-a-961b4c22==1.0.0 - "### + " ); Ok(()) @@ -4707,7 +4707,7 @@ fn require_hashes_find_links_invalid_hash() -> Result<()> { .arg("--reinstall") .arg("--require-hashes") .arg("--find-links") - .arg("https://raw.githubusercontent.com/astral-test/astral-test-hash/main/invalid-hash/simple-html/example-a-961b4c22/index.html"), @r###" + .arg("https://raw.githubusercontent.com/astral-test/astral-test-hash/main/invalid-hash/simple-html/example-a-961b4c22/index.html"), @" success: false exit_code: 1 ----- stdout ----- @@ -4722,7 +4722,7 @@ fn require_hashes_find_links_invalid_hash() -> Result<()> { Computed: sha256:5d69f0b590514103234f0c3526563856f04d044d8d0ea1073a843ae429b3187e - "### + " ); // Second, request the invalid hash, that the registry _thinks_ is correct. We should reject it. @@ -4735,7 +4735,7 @@ fn require_hashes_find_links_invalid_hash() -> Result<()> { .arg("--reinstall") .arg("--require-hashes") .arg("--find-links") - .arg("https://raw.githubusercontent.com/astral-test/astral-test-hash/main/invalid-hash/simple-html/example-a-961b4c22/index.html"), @r###" + .arg("https://raw.githubusercontent.com/astral-test/astral-test-hash/main/invalid-hash/simple-html/example-a-961b4c22/index.html"), @" success: false exit_code: 1 ----- stdout ----- @@ -4750,7 +4750,7 @@ fn require_hashes_find_links_invalid_hash() -> Result<()> { Computed: sha256:5d69f0b590514103234f0c3526563856f04d044d8d0ea1073a843ae429b3187e - "### + " ); // Third, request the correct hash, that the registry _thinks_ is correct. We should accept @@ -4764,7 +4764,7 @@ fn require_hashes_find_links_invalid_hash() -> Result<()> { .arg("--reinstall") .arg("--require-hashes") .arg("--find-links") - .arg("https://raw.githubusercontent.com/astral-test/astral-test-hash/main/invalid-hash/simple-html/example-a-961b4c22/index.html"), @r###" + .arg("https://raw.githubusercontent.com/astral-test/astral-test-hash/main/invalid-hash/simple-html/example-a-961b4c22/index.html"), @" success: true exit_code: 0 ----- stdout ----- @@ -4774,7 +4774,7 @@ fn require_hashes_find_links_invalid_hash() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + example-a-961b4c22==1.0.0 - "### + " ); // Fourth, request the correct hash, that the registry _thinks_ is correct, but without the @@ -4789,7 +4789,7 @@ fn require_hashes_find_links_invalid_hash() -> Result<()> { .arg("--reinstall") .arg("--require-hashes") .arg("--find-links") - .arg("https://raw.githubusercontent.com/astral-test/astral-test-hash/main/invalid-hash/simple-html/example-a-961b4c22/index.html"), @r###" + .arg("https://raw.githubusercontent.com/astral-test/astral-test-hash/main/invalid-hash/simple-html/example-a-961b4c22/index.html"), @" success: true exit_code: 0 ----- stdout ----- @@ -4800,7 +4800,7 @@ fn require_hashes_find_links_invalid_hash() -> Result<()> { Uninstalled 1 package in [TIME] Installed 1 package in [TIME] ~ example-a-961b4c22==1.0.0 - "### + " ); // Finally, request the correct hash, along with the incorrect hash for the source distribution. @@ -4815,7 +4815,7 @@ fn require_hashes_find_links_invalid_hash() -> Result<()> { .arg("--reinstall") .arg("--require-hashes") .arg("--find-links") - .arg("https://raw.githubusercontent.com/astral-test/astral-test-hash/main/invalid-hash/simple-html/example-a-961b4c22/index.html"), @r###" + .arg("https://raw.githubusercontent.com/astral-test/astral-test-hash/main/invalid-hash/simple-html/example-a-961b4c22/index.html"), @" success: false exit_code: 1 ----- stdout ----- @@ -4831,7 +4831,7 @@ fn require_hashes_find_links_invalid_hash() -> Result<()> { Computed: sha256:294e788dbe500fdc39e8b88e82652ab67409a1dc9dd06543d0fe0ae31b713eb3 - "### + " ); Ok(()) @@ -4851,7 +4851,7 @@ fn require_hashes_registry_no_hash() -> Result<()> { .arg("requirements.txt") .arg("--require-hashes") .arg("--index-url") - .arg("https://astral-test.github.io/astral-test-hash/no-hash/simple-html/"), @r###" + .arg("https://astral-test.github.io/astral-test-hash/no-hash/simple-html/"), @" success: true exit_code: 0 ----- stdout ----- @@ -4861,7 +4861,7 @@ fn require_hashes_registry_no_hash() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + example-a-961b4c22==1.0.0 - "### + " ); Ok(()) @@ -4881,7 +4881,7 @@ fn require_hashes_registry_valid_hash() -> Result<()> { .arg("requirements.txt") .arg("--require-hashes") .arg("--find-links") - .arg("https://astral-test.github.io/astral-test-hash/valid-hash/simple-html/"), @r###" + .arg("https://astral-test.github.io/astral-test-hash/valid-hash/simple-html/"), @" success: false exit_code: 1 ----- stdout ----- @@ -4889,7 +4889,7 @@ fn require_hashes_registry_valid_hash() -> Result<()> { ----- stderr ----- × No solution found when resolving dependencies: ╰─▶ Because example-a-961b4c22 was not found in the package registry and you require example-a-961b4c22==1.0.0, we can conclude that your requirements are unsatisfiable. - "### + " ); Ok(()) @@ -4910,7 +4910,7 @@ fn require_hashes_registry_invalid_hash() -> Result<()> { .arg("--reinstall") .arg("--require-hashes") .arg("--index-url") - .arg("https://astral-test.github.io/astral-test-hash/invalid-hash/simple-html/"), @r###" + .arg("https://astral-test.github.io/astral-test-hash/invalid-hash/simple-html/"), @" success: false exit_code: 1 ----- stdout ----- @@ -4925,7 +4925,7 @@ fn require_hashes_registry_invalid_hash() -> Result<()> { Computed: sha256:5d69f0b590514103234f0c3526563856f04d044d8d0ea1073a843ae429b3187e - "### + " ); // Second, request the invalid hash, that the registry _thinks_ is correct. We should reject it. @@ -4939,7 +4939,7 @@ fn require_hashes_registry_invalid_hash() -> Result<()> { .arg("--reinstall") .arg("--require-hashes") .arg("--index-url") - .arg("https://astral-test.github.io/astral-test-hash/invalid-hash/simple-html/"), @r###" + .arg("https://astral-test.github.io/astral-test-hash/invalid-hash/simple-html/"), @" success: false exit_code: 1 ----- stdout ----- @@ -4954,7 +4954,7 @@ fn require_hashes_registry_invalid_hash() -> Result<()> { Computed: sha256:5d69f0b590514103234f0c3526563856f04d044d8d0ea1073a843ae429b3187e - "### + " ); // Third, request the correct hash, that the registry _thinks_ is correct. We should accept @@ -4969,7 +4969,7 @@ fn require_hashes_registry_invalid_hash() -> Result<()> { .arg("--reinstall") .arg("--require-hashes") .arg("--index-url") - .arg("https://astral-test.github.io/astral-test-hash/invalid-hash/simple-html/"), @r###" + .arg("https://astral-test.github.io/astral-test-hash/invalid-hash/simple-html/"), @" success: true exit_code: 0 ----- stdout ----- @@ -4979,7 +4979,7 @@ fn require_hashes_registry_invalid_hash() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + example-a-961b4c22==1.0.0 - "### + " ); // Fourth, request the correct hash, that the registry _thinks_ is correct, but without the @@ -4995,7 +4995,7 @@ fn require_hashes_registry_invalid_hash() -> Result<()> { .arg("--reinstall") .arg("--require-hashes") .arg("--index-url") - .arg("https://astral-test.github.io/astral-test-hash/invalid-hash/simple-html/"), @r###" + .arg("https://astral-test.github.io/astral-test-hash/invalid-hash/simple-html/"), @" success: true exit_code: 0 ----- stdout ----- @@ -5006,7 +5006,7 @@ fn require_hashes_registry_invalid_hash() -> Result<()> { Uninstalled 1 package in [TIME] Installed 1 package in [TIME] ~ example-a-961b4c22==1.0.0 - "### + " ); // Finally, request the correct hash, along with the incorrect hash for the source distribution. @@ -5022,7 +5022,7 @@ fn require_hashes_registry_invalid_hash() -> Result<()> { .arg("--reinstall") .arg("--require-hashes") .arg("--index-url") - .arg("https://astral-test.github.io/astral-test-hash/invalid-hash/simple-html/"), @r###" + .arg("https://astral-test.github.io/astral-test-hash/invalid-hash/simple-html/"), @" success: false exit_code: 1 ----- stdout ----- @@ -5038,7 +5038,7 @@ fn require_hashes_registry_invalid_hash() -> Result<()> { Computed: sha256:294e788dbe500fdc39e8b88e82652ab67409a1dc9dd06543d0fe0ae31b713eb3 - "### + " ); Ok(()) @@ -5055,7 +5055,7 @@ fn require_hashes_url() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.txt") - .arg("--require-hashes"), @r###" + .arg("--require-hashes"), @" success: true exit_code: 0 ----- stdout ----- @@ -5065,7 +5065,7 @@ fn require_hashes_url() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + iniconfig==2.0.0 (from https://files.pythonhosted.org/packages/ef/a6/62565a6e1cf69e10f5727360368e451d4b7f58beeac6173dc9db836a5b46/iniconfig-2.0.0-py3-none-any.whl#sha256=b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374) - "### + " ); Ok(()) @@ -5082,14 +5082,14 @@ fn require_hashes_url_other_fragment() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.txt") - .arg("--require-hashes"), @r###" + .arg("--require-hashes"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: In `--require-hashes` mode, all requirements must have a hash, but none were provided for: iniconfig @ https://files.pythonhosted.org/packages/ef/a6/62565a6e1cf69e10f5727360368e451d4b7f58beeac6173dc9db836a5b46/iniconfig-2.0.0-py3-none-any.whl#foo=bar - "### + " ); Ok(()) @@ -5106,7 +5106,7 @@ fn require_hashes_url_invalid() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.txt") - .arg("--require-hashes"), @r###" + .arg("--require-hashes"), @" success: false exit_code: 1 ----- stdout ----- @@ -5121,7 +5121,7 @@ fn require_hashes_url_invalid() -> Result<()> { Computed: sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374 - "### + " ); Ok(()) @@ -5138,7 +5138,7 @@ fn require_hashes_url_ignore() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.txt") - .arg("--require-hashes"), @r###" + .arg("--require-hashes"), @" success: false exit_code: 1 ----- stdout ----- @@ -5153,7 +5153,7 @@ fn require_hashes_url_ignore() -> Result<()> { Computed: sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374 - "### + " ); Ok(()) @@ -5170,7 +5170,7 @@ fn require_hashes_url_unnamed() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.txt") - .arg("--require-hashes"), @r###" + .arg("--require-hashes"), @" success: true exit_code: 0 ----- stdout ----- @@ -5180,7 +5180,7 @@ fn require_hashes_url_unnamed() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + iniconfig==2.0.0 (from https://files.pythonhosted.org/packages/ef/a6/62565a6e1cf69e10f5727360368e451d4b7f58beeac6173dc9db836a5b46/iniconfig-2.0.0-py3-none-any.whl#sha256=b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374) - "### + " ); Ok(()) @@ -5201,7 +5201,7 @@ fn target_built_distribution() -> Result<()> { uv_snapshot!(context.filters(), context.pip_sync() .arg("requirements.in") .arg("--target") - .arg("target"), @r" + .arg("target"), @" success: true exit_code: 0 ----- stdout ----- @@ -5237,7 +5237,7 @@ fn target_built_distribution() -> Result<()> { uv_snapshot!(context.filters(), context.pip_sync() .arg("requirements.in") .arg("--target") - .arg("target"), @r" + .arg("target"), @" success: true exit_code: 0 ----- stdout ----- @@ -5259,7 +5259,7 @@ fn target_built_distribution() -> Result<()> { uv_snapshot!(context.filters(), context.pip_sync() .arg("requirements.in") .arg("--target") - .arg("target"), @r" + .arg("target"), @" success: true exit_code: 0 ----- stdout ----- @@ -5303,7 +5303,7 @@ fn target_source_distribution() -> Result<()> { .arg("--no-binary") .arg("iniconfig") .arg("--target") - .arg("target"), @r" + .arg("target"), @" success: true exit_code: 0 ----- stdout ----- @@ -5352,7 +5352,7 @@ fn target_no_build_isolation() -> Result<()> { requirements_in.write_str("flit_core")?; uv_snapshot!(context.filters(), context.pip_sync() - .arg("requirements.in"), @r" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -5374,7 +5374,7 @@ fn target_no_build_isolation() -> Result<()> { .arg("--no-binary") .arg("wheel") .arg("--target") - .arg("target"), @r" + .arg("target"), @" success: true exit_code: 0 ----- stdout ----- @@ -5421,7 +5421,7 @@ fn target_system() -> Result<()> { uv_snapshot!(context.filters(), context.pip_sync() .arg("requirements.in") .arg("--target") - .arg("target"), @r" + .arg("target"), @" success: true exit_code: 0 ----- stdout ----- @@ -5457,7 +5457,7 @@ fn prefix() -> Result<()> { uv_snapshot!(context.filters(), context.pip_sync() .arg("requirements.in") .arg("--prefix") - .arg(prefix.path()), @r" + .arg(prefix.path()), @" success: true exit_code: 0 ----- stdout ----- @@ -5493,7 +5493,7 @@ fn prefix() -> Result<()> { uv_snapshot!(context.filters(), context.pip_sync() .arg("requirements.in") .arg("--prefix") - .arg(prefix.path()), @r" + .arg(prefix.path()), @" success: true exit_code: 0 ----- stdout ----- @@ -5520,7 +5520,7 @@ fn preserve_markers() -> Result<()> { requirements_txt.write_str("anyio ; python_version > '3.7'")?; uv_snapshot!(context.pip_sync() - .arg("requirements.txt"), @r###" + .arg("requirements.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -5530,7 +5530,7 @@ fn preserve_markers() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + anyio==4.3.0 - "### + " ); Ok(()) @@ -5549,7 +5549,7 @@ fn incompatible_build_constraint() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.txt") .arg("--build-constraint") - .arg("build_constraints.txt"), @r###" + .arg("build_constraints.txt"), @" success: false exit_code: 1 ----- stdout ----- @@ -5560,7 +5560,7 @@ fn incompatible_build_constraint() -> Result<()> { ├─▶ Failed to resolve requirements from `setup.py` build ├─▶ No solution found when resolving: `setuptools>=40.8.0` ╰─▶ Because you require setuptools>=40.8.0 and setuptools==1, we can conclude that your requirements are unsatisfiable. - "### + " ); Ok(()) @@ -5579,7 +5579,7 @@ fn compatible_build_constraint() -> Result<()> { uv_snapshot!(context.pip_sync() .arg("requirements.txt") .arg("--build-constraint") - .arg("build_constraints.txt"), @r###" + .arg("build_constraints.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -5589,7 +5589,7 @@ fn compatible_build_constraint() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + requests==1.2.0 - "### + " ); Ok(()) @@ -5604,7 +5604,7 @@ fn sync_seed() -> Result<()> { // Add `pip` to the environment. uv_snapshot!(context.filters(), context.pip_install() - .arg("pip"), @r###" + .arg("pip"), @" success: true exit_code: 0 ----- stdout ----- @@ -5614,12 +5614,12 @@ fn sync_seed() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + pip==24.0 - "### + " ); // Syncing should remove the seed packages. uv_snapshot!(context.filters(), context.pip_sync() - .arg("requirements.txt"), @r" + .arg("requirements.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -5636,7 +5636,7 @@ fn sync_seed() -> Result<()> { // Re-create the environment with seed packages. uv_snapshot!(context.filters(), context.venv().arg("--clear") - .arg("--seed"), @r" + .arg("--seed"), @" success: true exit_code: 0 ----- stdout ----- @@ -5653,7 +5653,7 @@ fn sync_seed() -> Result<()> { // Syncing should retain the seed packages. uv_snapshot!(context.filters(), context.pip_sync() - .arg("requirements.txt"), @r" + .arg("requirements.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -5678,7 +5678,7 @@ fn sanitize() -> Result<()> { requirements_txt.write_str("payload-package @ https://github.com/astral-sh/sanitize-wheel-test/raw/bc59283d5b4b136a191792e32baa51b477fdf65e/payload_package-0.1.0-py3-none-any.whl")?; uv_snapshot!(context.pip_sync() - .arg("requirements.txt"), @r###" + .arg("requirements.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -5688,7 +5688,7 @@ fn sanitize() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + payload-package==0.1.0 (from https://github.com/astral-sh/sanitize-wheel-test/raw/bc59283d5b4b136a191792e32baa51b477fdf65e/payload_package-0.1.0-py3-none-any.whl) - "### + " ); // There should be no `payload` file in the root. @@ -5708,7 +5708,7 @@ fn semicolon_trailing_space() -> Result<()> { requirements.write_str("iniconfig @ https://files.pythonhosted.org/packages/ef/a6/62565a6e1cf69e10f5727360368e451d4b7f58beeac6173dc9db836a5b46/iniconfig-2.0.0-py3-none-any.whl; python_version > '3.10'")?; uv_snapshot!(context.pip_sync() - .arg("requirements.txt"), @r###" + .arg("requirements.txt"), @" success: true exit_code: 0 ----- stdout ----- @@ -5718,7 +5718,7 @@ fn semicolon_trailing_space() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + iniconfig==2.0.0 (from https://files.pythonhosted.org/packages/ef/a6/62565a6e1cf69e10f5727360368e451d4b7f58beeac6173dc9db836a5b46/iniconfig-2.0.0-py3-none-any.whl) - "### + " ); Ok(()) @@ -5733,7 +5733,7 @@ fn semicolon_no_space() -> Result<()> { requirements.write_str("iniconfig @ https://files.pythonhosted.org/packages/ef/a6/62565a6e1cf69e10f5727360368e451d4b7f58beeac6173dc9db836a5b46/iniconfig-2.0.0-py3-none-any.whl;python_version > '3.10'")?; uv_snapshot!(context.pip_sync() - .arg("requirements.txt"), @r###" + .arg("requirements.txt"), @" success: false exit_code: 2 ----- stdout ----- @@ -5743,7 +5743,7 @@ fn semicolon_no_space() -> Result<()> { Caused by: Expected direct URL (`https://files.pythonhosted.org/packages/ef/a6/62565a6e1cf69e10f5727360368e451d4b7f58beeac6173dc9db836a5b46/iniconfig-2.0.0-py3-none-any.whl;python_version%20%3E%20'3.10'`) to end in a supported file extension: `.whl`, `.tar.gz`, `.zip`, `.tar.bz2`, `.tar.lz`, `.tar.lzma`, `.tar.xz`, `.tar.zst`, `.tar`, `.tbz`, `.tgz`, `.tlz`, or `.txz` iniconfig @ https://files.pythonhosted.org/packages/ef/a6/62565a6e1cf69e10f5727360368e451d4b7f58beeac6173dc9db836a5b46/iniconfig-2.0.0-py3-none-any.whl;python_version > '3.10' ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - "### + " ); Ok(()) @@ -5773,7 +5773,7 @@ fn pep_751() -> Result<()> { uv_snapshot!(context.filters(), context.pip_sync() .arg("--preview") - .arg("pylock.toml"), @r" + .arg("pylock.toml"), @" success: true exit_code: 0 ----- stdout ----- @@ -5789,7 +5789,7 @@ fn pep_751() -> Result<()> { uv_snapshot!(context.filters(), context.pip_sync() .arg("--preview") - .arg("pylock.toml"), @r" + .arg("pylock.toml"), @" success: true exit_code: 0 ----- stdout ----- @@ -5819,7 +5819,7 @@ fn pep_751() -> Result<()> { uv_snapshot!(context.filters(), context.pip_sync() .arg("--preview") - .arg("pylock.toml"), @r" + .arg("pylock.toml"), @" success: true exit_code: 0 ----- stdout ----- @@ -5871,7 +5871,7 @@ fn pep_751_wheel_only() -> Result<()> { .arg("pylock.toml") .arg("--dry-run") .arg("--python-platform") - .arg("macos"), @r" + .arg("macos"), @" success: true exit_code: 0 ----- stdout ----- @@ -5900,7 +5900,7 @@ fn pep_751_wheel_only() -> Result<()> { .arg("--python-platform") .arg("macos") .arg("--python-version") - .arg("3.8"), @r" + .arg("3.8"), @" success: false exit_code: 2 ----- stdout ----- @@ -5942,7 +5942,7 @@ fn pep_751_build_options() -> Result<()> { .arg("--preview") .arg("pylock.toml") .arg("--no-binary") - .arg("anyio"), @r" + .arg("anyio"), @" success: true exit_code: 0 ----- stdout ----- @@ -5979,7 +5979,7 @@ fn pep_751_build_options() -> Result<()> { .arg("--preview") .arg("pylock.toml") .arg("--no-binary") - .arg("odrive"), @r" + .arg("odrive"), @" success: false exit_code: 2 ----- stdout ----- @@ -6011,7 +6011,7 @@ fn pep_751_build_options() -> Result<()> { .arg("--preview") .arg("pylock.toml") .arg("--only-binary") - .arg("source-distribution"), @r" + .arg("source-distribution"), @" success: false exit_code: 2 ----- stdout ----- @@ -6025,7 +6025,7 @@ fn pep_751_build_options() -> Result<()> { .arg("--preview") .arg("pylock.toml") .arg("--no-binary") - .arg("source-distribution"), @r" + .arg("source-distribution"), @" success: true exit_code: 0 ----- stdout ----- @@ -6071,7 +6071,7 @@ fn pep_751_direct_url_tags() -> Result<()> { .arg("--preview") .arg("pylock.toml") .arg("--python-platform") - .arg("linux"), @r" + .arg("linux"), @" success: false exit_code: 2 ----- stdout ----- @@ -6088,7 +6088,7 @@ fn pep_751_direct_url_tags() -> Result<()> { .arg("--preview") .arg("pylock.toml") .arg("--python-platform") - .arg("macos"), @r" + .arg("macos"), @" success: true exit_code: 0 ----- stdout ----- @@ -6112,7 +6112,7 @@ fn incompatible_python_version_direct_url() -> Result<()> { uv_snapshot!(context.filters(), context.pip_sync() .arg("requirements.txt") .arg("--python-platform") - .arg("windows"), @r" + .arg("windows"), @" success: false exit_code: 2 ----- stdout ----- @@ -6139,7 +6139,7 @@ fn incompatible_platform_direct_url() -> Result<()> { uv_snapshot!(context.filters(), context.pip_sync() .arg("requirements.txt") .arg("--python-platform") - .arg("linux"), @r" + .arg("linux"), @" success: false exit_code: 2 ----- stdout ----- @@ -6171,14 +6171,14 @@ fn sync_missing_python_no_target() -> Result<()> { // Request Python 3.12; which should fail uv_snapshot!(context.filters(), context.pip_sync() .arg("--python").arg("3.12") - .arg("requirements.txt"), @r###" + .arg("requirements.txt"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: No virtual environment found for Python 3.12; run `uv venv` to create an environment, or pass `--system` to install into a non-virtual environment - "### + " ); Ok(()) } @@ -6199,18 +6199,18 @@ fn sync_with_target_installs_missing_python() -> Result<()> { uv_snapshot!(context.filters(), context.pip_sync() .arg("requirements.txt") .arg("--python").arg("3.12") - .arg("--target").arg(target_dir.path()), @r###" - success: true - exit_code: 0 - ----- stdout ----- + .arg("--target").arg(target_dir.path()), @" + success: true + exit_code: 0 + ----- stdout ----- - ----- stderr ----- - Using CPython 3.12.12 - Resolved 1 package in [TIME] - Prepared 1 package in [TIME] - Installed 1 package in [TIME] - + anyio==4.3.0 - "### + ----- stderr ----- + Using CPython 3.12.12 + Resolved 1 package in [TIME] + Prepared 1 package in [TIME] + Installed 1 package in [TIME] + + anyio==4.3.0 + " ); Ok(()) } diff --git a/crates/uv/tests/it/pip_tree.rs b/crates/uv/tests/it/pip_tree.rs index dcb975564..df79cd9c5 100644 --- a/crates/uv/tests/it/pip_tree.rs +++ b/crates/uv/tests/it/pip_tree.rs @@ -18,14 +18,14 @@ use crate::common::{TestContext, uv_snapshot}; fn no_package() { let context = TestContext::new("3.12"); - uv_snapshot!(context.filters(), context.pip_tree(), @r###" + uv_snapshot!(context.filters(), context.pip_tree(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- - "### + " ); } @@ -41,7 +41,7 @@ fn prune_last_in_the_subgroup() { .pip_install() .arg("-r") .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -55,11 +55,11 @@ fn prune_last_in_the_subgroup() { + idna==3.6 + requests==2.31.0 + urllib3==2.2.1 - "### + " ); context.assert_command("import requests").success(); - uv_snapshot!(context.filters(), context.pip_tree().arg("--prune").arg("certifi"), @r###" + uv_snapshot!(context.filters(), context.pip_tree().arg("--prune").arg("certifi"), @" success: true exit_code: 0 ----- stdout ----- @@ -69,7 +69,7 @@ fn prune_last_in_the_subgroup() { └── urllib3 v2.2.1 ----- stderr ----- - "### + " ); } @@ -85,7 +85,7 @@ fn single_package() { .pip_install() .arg("-r") .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -99,12 +99,12 @@ fn single_package() { + idna==3.6 + requests==2.31.0 + urllib3==2.2.1 - "### + " ); context.assert_command("import requests").success(); - uv_snapshot!(context.filters(), context.pip_tree(), @r###" + uv_snapshot!(context.filters(), context.pip_tree(), @" success: true exit_code: 0 ----- stdout ----- @@ -115,7 +115,7 @@ fn single_package() { └── urllib3 v2.2.1 ----- stderr ----- - "### + " ); } @@ -131,7 +131,7 @@ fn nested_dependencies() { .pip_install() .arg("-r") .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -147,10 +147,10 @@ fn nested_dependencies() { + jinja2==3.1.3 + markupsafe==2.1.5 + werkzeug==3.0.1 - "### + " ); - uv_snapshot!(context.filters(), context.pip_tree(), @r###" + uv_snapshot!(context.filters(), context.pip_tree(), @" success: true exit_code: 0 ----- stdout ----- @@ -164,7 +164,7 @@ fn nested_dependencies() { └── markupsafe v2.1.5 ----- stderr ----- - "### + " ); } @@ -181,7 +181,7 @@ fn reverse() { .pip_install() .arg("-r") .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -197,10 +197,10 @@ fn reverse() { + jinja2==3.1.3 + markupsafe==2.1.5 + werkzeug==3.0.1 - "### + " ); - uv_snapshot!(context.filters(), context.pip_tree().arg("--reverse"), @r###" + uv_snapshot!(context.filters(), context.pip_tree().arg("--reverse"), @" success: true exit_code: 0 ----- stdout ----- @@ -217,7 +217,7 @@ fn reverse() { └── flask v3.0.2 ----- stderr ----- - "### + " ); } @@ -233,7 +233,7 @@ fn invert() { .pip_install() .arg("-r") .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -249,10 +249,10 @@ fn invert() { + jinja2==3.1.3 + markupsafe==2.1.5 + werkzeug==3.0.1 - "### + " ); - uv_snapshot!(context.filters(), context.pip_tree().arg("--invert"), @r###" + uv_snapshot!(context.filters(), context.pip_tree().arg("--invert"), @" success: true exit_code: 0 ----- stdout ----- @@ -269,7 +269,7 @@ fn invert() { └── flask v3.0.2 ----- stderr ----- - "### + " ); } @@ -284,7 +284,7 @@ fn depth() { uv_snapshot!(context.pip_install() .arg("-r") .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -300,7 +300,7 @@ fn depth() { + jinja2==3.1.3 + markupsafe==2.1.5 + werkzeug==3.0.1 - "### + " ); uv_snapshot!(context.filters(), Command::new(get_bin()) @@ -312,14 +312,14 @@ fn depth() { .arg("0") .env(EnvVars::VIRTUAL_ENV, context.venv.as_os_str()) .env(EnvVars::UV_NO_WRAP, "1") - .current_dir(&context.temp_dir), @r###" + .current_dir(&context.temp_dir), @" success: true exit_code: 0 ----- stdout ----- flask v3.0.2 ----- stderr ----- - "### + " ); uv_snapshot!(context.filters(), Command::new(get_bin()) @@ -331,7 +331,7 @@ fn depth() { .arg("1") .env(EnvVars::VIRTUAL_ENV, context.venv.as_os_str()) .env(EnvVars::UV_NO_WRAP, "1") - .current_dir(&context.temp_dir), @r###" + .current_dir(&context.temp_dir), @" success: true exit_code: 0 ----- stdout ----- @@ -343,7 +343,7 @@ fn depth() { └── werkzeug v3.0.1 ----- stderr ----- - "### + " ); uv_snapshot!(context.filters(), Command::new(get_bin()) @@ -355,7 +355,7 @@ fn depth() { .arg("2") .env(EnvVars::VIRTUAL_ENV, context.venv.as_os_str()) .env(EnvVars::UV_NO_WRAP, "1") - .current_dir(&context.temp_dir), @r###" + .current_dir(&context.temp_dir), @" success: true exit_code: 0 ----- stdout ----- @@ -369,7 +369,7 @@ fn depth() { └── markupsafe v2.1.5 ----- stderr ----- - "### + " ); } @@ -384,7 +384,7 @@ fn prune() { uv_snapshot!(context.pip_install() .arg("-r") .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -400,7 +400,7 @@ fn prune() { + jinja2==3.1.3 + markupsafe==2.1.5 + werkzeug==3.0.1 - "### + " ); uv_snapshot!(context.filters(), Command::new(get_bin()) @@ -412,7 +412,7 @@ fn prune() { .arg("werkzeug") .env(EnvVars::VIRTUAL_ENV, context.venv.as_os_str()) .env(EnvVars::UV_NO_WRAP, "1") - .current_dir(&context.temp_dir), @r###" + .current_dir(&context.temp_dir), @" success: true exit_code: 0 ----- stdout ----- @@ -424,7 +424,7 @@ fn prune() { └── markupsafe v2.1.5 ----- stderr ----- - "### + " ); uv_snapshot!(context.filters(), Command::new(get_bin()) @@ -438,7 +438,7 @@ fn prune() { .arg("jinja2") .env(EnvVars::VIRTUAL_ENV, context.venv.as_os_str()) .env(EnvVars::UV_NO_WRAP, "1") - .current_dir(&context.temp_dir), @r###" + .current_dir(&context.temp_dir), @" success: true exit_code: 0 ----- stdout ----- @@ -449,7 +449,7 @@ fn prune() { markupsafe v2.1.5 ----- stderr ----- - "### + " ); uv_snapshot!(context.filters(), Command::new(get_bin()) @@ -461,7 +461,7 @@ fn prune() { .arg("werkzeug") .env(EnvVars::VIRTUAL_ENV, context.venv.as_os_str()) .env(EnvVars::UV_NO_WRAP, "1") - .current_dir(&context.temp_dir), @r###" + .current_dir(&context.temp_dir), @" success: true exit_code: 0 ----- stdout ----- @@ -473,7 +473,7 @@ fn prune() { └── markupsafe v2.1.5 ----- stderr ----- - "### + " ); } @@ -490,7 +490,7 @@ fn removed_dependency() { .pip_install() .arg("-r") .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -504,12 +504,12 @@ fn removed_dependency() { + idna==3.6 + requests==2.31.0 + urllib3==2.2.1 - "### + " ); uv_snapshot!(context.filters(), context .pip_uninstall() - .arg("requests"), @r###" + .arg("requests"), @" success: true exit_code: 0 ----- stdout ----- @@ -517,10 +517,10 @@ fn removed_dependency() { ----- stderr ----- Uninstalled 1 package in [TIME] - requests==2.31.0 - "### + " ); - uv_snapshot!(context.filters(), context.pip_tree(), @r###" + uv_snapshot!(context.filters(), context.pip_tree(), @" success: true exit_code: 0 ----- stdout ----- @@ -530,7 +530,7 @@ fn removed_dependency() { urllib3 v2.2.1 ----- stderr ----- - "### + " ); } @@ -553,7 +553,7 @@ fn multiple_packages() { .pip_install() .arg("-r") .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -568,11 +568,11 @@ fn multiple_packages() { + idna==3.6 + requests==2.31.0 + urllib3==2.2.1 - "### + " ); context.assert_command("import requests").success(); - uv_snapshot!(context.filters(), context.pip_tree(), @r###" + uv_snapshot!(context.filters(), context.pip_tree(), @" success: true exit_code: 0 ----- stdout ----- @@ -584,7 +584,7 @@ fn multiple_packages() { └── urllib3 v2.2.1 ----- stderr ----- - "### + " ); } @@ -608,7 +608,7 @@ fn cycle() { .pip_install() .arg("-r") .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -627,10 +627,10 @@ fn cycle() { + testtools==2.3.0 + traceback2==1.4.0 + unittest2==1.1.0 - "### + " ); - uv_snapshot!(context.filters(), context.pip_tree(), @r###" + uv_snapshot!(context.filters(), context.pip_tree(), @" success: true exit_code: 0 ----- stdout ----- @@ -652,7 +652,7 @@ fn cycle() { (*) Package tree already displayed ----- stderr ----- - "### + " ); } @@ -676,7 +676,7 @@ fn multiple_packages_shared_descendant() { .pip_install() .arg("-r") .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -690,10 +690,10 @@ fn multiple_packages_shared_descendant() { + six==1.16.0 + time-machine==2.14.1 + tzdata==2024.1 - "### + " ); - uv_snapshot!(context.filters(), context.pip_tree(), @r###" + uv_snapshot!(context.filters(), context.pip_tree(), @" success: true exit_code: 0 ----- stdout ----- @@ -706,7 +706,7 @@ fn multiple_packages_shared_descendant() { (*) Package tree already displayed ----- stderr ----- - "### + " ); } @@ -730,7 +730,7 @@ fn no_dedupe_and_invert() { .pip_install() .arg("-r") .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -744,10 +744,10 @@ fn no_dedupe_and_invert() { + six==1.16.0 + time-machine==2.14.1 + tzdata==2024.1 - "### + " ); - uv_snapshot!(context.filters(), context.pip_tree().arg("--no-dedupe").arg("--invert"), @r###" + uv_snapshot!(context.filters(), context.pip_tree().arg("--no-dedupe").arg("--invert"), @" success: true exit_code: 0 ----- stdout ----- @@ -760,7 +760,7 @@ fn no_dedupe_and_invert() { └── pendulum v3.0.0 ----- stderr ----- - "### + " ); } @@ -783,7 +783,7 @@ fn no_dedupe() { .pip_install() .arg("-r") .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -797,11 +797,11 @@ fn no_dedupe() { + six==1.16.0 + time-machine==2.14.1 + tzdata==2024.1 - "### + " ); uv_snapshot!(context.filters(), context.pip_tree() - .arg("--no-dedupe"), @r###" + .arg("--no-dedupe"), @" success: true exit_code: 0 ----- stdout ----- @@ -814,7 +814,7 @@ fn no_dedupe() { └── tzdata v2024.1 ----- stderr ----- - "### + " ); } @@ -827,7 +827,7 @@ fn with_editable() { uv_snapshot!(context.filters(), context .pip_install() .arg("-e") - .arg(context.workspace_root.join("test/packages/hatchling_editable")), @r###" + .arg(context.workspace_root.join("test/packages/hatchling_editable")), @" success: true exit_code: 0 ----- stdout ----- @@ -838,7 +838,7 @@ fn with_editable() { Installed 2 packages in [TIME] + hatchling-editable==0.1.0 (from file://[WORKSPACE]/test/packages/hatchling_editable) + iniconfig==2.0.1.dev6+g9cae431 (from git+https://github.com/pytest-dev/iniconfig@9cae43103df70bac6fde7b9f35ad11a9f1be0cb4) - "### + " ); let filters = context @@ -847,7 +847,7 @@ fn with_editable() { .chain(vec![(r"\-\-\-\-\-\-+.*", "[UNDERLINE]"), (" +", " ")]) .collect::>(); - uv_snapshot!(filters, context.pip_tree(), @r###" + uv_snapshot!(filters, context.pip_tree(), @" success: true exit_code: 0 ----- stdout ----- @@ -855,7 +855,7 @@ fn with_editable() { └── iniconfig v2.0.1.dev6+g9cae431 ----- stderr ----- - "### + " ); } @@ -871,7 +871,7 @@ fn package_flag() { .pip_install() .arg("-r") .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -887,7 +887,7 @@ fn package_flag() { + jinja2==3.1.3 + markupsafe==2.1.5 + werkzeug==3.0.1 - "### + " ); uv_snapshot!( @@ -895,7 +895,7 @@ fn package_flag() { context.pip_tree() .arg("--package") .arg("werkzeug"), - @r###" + @" success: true exit_code: 0 ----- stdout ----- @@ -903,7 +903,7 @@ fn package_flag() { └── markupsafe v2.1.5 ----- stderr ----- - "### + " ); uv_snapshot!( @@ -913,7 +913,7 @@ fn package_flag() { .arg("werkzeug") .arg("--package") .arg("jinja2"), - @r###" + @" success: true exit_code: 0 ----- stdout ----- @@ -923,7 +923,7 @@ fn package_flag() { └── markupsafe v2.1.5 ----- stderr ----- - "### + " ); } @@ -939,7 +939,7 @@ fn show_version_specifiers_simple() { .pip_install() .arg("-r") .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -953,10 +953,10 @@ fn show_version_specifiers_simple() { + idna==3.6 + requests==2.31.0 + urllib3==2.2.1 - "### + " ); - uv_snapshot!(context.filters(), context.pip_tree().arg("--show-version-specifiers"), @r###" + uv_snapshot!(context.filters(), context.pip_tree().arg("--show-version-specifiers"), @" success: true exit_code: 0 ----- stdout ----- @@ -967,7 +967,7 @@ fn show_version_specifiers_simple() { └── urllib3 v2.2.1 [required: >=1.21.1, <3] ----- stderr ----- - "### + " ); } @@ -983,7 +983,7 @@ fn show_version_specifiers_with_invert() { .pip_install() .arg("-r") .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -999,14 +999,14 @@ fn show_version_specifiers_with_invert() { + jinja2==3.1.3 + markupsafe==2.1.5 + werkzeug==3.0.1 - "### + " ); uv_snapshot!( context.filters(), context.pip_tree() .arg("--show-version-specifiers") - .arg("--invert"), @r###" + .arg("--invert"), @" success: true exit_code: 0 ----- stdout ----- @@ -1023,7 +1023,7 @@ fn show_version_specifiers_with_invert() { └── flask v3.0.2 [requires: werkzeug >=3.0.0] ----- stderr ----- - "### + " ); } @@ -1039,7 +1039,7 @@ fn show_version_specifiers_with_package() { .pip_install() .arg("-r") .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -1055,7 +1055,7 @@ fn show_version_specifiers_with_package() { + jinja2==3.1.3 + markupsafe==2.1.5 + werkzeug==3.0.1 - "### + " ); uv_snapshot!( @@ -1063,7 +1063,7 @@ fn show_version_specifiers_with_package() { context.pip_tree() .arg("--show-version-specifiers") .arg("--package") - .arg("werkzeug"), @r###" + .arg("werkzeug"), @" success: true exit_code: 0 ----- stdout ----- @@ -1071,7 +1071,7 @@ fn show_version_specifiers_with_package() { └── markupsafe v2.1.5 [required: >=2.1.1] ----- stderr ----- - "### + " ); } @@ -1087,7 +1087,7 @@ fn print_output_even_with_quite_flag() { .pip_install() .arg("-r") .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -1101,17 +1101,17 @@ fn print_output_even_with_quite_flag() { + idna==3.6 + requests==2.31.0 + urllib3==2.2.1 - "### + " ); context.assert_command("import requests").success(); - uv_snapshot!(context.filters(), context.pip_tree().arg("--quiet"), @r###" + uv_snapshot!(context.filters(), context.pip_tree().arg("--quiet"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- - "### + " ); } @@ -1127,7 +1127,7 @@ fn outdated() { .pip_install() .arg("-r") .arg("requirements.txt") - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -1142,12 +1142,12 @@ fn outdated() { + jinja2==3.1.3 + markupsafe==2.1.5 + werkzeug==3.0.1 - "### + " ); uv_snapshot!( context.filters(), - context.pip_tree().arg("--outdated"), @r###" + context.pip_tree().arg("--outdated"), @" success: true exit_code: 0 ----- stdout ----- @@ -1160,7 +1160,7 @@ fn outdated() { └── markupsafe v2.1.5 ----- stderr ----- - "### + " ); } @@ -1205,7 +1205,7 @@ fn no_duplicate_dependencies_with_markers() { uv_snapshot!(context.filters(), context .pip_install() .arg(project.path()) - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -1216,12 +1216,12 @@ fn no_duplicate_dependencies_with_markers() { Installed [N] packages in [TIME] + debug==0.1.0 (from file://[TEMP_DIR]/debug) + sniffio==1.3.1 - "### + " ); // Ensure that the dependency is only listed once, even though `debug` declares multiple // marker-specific requirements for the same dependency. - uv_snapshot!(context.filters(), context.pip_tree(), @r###" + uv_snapshot!(context.filters(), context.pip_tree(), @" success: true exit_code: 0 ----- stdout ----- @@ -1229,13 +1229,13 @@ fn no_duplicate_dependencies_with_markers() { └── sniffio v1.3.1 ----- stderr ----- - "### + " ); uv_snapshot!( context.filters(), context.pip_tree().arg("--show-version-specifiers"), - @r###" + @" success: true exit_code: 0 ----- stdout ----- @@ -1243,7 +1243,7 @@ fn no_duplicate_dependencies_with_markers() { └── sniffio v1.3.1 [required: >=1.0.1] ----- stderr ----- - "### + " ); context @@ -1257,7 +1257,7 @@ fn no_duplicate_dependencies_with_markers() { uv_snapshot!(context.filters(), context .pip_install() .arg(project.path()) - .arg("--strict"), @r###" + .arg("--strict"), @" success: true exit_code: 0 ----- stdout ----- @@ -1268,13 +1268,13 @@ fn no_duplicate_dependencies_with_markers() { Installed [N] packages in [TIME] + debug==0.1.0 (from file://[TEMP_DIR]/debug) + sniffio==1.3.1 - "### + " ); uv_snapshot!( context.filters(), context.pip_tree().arg("--show-version-specifiers"), - @r###" + @" success: true exit_code: 0 ----- stdout ----- @@ -1282,6 +1282,6 @@ fn no_duplicate_dependencies_with_markers() { └── sniffio v1.3.1 [required: >=1.0.2] ----- stderr ----- - "### + " ); } diff --git a/crates/uv/tests/it/pip_uninstall.rs b/crates/uv/tests/it/pip_uninstall.rs index 52a2865e8..f3fc0ff5b 100644 --- a/crates/uv/tests/it/pip_uninstall.rs +++ b/crates/uv/tests/it/pip_uninstall.rs @@ -12,7 +12,7 @@ fn no_arguments() { uv_snapshot!(Command::new(get_bin()) .arg("pip") .arg("uninstall") - .env_clear(), @r###" + .env_clear(), @" success: false exit_code: 2 ----- stdout ----- @@ -24,7 +24,7 @@ fn no_arguments() { Usage: uv pip uninstall > For more information, try '--help'. - "### + " ); } @@ -36,7 +36,7 @@ fn invalid_requirement() -> Result<()> { .arg("pip") .arg("uninstall") .arg("flask==1.0.x") - .current_dir(&temp_dir), @r###" + .current_dir(&temp_dir), @" success: false exit_code: 2 ----- stdout ----- @@ -46,7 +46,7 @@ fn invalid_requirement() -> Result<()> { Caused by: after parsing `1.0`, found `.x`, which is not part of a valid version flask==1.0.x ^^^^^^^ - "###); + "); Ok(()) } @@ -60,14 +60,14 @@ fn missing_requirements_txt() -> Result<()> { .arg("uninstall") .arg("-r") .arg("requirements.txt") - .current_dir(&temp_dir), @r###" + .current_dir(&temp_dir), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: File not found: `requirements.txt` - "### + " ); Ok(()) @@ -84,7 +84,7 @@ fn invalid_requirements_txt_requirement() -> Result<()> { .arg("uninstall") .arg("-r") .arg("requirements.txt") - .current_dir(&temp_dir), @r###" + .current_dir(&temp_dir), @" success: false exit_code: 2 ----- stdout ----- @@ -94,7 +94,7 @@ fn invalid_requirements_txt_requirement() -> Result<()> { Caused by: after parsing `1.0`, found `.x`, which is not part of a valid version flask==1.0.x ^^^^^^^ - "###); + "); Ok(()) } @@ -116,7 +116,7 @@ fn uninstall() -> Result<()> { context.assert_command("import markupsafe").success(); uv_snapshot!(context.pip_uninstall() - .arg("MarkupSafe"), @r###" + .arg("MarkupSafe"), @" success: true exit_code: 0 ----- stdout ----- @@ -124,7 +124,7 @@ fn uninstall() -> Result<()> { ----- stderr ----- Uninstalled 1 package in [TIME] - markupsafe==2.1.3 - "### + " ); context.assert_command("import markupsafe").failure(); @@ -153,7 +153,7 @@ fn missing_record() -> Result<()> { fs_err::remove_file(dist_info.join("RECORD"))?; uv_snapshot!(context.filters(), context.pip_uninstall() - .arg("MarkupSafe"), @r" + .arg("MarkupSafe"), @" success: false exit_code: 2 ----- stdout ----- @@ -191,7 +191,7 @@ fn uninstall_editable_by_name() -> Result<()> { // Uninstall the editable by name. uv_snapshot!(context.filters(), context.pip_uninstall() - .arg("flit-editable"), @r###" + .arg("flit-editable"), @" success: true exit_code: 0 ----- stdout ----- @@ -199,7 +199,7 @@ fn uninstall_editable_by_name() -> Result<()> { ----- stderr ----- Uninstalled 1 package in [TIME] - flit-editable==0.1.0 (from file://[WORKSPACE]/test/packages/flit_editable) - "### + " ); context.assert_command("import flit_editable").failure(); @@ -232,7 +232,7 @@ fn uninstall_by_path() -> Result<()> { // Uninstall the editable by path. uv_snapshot!(context.filters(), context.pip_uninstall() - .arg(context.workspace_root.join("test/packages/flit_editable")), @r###" + .arg(context.workspace_root.join("test/packages/flit_editable")), @" success: true exit_code: 0 ----- stdout ----- @@ -240,7 +240,7 @@ fn uninstall_by_path() -> Result<()> { ----- stderr ----- Uninstalled 1 package in [TIME] - flit-editable==0.1.0 (from file://[WORKSPACE]/test/packages/flit_editable) - "### + " ); context.assert_command("import flit_editable").failure(); @@ -274,7 +274,7 @@ fn uninstall_duplicate_by_path() -> Result<()> { // Uninstall the editable by both path and name. uv_snapshot!(context.filters(), context.pip_uninstall() .arg("flit-editable") - .arg(context.workspace_root.join("test/packages/flit_editable")), @r###" + .arg(context.workspace_root.join("test/packages/flit_editable")), @" success: true exit_code: 0 ----- stdout ----- @@ -282,7 +282,7 @@ fn uninstall_duplicate_by_path() -> Result<()> { ----- stderr ----- Uninstalled 1 package in [TIME] - flit-editable==0.1.0 (from file://[WORKSPACE]/test/packages/flit_editable) - "### + " ); context.assert_command("import flit_editable").failure(); @@ -328,7 +328,7 @@ fn uninstall_duplicate() -> Result<()> { // Run `pip uninstall`. uv_snapshot!(context1.pip_uninstall() - .arg("pip"), @r###" + .arg("pip"), @" success: true exit_code: 0 ----- stdout ----- @@ -337,7 +337,7 @@ fn uninstall_duplicate() -> Result<()> { Uninstalled 2 packages in [TIME] - pip==21.3.1 - pip==22.1.1 - "### + " ); Ok(()) @@ -384,7 +384,7 @@ fn uninstall_egg_info() -> Result<()> { // Run `pip uninstall`. uv_snapshot!(context.pip_uninstall() - .arg("zstandard"), @r###" + .arg("zstandard"), @" success: true exit_code: 0 ----- stdout ----- @@ -392,7 +392,7 @@ fn uninstall_egg_info() -> Result<()> { ----- stderr ----- Uninstalled 1 package in [TIME] - zstandard==0.22.0 - "###); + "); Ok(()) } @@ -438,7 +438,7 @@ Version: 0.22.0 // Run `pip uninstall`. uv_snapshot!(context.pip_uninstall() - .arg("zstandard"), @r###" + .arg("zstandard"), @" success: true exit_code: 0 ----- stdout ----- @@ -446,7 +446,7 @@ Version: 0.22.0 ----- stderr ----- Uninstalled 1 package in [TIME] - zstandard==0.22.0 - "###); + "); // The entry in `easy-install.pth` should be removed. assert_eq!( @@ -503,7 +503,7 @@ fn dry_run_uninstall_egg_info() -> Result<()> { // Run `pip uninstall`. uv_snapshot!(context.pip_uninstall() .arg("--dry-run") - .arg("zstandard"), @r###" + .arg("zstandard"), @" success: true exit_code: 0 ----- stdout ----- @@ -511,7 +511,7 @@ fn dry_run_uninstall_egg_info() -> Result<()> { ----- stderr ----- Would uninstall 1 package - zstandard==0.22.0 - "###); + "); // The `.egg-info` directory should still exist. assert!( diff --git a/crates/uv/tests/it/publish.rs b/crates/uv/tests/it/publish.rs index a83c124ab..096c1125c 100644 --- a/crates/uv/tests/it/publish.rs +++ b/crates/uv/tests/it/publish.rs @@ -23,7 +23,7 @@ fn username_password_no_longer_supported() { .arg("dummy") .arg("--publish-url") .arg("https://test.pypi.org/legacy/") - .arg("../../test/links/ok-1.0.0-py3-none-any.whl"), @r###" + .arg("../../test/links/ok-1.0.0-py3-none-any.whl"), @" success: false exit_code: 2 ----- stdout ----- @@ -33,7 +33,7 @@ fn username_password_no_longer_supported() { Uploading ok-1.0.0-py3-none-any.whl ([SIZE]) error: Failed to publish `../../test/links/ok-1.0.0-py3-none-any.whl` to https://test.pypi.org/legacy/ Caused by: Upload failed with status code 403 Forbidden. Server says: 403 Username/Password authentication is no longer supported. Migrate to API Tokens or Trusted Publishers instead. See https://test.pypi.org/help/#apitoken and https://test.pypi.org/help/#trusted-publishers - "### + " ); } @@ -48,7 +48,7 @@ fn invalid_token() { .arg("dummy") .arg("--publish-url") .arg("https://test.pypi.org/legacy/") - .arg("../../test/links/ok-1.0.0-py3-none-any.whl"), @r###" + .arg("../../test/links/ok-1.0.0-py3-none-any.whl"), @" success: false exit_code: 2 ----- stdout ----- @@ -58,7 +58,7 @@ fn invalid_token() { Uploading ok-1.0.0-py3-none-any.whl ([SIZE]) error: Failed to publish `../../test/links/ok-1.0.0-py3-none-any.whl` to https://test.pypi.org/legacy/ Caused by: Upload failed with status code 403 Forbidden. Server says: 403 Invalid or non-existent authentication information. See https://test.pypi.org/help/#invalid-auth for more information. - "### + " ); } @@ -78,7 +78,7 @@ fn mixed_credentials() { .arg("always") .arg("../../test/links/ok-1.0.0-py3-none-any.whl") // Emulate CI - .env(EnvVars::GITHUB_ACTIONS, "true"), @r###" + .env(EnvVars::GITHUB_ACTIONS, "true"), @" success: false exit_code: 2 ----- stdout ----- @@ -86,7 +86,7 @@ fn mixed_credentials() { ----- stderr ----- Publishing 1 file to https://test.pypi.org/legacy/ error: a username and a password are not allowed when using trusted publishing - "### + " ); } @@ -102,7 +102,7 @@ fn missing_trusted_publishing_permission() { .arg("always") .arg("../../test/links/ok-1.0.0-py3-none-any.whl") // Emulate CI - .env(EnvVars::GITHUB_ACTIONS, "true"), @r" + .env(EnvVars::GITHUB_ACTIONS, "true"), @" success: false exit_code: 2 ----- stdout ----- @@ -128,7 +128,7 @@ fn no_credentials() { .arg("https://test.pypi.org/legacy/") .arg("../../test/links/ok-1.0.0-py3-none-any.whl") // Emulate CI - .env(EnvVars::GITHUB_ACTIONS, "true"), @r" + .env(EnvVars::GITHUB_ACTIONS, "true"), @" success: false exit_code: 2 ----- stdout ----- @@ -156,14 +156,14 @@ fn skip_existing_redirect() { uv_snapshot!(context.filters(), context.publish() .arg("--skip-existing") .arg("--publish-url") - .arg("https://test.pypi.org/legacy/"), @r###" + .arg("https://test.pypi.org/legacy/"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: `uv publish` does not support `--skip-existing` because there is not a reliable way to identify when an upload fails due to an existing distribution. Instead, use `--check-url` to provide the URL to the simple API for your index. uv will check the index for existing distributions before attempting uploads. - "### + " ); } @@ -186,7 +186,7 @@ fn dubious_filenames() { .arg("dummy") .arg("--publish-url") .arg("https://test.pypi.org/legacy/") - .arg(context.temp_dir.join("*")), @r" + .arg(context.temp_dir.join("*")), @" success: false exit_code: 2 ----- stdout ----- @@ -231,7 +231,7 @@ fn check_keyring_behaviours() { .arg("--publish-url") .arg("https://test.pypi.org/legacy/?ok") .arg("../../test/links/ok-1.0.0-py3-none-any.whl") - .env(EnvVars::PATH, venv_bin_path(&context.venv)), @r###" + .env(EnvVars::PATH, venv_bin_path(&context.venv)), @" success: false exit_code: 2 ----- stdout ----- @@ -241,7 +241,7 @@ fn check_keyring_behaviours() { Uploading ok-1.0.0-py3-none-any.whl ([SIZE]) error: Failed to publish `../../test/links/ok-1.0.0-py3-none-any.whl` to https://test.pypi.org/legacy/?ok Caused by: Upload failed with status code 403 Forbidden. Server says: 403 Username/Password authentication is no longer supported. Migrate to API Tokens or Trusted Publishers instead. See https://test.pypi.org/help/#apitoken and https://test.pypi.org/help/#trusted-publishers - "### + " ); // Warn: The keyring is unused. @@ -255,7 +255,7 @@ fn check_keyring_behaviours() { .arg("--publish-url") .arg("https://test.pypi.org/legacy/?ok") .arg("../../test/links/ok-1.0.0-py3-none-any.whl") - .env(EnvVars::PATH, venv_bin_path(&context.venv)), @r###" + .env(EnvVars::PATH, venv_bin_path(&context.venv)), @" success: false exit_code: 2 ----- stdout ----- @@ -266,7 +266,7 @@ fn check_keyring_behaviours() { Uploading ok-1.0.0-py3-none-any.whl ([SIZE]) error: Failed to publish `../../test/links/ok-1.0.0-py3-none-any.whl` to https://test.pypi.org/legacy/?ok Caused by: Upload failed with status code 403 Forbidden. Server says: 403 Username/Password authentication is no longer supported. Migrate to API Tokens or Trusted Publishers instead. See https://test.pypi.org/help/#apitoken and https://test.pypi.org/help/#trusted-publishers - "### + " ); // Warn: There is no keyring entry for the user dummy. @@ -281,7 +281,7 @@ fn check_keyring_behaviours() { .arg("--publish-url") .arg("https://test.pypi.org/legacy/?ok") .arg("../../test/links/ok-1.0.0-py3-none-any.whl") - .env(EnvVars::PATH, venv_bin_path(&context.venv)), @r" + .env(EnvVars::PATH, venv_bin_path(&context.venv)), @" success: false exit_code: 2 ----- stdout ----- @@ -310,7 +310,7 @@ fn check_keyring_behaviours() { .arg("https://test.pypi.org/legacy/?ok") .arg("../../test/links/ok-1.0.0-py3-none-any.whl") .env(EnvVars::KEYRING_TEST_CREDENTIALS, r#"{"https://test.pypi.org/legacy/?ok": {"dummy": "dummy"}}"#) - .env(EnvVars::PATH, venv_bin_path(&context.venv)), @r" + .env(EnvVars::PATH, venv_bin_path(&context.venv)), @" success: false exit_code: 2 ----- stdout ----- @@ -362,14 +362,14 @@ fn invalid_index() { .arg("--index") .arg("bar") .arg(&ok_wheel) - .current_dir(context.temp_dir.path()), @r###" + .current_dir(context.temp_dir.path()), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: Index not found: `bar`. Found indexes: `foo`, `internal` - "### + " ); // Index does not have a publish URL @@ -381,14 +381,14 @@ fn invalid_index() { .arg("--index") .arg("foo") .arg(&ok_wheel) - .current_dir(context.temp_dir.path()), @r###" + .current_dir(context.temp_dir.path()), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: Index is missing a publish URL: `foo` - "### + " ); } @@ -464,7 +464,7 @@ async fn read_index_credential_env_vars_for_check_url() { .arg("private-index") .arg("--trusted-publishing") .arg("never"), - @r" + @" success: false exit_code: 2 ----- stdout ----- @@ -487,7 +487,7 @@ async fn read_index_credential_env_vars_for_check_url() { .env(EnvVars::index_password("PRIVATE_INDEX"), "secret") .arg("--trusted-publishing") .arg("never"), - @r" + @" success: true exit_code: 0 ----- stdout ----- @@ -540,7 +540,7 @@ async fn gitlab_trusted_publishing_pypi_id_token() { .arg("../../test/links/ok-1.0.0-py3-none-any.whl") .env(EnvVars::GITLAB_CI, "true") .env_remove(EnvVars::GITHUB_ACTIONS) - .env(EnvVars::PYPI_ID_TOKEN, "gitlab-oidc-jwt"), @r" + .env(EnvVars::PYPI_ID_TOKEN, "gitlab-oidc-jwt"), @" success: true exit_code: 0 ----- stdout ----- @@ -595,7 +595,7 @@ async fn gitlab_trusted_publishing_testpypi_id_token() { // Emulate GitLab CI with TESTPYPI_ID_TOKEN present .env(EnvVars::GITLAB_CI, "true") .env_remove(EnvVars::GITHUB_ACTIONS) - .env(EnvVars::TESTPYPI_ID_TOKEN, "gitlab-oidc-jwt"), @r" + .env(EnvVars::TESTPYPI_ID_TOKEN, "gitlab-oidc-jwt"), @" success: true exit_code: 0 ----- stdout ----- diff --git a/crates/uv/tests/it/python_dir.rs b/crates/uv/tests/it/python_dir.rs index 9a49b4ea1..a7bb59cec 100644 --- a/crates/uv/tests/it/python_dir.rs +++ b/crates/uv/tests/it/python_dir.rs @@ -10,12 +10,12 @@ fn python_dir() { let python_dir = context.temp_dir.child("python"); uv_snapshot!(context.filters(), context.python_dir() - .env(EnvVars::UV_PYTHON_INSTALL_DIR, python_dir.as_os_str()), @r###" + .env(EnvVars::UV_PYTHON_INSTALL_DIR, python_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- [TEMP_DIR]/python ----- stderr ----- - "###); + "); } diff --git a/crates/uv/tests/it/python_find.rs b/crates/uv/tests/it/python_find.rs index 33f75a656..610c4e89a 100644 --- a/crates/uv/tests/it/python_find.rs +++ b/crates/uv/tests/it/python_find.rs @@ -14,7 +14,7 @@ fn python_find() { TestContext::new_with_versions(&["3.11", "3.12"]).with_filtered_python_sources(); // No interpreters on the path - uv_snapshot!(context.filters(), context.python_find().env(EnvVars::UV_TEST_PYTHON_PATH, ""), @r" + uv_snapshot!(context.filters(), context.python_find().env(EnvVars::UV_TEST_PYTHON_PATH, ""), @" success: false exit_code: 2 ----- stdout ----- @@ -24,7 +24,7 @@ fn python_find() { "); // We find the first interpreter on the path - uv_snapshot!(context.filters(), context.python_find(), @r" + uv_snapshot!(context.filters(), context.python_find(), @" success: true exit_code: 0 ----- stdout ----- @@ -34,37 +34,37 @@ fn python_find() { "); // Request Python 3.12 - uv_snapshot!(context.filters(), context.python_find().arg("3.12"), @r###" + uv_snapshot!(context.filters(), context.python_find().arg("3.12"), @" success: true exit_code: 0 ----- stdout ----- [PYTHON-3.12] ----- stderr ----- - "###); + "); // Request Python 3.12 - uv_snapshot!(context.filters(), context.python_find().arg("==3.12.*"), @r###" + uv_snapshot!(context.filters(), context.python_find().arg("==3.12.*"), @" success: true exit_code: 0 ----- stdout ----- [PYTHON-3.12] ----- stderr ----- - "###); + "); // Request Python 3.11 - uv_snapshot!(context.filters(), context.python_find().arg("3.11"), @r###" + uv_snapshot!(context.filters(), context.python_find().arg("3.11"), @" success: true exit_code: 0 ----- stdout ----- [PYTHON-3.11] ----- stderr ----- - "###); + "); // Request CPython - uv_snapshot!(context.filters(), context.python_find().arg("cpython"), @r" + uv_snapshot!(context.filters(), context.python_find().arg("cpython"), @" success: true exit_code: 0 ----- stdout ----- @@ -74,41 +74,41 @@ fn python_find() { "); // Request CPython 3.12 - uv_snapshot!(context.filters(), context.python_find().arg("cpython@3.12"), @r###" + uv_snapshot!(context.filters(), context.python_find().arg("cpython@3.12"), @" success: true exit_code: 0 ----- stdout ----- [PYTHON-3.12] ----- stderr ----- - "###); + "); // Request CPython 3.12 via partial key syntax - uv_snapshot!(context.filters(), context.python_find().arg("cpython-3.12"), @r###" + uv_snapshot!(context.filters(), context.python_find().arg("cpython-3.12"), @" success: true exit_code: 0 ----- stdout ----- [PYTHON-3.12] ----- stderr ----- - "###); + "); // Request Python 3.12 via partial key syntax with placeholders - uv_snapshot!(context.filters(), context.python_find().arg("any-3.12-any"), @r###" + uv_snapshot!(context.filters(), context.python_find().arg("any-3.12-any"), @" success: true exit_code: 0 ----- stdout ----- [PYTHON-3.12] ----- stderr ----- - "###); + "); // Request CPython 3.12 for the current platform let os = Os::from_env(); let arch = Arch::from_env(); uv_snapshot!(context.filters(), context.python_find() - .arg(format!("cpython-3.12-{os}-{arch}")), @r" + .arg(format!("cpython-3.12-{os}-{arch}")), @" success: true exit_code: 0 ----- stdout ----- @@ -118,7 +118,7 @@ fn python_find() { "); // Request PyPy (which should be missing) - uv_snapshot!(context.filters(), context.python_find().arg("pypy"), @r" + uv_snapshot!(context.filters(), context.python_find().arg("pypy"), @" success: false exit_code: 2 ----- stdout ----- @@ -130,7 +130,7 @@ fn python_find() { // Swap the order of the Python versions context.python_versions.reverse(); - uv_snapshot!(context.filters(), context.python_find(), @r" + uv_snapshot!(context.filters(), context.python_find(), @" success: true exit_code: 0 ----- stdout ----- @@ -140,14 +140,14 @@ fn python_find() { "); // Request Python 3.11 - uv_snapshot!(context.filters(), context.python_find().arg("3.11"), @r###" + uv_snapshot!(context.filters(), context.python_find().arg("3.11"), @" success: true exit_code: 0 ----- stdout ----- [PYTHON-3.11] ----- stderr ----- - "###); + "); } #[test] @@ -155,37 +155,37 @@ fn python_find_pin() { let context: TestContext = TestContext::new_with_versions(&["3.11", "3.12"]); // Pin to a version - uv_snapshot!(context.filters(), context.python_pin().arg("3.12"), @r###" + uv_snapshot!(context.filters(), context.python_pin().arg("3.12"), @" success: true exit_code: 0 ----- stdout ----- Pinned `.python-version` to `3.12` ----- stderr ----- - "###); + "); // We should find the pinned version, not the first on the path - uv_snapshot!(context.filters(), context.python_find(), @r###" + uv_snapshot!(context.filters(), context.python_find(), @" success: true exit_code: 0 ----- stdout ----- [PYTHON-3.12] ----- stderr ----- - "###); + "); // Unless explicitly requested - uv_snapshot!(context.filters(), context.python_find().arg("3.11"), @r###" + uv_snapshot!(context.filters(), context.python_find().arg("3.11"), @" success: true exit_code: 0 ----- stdout ----- [PYTHON-3.11] ----- stderr ----- - "###); + "); // Or `--no-config` is used - uv_snapshot!(context.filters(), context.python_find().arg("--no-config"), @r" + uv_snapshot!(context.filters(), context.python_find().arg("--no-config"), @" success: true exit_code: 0 ----- stdout ----- @@ -198,33 +198,33 @@ fn python_find_pin() { child_dir.create_dir_all().unwrap(); // We should also find pinned versions in the parent directory - uv_snapshot!(context.filters(), context.python_find().current_dir(&child_dir), @r###" + uv_snapshot!(context.filters(), context.python_find().current_dir(&child_dir), @" success: true exit_code: 0 ----- stdout ----- [PYTHON-3.12] ----- stderr ----- - "###); + "); - uv_snapshot!(context.filters(), context.python_pin().arg("3.11").current_dir(&child_dir), @r###" + uv_snapshot!(context.filters(), context.python_pin().arg("3.11").current_dir(&child_dir), @" success: true exit_code: 0 ----- stdout ----- Pinned `.python-version` to `3.11` ----- stderr ----- - "###); + "); // Unless the child directory also has a pin - uv_snapshot!(context.filters(), context.python_find().current_dir(&child_dir), @r###" + uv_snapshot!(context.filters(), context.python_find().current_dir(&child_dir), @" success: true exit_code: 0 ----- stdout ----- [PYTHON-3.11] ----- stderr ----- - "###); + "); } #[test] @@ -232,7 +232,7 @@ fn python_find_pin_arbitrary_name() { let context: TestContext = TestContext::new_with_versions(&["3.11", "3.12"]); // Try to pin to an arbitrary name - uv_snapshot!(context.filters(), context.python_pin().arg("foo"), @r" + uv_snapshot!(context.filters(), context.python_pin().arg("foo"), @" success: false exit_code: 2 ----- stdout ----- @@ -249,7 +249,7 @@ fn python_find_pin_arbitrary_name() { .unwrap(); // The arbitrary name should be ignored - uv_snapshot!(context.filters(), context.python_find(), @r" + uv_snapshot!(context.filters(), context.python_find(), @" success: true exit_code: 0 ----- stdout ----- @@ -260,7 +260,7 @@ fn python_find_pin_arbitrary_name() { "); // The pin should be updatable - uv_snapshot!(context.filters(), context.python_pin().arg("3.11"), @r" + uv_snapshot!(context.filters(), context.python_pin().arg("3.11"), @" success: true exit_code: 0 ----- stdout ----- @@ -271,7 +271,7 @@ fn python_find_pin_arbitrary_name() { "); // Warnings shouldn't appear afterwards... - uv_snapshot!(context.filters(), context.python_pin().arg("3.12"), @r" + uv_snapshot!(context.filters(), context.python_pin().arg("3.12"), @" success: true exit_code: 0 ----- stdout ----- @@ -292,7 +292,7 @@ fn python_find_pin_arbitrary_name() { // The arbitrary name should be ignored, but we won't walk up to the parent `.python-version` // file (which contains 3.12); this behavior is a little questionable but we probably want to // ignore all empty version files if we want to change this? - uv_snapshot!(context.filters(), context.python_find().current_dir(context.temp_dir.child("foo").path()), @r" + uv_snapshot!(context.filters(), context.python_find().current_dir(context.temp_dir.child("foo").path()), @" success: true exit_code: 0 ----- stdout ----- @@ -319,7 +319,7 @@ fn python_find_project() { .unwrap(); // We should respect the project's required version, not the first on the path - uv_snapshot!(context.filters(), context.python_find(), @r" + uv_snapshot!(context.filters(), context.python_find(), @" success: true exit_code: 0 ----- stdout ----- @@ -329,7 +329,7 @@ fn python_find_project() { "); // Unless explicitly requested - uv_snapshot!(context.filters(), context.python_find().arg("3.10"), @r" + uv_snapshot!(context.filters(), context.python_find().arg("3.10"), @" success: true exit_code: 0 ----- stdout ----- @@ -340,7 +340,7 @@ fn python_find_project() { "); // Or `--no-project` is used - uv_snapshot!(context.filters(), context.python_find().arg("--no-project"), @r" + uv_snapshot!(context.filters(), context.python_find().arg("--no-project"), @" success: true exit_code: 0 ----- stdout ----- @@ -350,35 +350,35 @@ fn python_find_project() { "); // But a pin should take precedence - uv_snapshot!(context.filters(), context.python_pin().arg("3.12"), @r###" + uv_snapshot!(context.filters(), context.python_pin().arg("3.12"), @" success: true exit_code: 0 ----- stdout ----- Pinned `.python-version` to `3.12` ----- stderr ----- - "###); - uv_snapshot!(context.filters(), context.python_find(), @r###" + "); + uv_snapshot!(context.filters(), context.python_find(), @" success: true exit_code: 0 ----- stdout ----- [PYTHON-3.12] ----- stderr ----- - "###); + "); // Create a pin that's incompatible with the project - uv_snapshot!(context.filters(), context.python_pin().arg("3.10").arg("--no-workspace"), @r###" + uv_snapshot!(context.filters(), context.python_pin().arg("3.10").arg("--no-workspace"), @" success: true exit_code: 0 ----- stdout ----- Updated `.python-version` from `3.12` -> `3.10` ----- stderr ----- - "###); + "); // We should warn on subsequent uses, but respect the pinned version? - uv_snapshot!(context.filters(), context.python_find(), @r" + uv_snapshot!(context.filters(), context.python_find(), @" success: true exit_code: 0 ----- stdout ----- @@ -404,7 +404,7 @@ fn python_find_project() { "#}) .unwrap(); - uv_snapshot!(context.filters(), context.python_find().current_dir(&child_dir), @r" + uv_snapshot!(context.filters(), context.python_find().current_dir(&child_dir), @" success: true exit_code: 0 ----- stdout ----- @@ -428,7 +428,7 @@ fn virtual_empty() { .unwrap(); // Ask for the python - uv_snapshot!(context.filters(), context.python_find(), @r" + uv_snapshot!(context.filters(), context.python_find(), @" success: true exit_code: 0 ----- stdout ----- @@ -439,7 +439,7 @@ fn virtual_empty() { // Ask for the python (--no-project) uv_snapshot!(context.filters(), context.python_find() - .arg("--no-project"), @r" + .arg("--no-project"), @" success: true exit_code: 0 ----- stdout ----- @@ -449,7 +449,7 @@ fn virtual_empty() { "); // Ask for specific python (3.11) - uv_snapshot!(context.filters(), context.python_find().arg("3.11"), @r" + uv_snapshot!(context.filters(), context.python_find().arg("3.11"), @" success: true exit_code: 0 ----- stdout ----- @@ -459,27 +459,27 @@ fn virtual_empty() { "); // Create a pin - uv_snapshot!(context.filters(), context.python_pin().arg("3.12"), @r###" + uv_snapshot!(context.filters(), context.python_pin().arg("3.12"), @" success: true exit_code: 0 ----- stdout ----- Pinned `.python-version` to `3.12` ----- stderr ----- - "###); + "); // Ask for the python - uv_snapshot!(context.filters(), context.python_find(), @r###" + uv_snapshot!(context.filters(), context.python_find(), @" success: true exit_code: 0 ----- stdout ----- [PYTHON-3.12] ----- stderr ----- - "###); + "); // Ask for specific python (3.11) - uv_snapshot!(context.filters(), context.python_find().arg("3.11"), @r" + uv_snapshot!(context.filters(), context.python_find().arg("3.11"), @" success: true exit_code: 0 ----- stdout ----- @@ -489,14 +489,14 @@ fn virtual_empty() { "); // Ask for the python (--no-project) - uv_snapshot!(context.filters(), context.python_find(), @r###" + uv_snapshot!(context.filters(), context.python_find(), @" success: true exit_code: 0 ----- stdout ----- [PYTHON-3.12] ----- stderr ----- - "###); + "); } #[test] @@ -517,7 +517,7 @@ fn virtual_dependency_group() { .unwrap(); // Ask for the python - uv_snapshot!(context.filters(), context.python_find(), @r" + uv_snapshot!(context.filters(), context.python_find(), @" success: true exit_code: 0 ----- stdout ----- @@ -528,7 +528,7 @@ fn virtual_dependency_group() { // Ask for the python (--no-project) uv_snapshot!(context.filters(), context.python_find() - .arg("--no-project"), @r" + .arg("--no-project"), @" success: true exit_code: 0 ----- stdout ----- @@ -538,7 +538,7 @@ fn virtual_dependency_group() { "); // Ask for specific python (3.11) - uv_snapshot!(context.filters(), context.python_find().arg("3.11"), @r" + uv_snapshot!(context.filters(), context.python_find().arg("3.11"), @" success: true exit_code: 0 ----- stdout ----- @@ -548,27 +548,27 @@ fn virtual_dependency_group() { "); // Create a pin - uv_snapshot!(context.filters(), context.python_pin().arg("3.12"), @r###" + uv_snapshot!(context.filters(), context.python_pin().arg("3.12"), @" success: true exit_code: 0 ----- stdout ----- Pinned `.python-version` to `3.12` ----- stderr ----- - "###); + "); // Ask for the python - uv_snapshot!(context.filters(), context.python_find(), @r###" + uv_snapshot!(context.filters(), context.python_find(), @" success: true exit_code: 0 ----- stdout ----- [PYTHON-3.12] ----- stderr ----- - "###); + "); // Ask for specific python (3.11) - uv_snapshot!(context.filters(), context.python_find().arg("3.11"), @r" + uv_snapshot!(context.filters(), context.python_find().arg("3.11"), @" success: true exit_code: 0 ----- stdout ----- @@ -578,14 +578,14 @@ fn virtual_dependency_group() { "); // Ask for the python (--no-project) - uv_snapshot!(context.filters(), context.python_find(), @r###" + uv_snapshot!(context.filters(), context.python_find(), @" success: true exit_code: 0 ----- stdout ----- [PYTHON-3.12] ----- stderr ----- - "###); + "); } #[test] @@ -597,7 +597,7 @@ fn python_find_venv() { .with_filtered_virtualenv_bin(); // Create a virtual environment - uv_snapshot!(context.filters(), context.venv().arg("--python").arg("3.12").arg("-q"), @r" + uv_snapshot!(context.filters(), context.venv().arg("--python").arg("3.12").arg("-q"), @" success: true exit_code: 0 ----- stdout ----- @@ -610,7 +610,7 @@ fn python_find_venv() { // is super annoying and requires some changes to how we represent working directories in the // test context to resolve. #[cfg(not(windows))] - uv_snapshot!(context.filters(), context.python_find(), @r" + uv_snapshot!(context.filters(), context.python_find(), @" success: true exit_code: 0 ----- stdout ----- @@ -621,7 +621,7 @@ fn python_find_venv() { // Even if the `VIRTUAL_ENV` is not set (the test context includes this by default) #[cfg(not(windows))] - uv_snapshot!(context.filters(), context.python_find().env_remove(EnvVars::VIRTUAL_ENV), @r" + uv_snapshot!(context.filters(), context.python_find().env_remove(EnvVars::VIRTUAL_ENV), @" success: true exit_code: 0 ----- stdout ----- @@ -634,7 +634,7 @@ fn python_find_venv() { child_dir.create_dir_all().unwrap(); // Unless the system flag is passed - uv_snapshot!(context.filters(), context.python_find().arg("--system"), @r" + uv_snapshot!(context.filters(), context.python_find().arg("--system"), @" success: true exit_code: 0 ----- stdout ----- @@ -644,7 +644,7 @@ fn python_find_venv() { "); // Or, `UV_SYSTEM_PYTHON` is set - uv_snapshot!(context.filters(), context.python_find().env(EnvVars::UV_SYSTEM_PYTHON, "1"), @r" + uv_snapshot!(context.filters(), context.python_find().env(EnvVars::UV_SYSTEM_PYTHON, "1"), @" success: true exit_code: 0 ----- stdout ----- @@ -655,7 +655,7 @@ fn python_find_venv() { // Unless, `--no-system` is included // TODO(zanieb): Report this as a bug upstream — this should be allowed. - uv_snapshot!(context.filters(), context.python_find().arg("--no-system").env(EnvVars::UV_SYSTEM_PYTHON, "1"), @r" + uv_snapshot!(context.filters(), context.python_find().arg("--no-system").env(EnvVars::UV_SYSTEM_PYTHON, "1"), @" success: false exit_code: 2 ----- stdout ----- @@ -670,7 +670,7 @@ fn python_find_venv() { // We should find virtual environments from a child directory #[cfg(not(windows))] - uv_snapshot!(context.filters(), context.python_find().current_dir(&child_dir).env_remove(EnvVars::VIRTUAL_ENV), @r" + uv_snapshot!(context.filters(), context.python_find().current_dir(&child_dir).env_remove(EnvVars::VIRTUAL_ENV), @" success: true exit_code: 0 ----- stdout ----- @@ -680,7 +680,7 @@ fn python_find_venv() { "); // A virtual environment in the child directory takes precedence over the parent - uv_snapshot!(context.filters(), context.venv().arg("--python").arg("3.11").arg("-q").current_dir(&child_dir), @r" + uv_snapshot!(context.filters(), context.venv().arg("--python").arg("3.11").arg("-q").current_dir(&child_dir), @" success: true exit_code: 0 ----- stdout ----- @@ -689,7 +689,7 @@ fn python_find_venv() { "); #[cfg(not(windows))] - uv_snapshot!(context.filters(), context.python_find().current_dir(&child_dir).env_remove(EnvVars::VIRTUAL_ENV), @r" + uv_snapshot!(context.filters(), context.python_find().current_dir(&child_dir).env_remove(EnvVars::VIRTUAL_ENV), @" success: true exit_code: 0 ----- stdout ----- @@ -702,7 +702,7 @@ fn python_find_venv() { fs_err::remove_dir_all(context.temp_dir.child(".venv")).unwrap(); // And query from there... we should not find the child virtual environment - uv_snapshot!(context.filters(), context.python_find(), @r" + uv_snapshot!(context.filters(), context.python_find(), @" success: true exit_code: 0 ----- stdout ----- @@ -713,7 +713,7 @@ fn python_find_venv() { // Unless, it is requested by path #[cfg(not(windows))] - uv_snapshot!(context.filters(), context.python_find().arg("child/.venv"), @r" + uv_snapshot!(context.filters(), context.python_find().arg("child/.venv"), @" success: true exit_code: 0 ----- stdout ----- @@ -724,7 +724,7 @@ fn python_find_venv() { // Or activated via `VIRTUAL_ENV` #[cfg(not(windows))] - uv_snapshot!(context.filters(), context.python_find().env(EnvVars::VIRTUAL_ENV, child_dir.join(".venv").as_os_str()), @r" + uv_snapshot!(context.filters(), context.python_find().env(EnvVars::VIRTUAL_ENV, child_dir.join(".venv").as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -735,7 +735,7 @@ fn python_find_venv() { // Or at the front of the PATH #[cfg(not(windows))] - uv_snapshot!(context.filters(), context.python_find().env(EnvVars::UV_TEST_PYTHON_PATH, child_dir.join(".venv").join("bin").as_os_str()), @r" + uv_snapshot!(context.filters(), context.python_find().env(EnvVars::UV_TEST_PYTHON_PATH, child_dir.join(".venv").join("bin").as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -754,7 +754,7 @@ fn python_find_venv() { ]) .unwrap(); - uv_snapshot!(context.filters(), context.python_find().env(EnvVars::UV_TEST_PYTHON_PATH, path.as_os_str()), @r" + uv_snapshot!(context.filters(), context.python_find().env(EnvVars::UV_TEST_PYTHON_PATH, path.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -773,7 +773,7 @@ fn python_find_venv() { ) .unwrap(); - uv_snapshot!(context.filters(), context.python_find().env(EnvVars::UV_TEST_PYTHON_PATH, path.as_os_str()), @r" + uv_snapshot!(context.filters(), context.python_find().env(EnvVars::UV_TEST_PYTHON_PATH, path.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -790,67 +790,67 @@ fn python_find_unsupported_version() { let context: TestContext = TestContext::new_with_versions(&["3.12"]); // Request a low version - uv_snapshot!(context.filters(), context.python_find().arg("3.6"), @r###" + uv_snapshot!(context.filters(), context.python_find().arg("3.6"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: Invalid version request: Python <3.7 is not supported but 3.6 was requested. - "###); + "); // Request a low version with a patch - uv_snapshot!(context.filters(), context.python_find().arg("3.6.9"), @r###" + uv_snapshot!(context.filters(), context.python_find().arg("3.6.9"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: Invalid version request: Python <3.7 is not supported but 3.6.9 was requested. - "###); + "); // Request a really low version - uv_snapshot!(context.filters(), context.python_find().arg("2.6"), @r###" + uv_snapshot!(context.filters(), context.python_find().arg("2.6"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: Invalid version request: Python <3.7 is not supported but 2.6 was requested. - "###); + "); // Request a really low version with a patch - uv_snapshot!(context.filters(), context.python_find().arg("2.6.8"), @r###" + uv_snapshot!(context.filters(), context.python_find().arg("2.6.8"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: Invalid version request: Python <3.7 is not supported but 2.6.8 was requested. - "###); + "); // Request a future version - uv_snapshot!(context.filters(), context.python_find().arg("4.2"), @r###" + uv_snapshot!(context.filters(), context.python_find().arg("4.2"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: No interpreter found for Python 4.2 in virtual environments, managed installations, or search path - "###); + "); // Request a low version with a range - uv_snapshot!(context.filters(), context.python_find().arg("<3.0"), @r###" + uv_snapshot!(context.filters(), context.python_find().arg("<3.0"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: No interpreter found for Python <3.0 in virtual environments, managed installations, or search path - "###); + "); // Request free-threaded Python on unsupported version - uv_snapshot!(context.filters(), context.python_find().arg("3.12t"), @r" + uv_snapshot!(context.filters(), context.python_find().arg("3.12t"), @" success: false exit_code: 2 ----- stdout ----- @@ -868,7 +868,7 @@ fn python_find_venv_invalid() { .with_filtered_exe_suffix(); // We find the virtual environment - uv_snapshot!(context.filters(), context.python_find().env(EnvVars::VIRTUAL_ENV, context.venv.as_os_str()), @r" + uv_snapshot!(context.filters(), context.python_find().env(EnvVars::VIRTUAL_ENV, context.venv.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -880,7 +880,7 @@ fn python_find_venv_invalid() { // If the binaries are missing from a virtual environment, we fail fs_err::remove_dir_all(venv_bin_path(&context.venv)).unwrap(); - uv_snapshot!(context.filters(), context.python_find().env(EnvVars::VIRTUAL_ENV, context.venv.as_os_str()), @r" + uv_snapshot!(context.filters(), context.python_find().env(EnvVars::VIRTUAL_ENV, context.venv.as_os_str()), @" success: false exit_code: 2 ----- stdout ----- @@ -891,7 +891,7 @@ fn python_find_venv_invalid() { "); // Unless the virtual environment is not active - uv_snapshot!(context.filters(), context.python_find(), @r" + uv_snapshot!(context.filters(), context.python_find(), @" success: true exit_code: 0 ----- stdout ----- @@ -903,7 +903,7 @@ fn python_find_venv_invalid() { // If there's not a `pyvenv.cfg` file, it's also non-fatal, we ignore the environment fs_err::remove_file(context.venv.join("pyvenv.cfg")).unwrap(); - uv_snapshot!(context.filters(), context.python_find().env(EnvVars::VIRTUAL_ENV, context.venv.as_os_str()), @r" + uv_snapshot!(context.filters(), context.python_find().env(EnvVars::VIRTUAL_ENV, context.venv.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -920,7 +920,7 @@ fn python_find_managed() { .with_versions_as_managed(&["3.12"]); // We find the managed interpreter - uv_snapshot!(context.filters(), context.python_find().arg("--managed-python"), @r" + uv_snapshot!(context.filters(), context.python_find().arg("--managed-python"), @" success: true exit_code: 0 ----- stdout ----- @@ -930,7 +930,7 @@ fn python_find_managed() { "); // Request an interpreter that cannot be satisfied - uv_snapshot!(context.filters(), context.python_find().arg("--managed-python").arg("3.11"), @r" + uv_snapshot!(context.filters(), context.python_find().arg("--managed-python").arg("3.11"), @" success: false exit_code: 2 ----- stdout ----- @@ -944,7 +944,7 @@ fn python_find_managed() { .with_versions_as_managed(&["3.11"]); // We find the unmanaged interpreter with managed Python disabled - uv_snapshot!(context.filters(), context.python_find().arg("--no-managed-python"), @r" + uv_snapshot!(context.filters(), context.python_find().arg("--no-managed-python"), @" success: true exit_code: 0 ----- stdout ----- @@ -954,7 +954,7 @@ fn python_find_managed() { "); // Request an interpreter that cannot be satisfied - uv_snapshot!(context.filters(), context.python_find().arg("--no-managed-python").arg("3.11"), @r" + uv_snapshot!(context.filters(), context.python_find().arg("--no-managed-python").arg("3.11"), @" success: false exit_code: 2 ----- stdout ----- @@ -964,7 +964,7 @@ fn python_find_managed() { "); // We find the unmanaged interpreter with system Python preferred - uv_snapshot!(context.filters(), context.python_find().arg("--python-preference").arg("system"), @r" + uv_snapshot!(context.filters(), context.python_find().arg("--python-preference").arg("system"), @" success: true exit_code: 0 ----- stdout ----- @@ -974,7 +974,7 @@ fn python_find_managed() { "); // But, if no system Python meets the request, we'll use the managed interpreter - uv_snapshot!(context.filters(), context.python_find().arg("--python-preference").arg("system").arg("3.11"), @r" + uv_snapshot!(context.filters(), context.python_find().arg("--python-preference").arg("system").arg("3.11"), @" success: true exit_code: 0 ----- stdout ----- @@ -1005,7 +1005,7 @@ fn python_required_python_major_minor() { .unwrap(); // Find `python3.11`, which is `>=3.11.4`. - uv_snapshot!(context.filters(), context.python_find().arg(">=3.11.4, <3.12").env(EnvVars::UV_TEST_PYTHON_PATH, context.temp_dir.child("child").path()), @r" + uv_snapshot!(context.filters(), context.python_find().arg(">=3.11.4, <3.12").env(EnvVars::UV_TEST_PYTHON_PATH, context.temp_dir.child("child").path()), @" success: true exit_code: 0 ----- stdout ----- @@ -1015,7 +1015,7 @@ fn python_required_python_major_minor() { "); // Find `python3.11`, which is `>3.11.4`. - uv_snapshot!(context.filters(), context.python_find().arg(">3.11.4, <3.12").env(EnvVars::UV_TEST_PYTHON_PATH, context.temp_dir.child("child").path()), @r" + uv_snapshot!(context.filters(), context.python_find().arg(">3.11.4, <3.12").env(EnvVars::UV_TEST_PYTHON_PATH, context.temp_dir.child("child").path()), @" success: true exit_code: 0 ----- stdout ----- @@ -1025,14 +1025,14 @@ fn python_required_python_major_minor() { "); // Fail to find any matching Python interpreter. - uv_snapshot!(context.filters(), context.python_find().arg(">3.11.255, <3.12").env(EnvVars::UV_TEST_PYTHON_PATH, context.temp_dir.child("child").path()), @r###" + uv_snapshot!(context.filters(), context.python_find().arg(">3.11.255, <3.12").env(EnvVars::UV_TEST_PYTHON_PATH, context.temp_dir.child("child").path()), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: No interpreter found for Python >3.11.[X], <3.12 in virtual environments, managed installations, or search path - "###); + "); } #[test] @@ -1042,7 +1042,7 @@ fn python_find_script() { .with_filtered_python_names() .with_filtered_exe_suffix(); - uv_snapshot!(context.filters(), context.init().arg("--script").arg("foo.py"), @r" + uv_snapshot!(context.filters(), context.init().arg("--script").arg("foo.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -1051,7 +1051,7 @@ fn python_find_script() { Initialized script at `foo.py` "); - uv_snapshot!(context.filters(), context.sync().arg("--script").arg("foo.py"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--script").arg("foo.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -1062,7 +1062,7 @@ fn python_find_script() { Audited in [TIME] "); - uv_snapshot!(context.filters(), context.python_find().arg("--script").arg("foo.py"), @r" + uv_snapshot!(context.filters(), context.python_find().arg("--script").arg("foo.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -1089,7 +1089,7 @@ fn python_find_script_no_environment() { "}) .unwrap(); - uv_snapshot!(context.filters(), context.python_find().arg("--script").arg("foo.py"), @r" + uv_snapshot!(context.filters(), context.python_find().arg("--script").arg("foo.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -1113,7 +1113,7 @@ fn python_find_script_python_not_found() { "}) .unwrap(); - uv_snapshot!(context.filters(), context.python_find().arg("--script").arg("foo.py"), @r" + uv_snapshot!(context.filters(), context.python_find().arg("--script").arg("foo.py"), @" success: false exit_code: 1 ----- stdout ----- @@ -1142,7 +1142,7 @@ fn python_find_script_no_such_version() { "#}) .unwrap(); - uv_snapshot!(context.filters(), context.sync().arg("--script").arg("foo.py"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--script").arg("foo.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -1162,7 +1162,7 @@ fn python_find_script_no_such_version() { "#}) .unwrap(); - uv_snapshot!(context.filters(), context.python_find().arg("--script").arg("foo.py"), @r" + uv_snapshot!(context.filters(), context.python_find().arg("--script").arg("foo.py"), @" success: false exit_code: 1 ----- stdout ----- @@ -1178,7 +1178,7 @@ fn python_find_show_version() { TestContext::new_with_versions(&["3.11", "3.12"]).with_filtered_python_sources(); // No interpreters found - uv_snapshot!(context.filters(), context.python_find().env(EnvVars::UV_TEST_PYTHON_PATH, "").arg("--show-version"), @r" + uv_snapshot!(context.filters(), context.python_find().env(EnvVars::UV_TEST_PYTHON_PATH, "").arg("--show-version"), @" success: false exit_code: 2 ----- stdout ----- @@ -1188,7 +1188,7 @@ fn python_find_show_version() { "); // Show the first version found - uv_snapshot!(context.filters(), context.python_find().arg("--show-version"), @r" + uv_snapshot!(context.filters(), context.python_find().arg("--show-version"), @" success: true exit_code: 0 ----- stdout ----- @@ -1198,7 +1198,7 @@ fn python_find_show_version() { "); // Request Python 3.12 - uv_snapshot!(context.filters(), context.python_find().arg("--show-version").arg("3.12"), @r" + uv_snapshot!(context.filters(), context.python_find().arg("--show-version").arg("3.12"), @" success: true exit_code: 0 ----- stdout ----- @@ -1208,7 +1208,7 @@ fn python_find_show_version() { "); // Request Python 3.11 - uv_snapshot!(context.filters(), context.python_find().arg("--show-version").arg("3.11"), @r" + uv_snapshot!(context.filters(), context.python_find().arg("--show-version").arg("3.11"), @" success: true exit_code: 0 ----- stdout ----- @@ -1226,7 +1226,7 @@ fn python_find_path() { context.temp_dir.child("bar").touch().unwrap(); // No interpreter in a directory - uv_snapshot!(context.filters(), context.python_find().arg(context.temp_dir.child("foo").as_os_str()), @r" + uv_snapshot!(context.filters(), context.python_find().arg(context.temp_dir.child("foo").as_os_str()), @" success: false exit_code: 2 ----- stdout ----- @@ -1236,7 +1236,7 @@ fn python_find_path() { "); // No interpreter at a file - uv_snapshot!(context.filters(), context.python_find().arg(context.temp_dir.child("bar").as_os_str()), @r" + uv_snapshot!(context.filters(), context.python_find().arg(context.temp_dir.child("bar").as_os_str()), @" success: false exit_code: 2 ----- stdout ----- @@ -1248,7 +1248,7 @@ fn python_find_path() { "); // No interpreter at a file that does not exist - uv_snapshot!(context.filters(), context.python_find().arg(context.temp_dir.child("foobar").as_os_str()), @r" + uv_snapshot!(context.filters(), context.python_find().arg(context.temp_dir.child("foobar").as_os_str()), @" success: false exit_code: 2 ----- stdout ----- @@ -1278,7 +1278,7 @@ fn python_find_freethreaded_313() { .success(); // Request Python 3.13 (without opt-in) - uv_snapshot!(context.filters(), context.python_find().arg("3.13"), @r" + uv_snapshot!(context.filters(), context.python_find().arg("3.13"), @" success: false exit_code: 2 ----- stdout ----- @@ -1288,7 +1288,7 @@ fn python_find_freethreaded_313() { "); // Request Python 3.13t (with explicit opt-in) - uv_snapshot!(context.filters(), context.python_find().arg("3.13t"), @r" + uv_snapshot!(context.filters(), context.python_find().arg("3.13t"), @" success: true exit_code: 0 ----- stdout ----- @@ -1318,7 +1318,7 @@ fn python_find_freethreaded_314() { .success(); // Request Python 3.14 (without opt-in) - uv_snapshot!(context.filters(), context.python_find().arg("3.14"), @r" + uv_snapshot!(context.filters(), context.python_find().arg("3.14"), @" success: true exit_code: 0 ----- stdout ----- @@ -1328,7 +1328,7 @@ fn python_find_freethreaded_314() { "); // Request Python 3.14t (with explicit opt-in) - uv_snapshot!(context.filters(), context.python_find().arg("3.14t"), @r" + uv_snapshot!(context.filters(), context.python_find().arg("3.14t"), @" success: true exit_code: 0 ----- stdout ----- @@ -1338,7 +1338,7 @@ fn python_find_freethreaded_314() { "); // Request Python 3.14+gil - uv_snapshot!(context.filters(), context.python_find().arg("3.14+gil"), @r" + uv_snapshot!(context.filters(), context.python_find().arg("3.14+gil"), @" success: false exit_code: 2 ----- stdout ----- @@ -1356,7 +1356,7 @@ fn python_find_freethreaded_314() { .success(); // Request Python 3.14 - uv_snapshot!(context.filters(), context.python_find().arg("3.14"), @r" + uv_snapshot!(context.filters(), context.python_find().arg("3.14"), @" success: true exit_code: 0 ----- stdout ----- @@ -1366,7 +1366,7 @@ fn python_find_freethreaded_314() { "); // Request Python 3.14+gil - uv_snapshot!(context.filters(), context.python_find().arg("3.14+gil"), @r" + uv_snapshot!(context.filters(), context.python_find().arg("3.14+gil"), @" success: true exit_code: 0 ----- stdout ----- @@ -1392,7 +1392,7 @@ fn python_find_prerelease_version_specifiers() { context.python_install().arg("3.14.0rc3").assert().success(); // `>=3.14` should allow pre-release versions - uv_snapshot!(context.filters(), context.python_find().arg(">=3.14"), @r" + uv_snapshot!(context.filters(), context.python_find().arg(">=3.14"), @" success: true exit_code: 0 ----- stdout ----- @@ -1403,7 +1403,7 @@ fn python_find_prerelease_version_specifiers() { "); // `>3.14rc2` should not match rc2 - uv_snapshot!(context.filters(), context.python_find().arg(">3.14.0rc2"), @r" + uv_snapshot!(context.filters(), context.python_find().arg(">3.14.0rc2"), @" success: true exit_code: 0 ----- stdout ----- @@ -1413,7 +1413,7 @@ fn python_find_prerelease_version_specifiers() { "); // `>3.14rc3` should not match rc3 - uv_snapshot!(context.filters(), context.python_find().arg(">3.14.0rc3"), @r" + uv_snapshot!(context.filters(), context.python_find().arg(">3.14.0rc3"), @" success: false exit_code: 2 ----- stdout ----- @@ -1423,7 +1423,7 @@ fn python_find_prerelease_version_specifiers() { "); // `>=3.14.0rc3` should match rc3 - uv_snapshot!(context.filters(), context.python_find().arg(">=3.14.0rc3"), @r" + uv_snapshot!(context.filters(), context.python_find().arg(">=3.14.0rc3"), @" success: true exit_code: 0 ----- stdout ----- @@ -1433,7 +1433,7 @@ fn python_find_prerelease_version_specifiers() { "); // `<3.14.0rc3` should match rc2 - uv_snapshot!(context.filters(), context.python_find().arg("<3.14.0rc3"), @r" + uv_snapshot!(context.filters(), context.python_find().arg("<3.14.0rc3"), @" success: true exit_code: 0 ----- stdout ----- @@ -1443,7 +1443,7 @@ fn python_find_prerelease_version_specifiers() { "); // `<=3.14.0rc3` should match rc3 - uv_snapshot!(context.filters(), context.python_find().arg("<=3.14.0rc3"), @r" + uv_snapshot!(context.filters(), context.python_find().arg("<=3.14.0rc3"), @" success: true exit_code: 0 ----- stdout ----- @@ -1456,7 +1456,7 @@ fn python_find_prerelease_version_specifiers() { context.python_install().arg("3.14.0").assert().success(); // `>=3.14` should prefer stable - uv_snapshot!(context.filters(), context.python_find().arg(">=3.14"), @r" + uv_snapshot!(context.filters(), context.python_find().arg(">=3.14"), @" success: true exit_code: 0 ----- stdout ----- @@ -1466,7 +1466,7 @@ fn python_find_prerelease_version_specifiers() { "); // `>3.14rc2` should prefer stable - uv_snapshot!(context.filters(), context.python_find().arg(">3.14.0rc2"), @r" + uv_snapshot!(context.filters(), context.python_find().arg(">3.14.0rc2"), @" success: true exit_code: 0 ----- stdout ----- @@ -1492,7 +1492,7 @@ fn python_find_prerelease_with_patch_request() { context.python_install().arg("3.14.0rc3").assert().success(); // When no `.0` patch version is included, we'll allow selection of a pre-release - uv_snapshot!(context.filters(), context.python_find().arg("3.14"), @r" + uv_snapshot!(context.filters(), context.python_find().arg("3.14"), @" success: true exit_code: 0 ----- stdout ----- @@ -1503,7 +1503,7 @@ fn python_find_prerelease_with_patch_request() { "); // When `.0` is explicitly included, we will require a stable release - uv_snapshot!(context.filters(), context.python_find().arg("3.14.0"), @r" + uv_snapshot!(context.filters(), context.python_find().arg("3.14.0"), @" success: false exit_code: 2 ----- stdout ----- @@ -1515,7 +1515,7 @@ fn python_find_prerelease_with_patch_request() { // Install 3.14.0 stable context.python_install().arg("3.14.0").assert().success(); - uv_snapshot!(context.filters(), context.python_find().arg("3.14.0"), @r" + uv_snapshot!(context.filters(), context.python_find().arg("3.14.0"), @" success: true exit_code: 0 ----- stdout ----- diff --git a/crates/uv/tests/it/python_install.rs b/crates/uv/tests/it/python_install.rs index 599d23e5f..e21202bc8 100644 --- a/crates/uv/tests/it/python_install.rs +++ b/crates/uv/tests/it/python_install.rs @@ -29,7 +29,7 @@ fn python_install() { .with_python_download_cache(); // Install the latest version - uv_snapshot!(context.filters(), context.python_install(), @r" + uv_snapshot!(context.filters(), context.python_install(), @" success: true exit_code: 0 ----- stdout ----- @@ -71,27 +71,27 @@ fn python_install() { // The executable should "work" uv_snapshot!(context.filters(), Command::new(bin_python.as_os_str()) - .arg("-c").arg("import subprocess; print('hello world')"), @r###" + .arg("-c").arg("import subprocess; print('hello world')"), @" success: true exit_code: 0 ----- stdout ----- hello world ----- stderr ----- - "###); + "); // Should be a no-op when already installed - uv_snapshot!(context.filters(), context.python_install(), @r###" + uv_snapshot!(context.filters(), context.python_install(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Python is already installed. Use `uv python install ` to install another version. - "###); + "); // Similarly, when a requested version is already installed - uv_snapshot!(context.filters(), context.python_install().arg("3.14"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("3.14"), @" success: true exit_code: 0 ----- stdout ----- @@ -101,7 +101,7 @@ fn python_install() { "); // You can opt-in to a reinstall - uv_snapshot!(context.filters(), context.python_install().arg("3.14").arg("--reinstall"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("3.14").arg("--reinstall"), @" success: true exit_code: 0 ----- stdout ----- @@ -115,7 +115,7 @@ fn python_install() { bin_python.assert(predicate::path::exists()); // Uninstallation requires an argument - uv_snapshot!(context.filters(), context.python_uninstall(), @r###" + uv_snapshot!(context.filters(), context.python_uninstall(), @" success: false exit_code: 2 ----- stdout ----- @@ -127,9 +127,9 @@ fn python_install() { Usage: uv python uninstall --install-dir ... For more information, try '--help'. - "###); + "); - uv_snapshot!(context.filters(), context.python_uninstall().arg("3.14"), @r" + uv_snapshot!(context.filters(), context.python_uninstall().arg("3.14"), @" success: true exit_code: 0 ----- stdout ----- @@ -154,7 +154,7 @@ fn python_reinstall() { .with_python_download_cache(); // Install a couple versions - uv_snapshot!(context.filters(), context.python_install().arg("3.12").arg("3.13"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("3.12").arg("3.13"), @" success: true exit_code: 0 ----- stdout ----- @@ -166,7 +166,7 @@ fn python_reinstall() { "); // Reinstall a single version - uv_snapshot!(context.filters(), context.python_install().arg("3.13").arg("--reinstall"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("3.13").arg("--reinstall"), @" success: true exit_code: 0 ----- stdout ----- @@ -177,7 +177,7 @@ fn python_reinstall() { "); // Reinstall multiple versions - uv_snapshot!(context.filters(), context.python_install().arg("--reinstall"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("--reinstall"), @" success: true exit_code: 0 ----- stdout ----- @@ -189,7 +189,7 @@ fn python_reinstall() { "); // Reinstalling a version that is not installed should also work - uv_snapshot!(context.filters(), context.python_install().arg("3.11").arg("--reinstall"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("3.11").arg("--reinstall"), @" success: true exit_code: 0 ----- stdout ----- @@ -209,7 +209,7 @@ fn python_reinstall_patch() { .with_python_download_cache(); // Install a couple patch versions - uv_snapshot!(context.filters(), context.python_install().arg("3.12.6").arg("3.12.7"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("3.12.6").arg("3.12.7"), @" success: true exit_code: 0 ----- stdout ----- @@ -223,7 +223,7 @@ fn python_reinstall_patch() { // Reinstall all "3.12" versions // TODO(zanieb): This doesn't work today, because we need this to install the "latest" as there // is no workflow for `--upgrade` yet - uv_snapshot!(context.filters(), context.python_install().arg("3.12").arg("--reinstall"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("3.12").arg("--reinstall"), @" success: true exit_code: 0 ----- stdout ----- @@ -247,7 +247,7 @@ fn python_install_automatic() { uv_snapshot!(context.filters(), context.run() .env_remove(EnvVars::VIRTUAL_ENV) .arg("--no-python-downloads") - .arg("python").arg("-c").arg("import sys; print(sys.version_info[:2])"), @r" + .arg("python").arg("-c").arg("import sys; print(sys.version_info[:2])"), @" success: false exit_code: 2 ----- stdout ----- @@ -261,53 +261,53 @@ fn python_install_automatic() { // Otherwise, we should fetch the latest Python version uv_snapshot!(context.filters(), context.run() .env_remove(EnvVars::VIRTUAL_ENV) - .arg("python").arg("-c").arg("import sys; print(sys.version_info[:2])"), @r###" + .arg("python").arg("-c").arg("import sys; print(sys.version_info[:2])"), @" success: true exit_code: 0 ----- stdout ----- (3, 14) ----- stderr ----- - "###); + "); // Subsequently, we can use the interpreter even with downloads disabled uv_snapshot!(context.filters(), context.run() .env_remove(EnvVars::VIRTUAL_ENV) .arg("--no-python-downloads") - .arg("python").arg("-c").arg("import sys; print(sys.version_info[:2])"), @r###" + .arg("python").arg("-c").arg("import sys; print(sys.version_info[:2])"), @" success: true exit_code: 0 ----- stdout ----- (3, 14) ----- stderr ----- - "###); + "); // We should respect the Python request uv_snapshot!(context.filters(), context.run() .env_remove(EnvVars::VIRTUAL_ENV) .arg("-p").arg("3.12") - .arg("python").arg("-c").arg("import sys; print(sys.version_info[:2])"), @r###" + .arg("python").arg("-c").arg("import sys; print(sys.version_info[:2])"), @" success: true exit_code: 0 ----- stdout ----- (3, 12) ----- stderr ----- - "###); + "); // But some requests cannot be mapped to a download uv_snapshot!(context.filters(), context.run() .env_remove(EnvVars::VIRTUAL_ENV) .arg("-p").arg("foobar") - .arg("python").arg("-c").arg("import sys; print(sys.version_info[:2])"), @r###" + .arg("python").arg("-c").arg("import sys; print(sys.version_info[:2])"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: No interpreter found for executable name `foobar` in [PYTHON SOURCES] - "###); + "); // Create a "broken" Python executable in the test context `bin` // (the snapshot is different on Windows so we just test on Unix) @@ -333,14 +333,14 @@ fn python_install_automatic() { // In tests, we ignore `PATH` during Python discovery so we need to add the context `bin` .env(EnvVars::UV_TEST_PYTHON_PATH, context.bin_dir.as_os_str()) .arg("-p").arg("3.11") - .arg("python").arg("-c").arg("import sys; print(sys.version_info[:2])"), @r###" + .arg("python").arg("-c").arg("import sys; print(sys.version_info[:2])"), @" success: true exit_code: 0 ----- stdout ----- (3, 11) ----- stderr ----- - "###); + "); } } @@ -370,14 +370,13 @@ fn regression_cpython() { uv_snapshot!(context.filters(), context.run() .env_remove(EnvVars::VIRTUAL_ENV) .arg("-p").arg("3.12") - .arg("mre.py"), @r###" + .arg("mre.py"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- - - "###); + "); } #[test] @@ -389,7 +388,7 @@ fn python_install_force() { .with_managed_python_dirs(); // Install the latest version - uv_snapshot!(context.filters(), context.python_install(), @r" + uv_snapshot!(context.filters(), context.python_install(), @" success: true exit_code: 0 ----- stdout ----- @@ -404,7 +403,7 @@ fn python_install_force() { .child(format!("python3.14{}", std::env::consts::EXE_SUFFIX)); // You can force replacement of the executables - uv_snapshot!(context.filters(), context.python_install().arg("--force"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("--force"), @" success: true exit_code: 0 ----- stdout ----- @@ -421,7 +420,7 @@ fn python_install_force() { fs_err::remove_file(bin_python.path()).unwrap(); bin_python.touch().unwrap(); - uv_snapshot!(context.filters(), context.python_install().arg("3.14"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("3.14"), @" success: true exit_code: 0 ----- stdout ----- @@ -431,7 +430,7 @@ fn python_install_force() { Caused by: Executable already exists at `[BIN]/python3.14` but is not managed by uv; use `--force` to replace it "); - uv_snapshot!(context.filters(), context.python_install().arg("--force").arg("3.14"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("--force").arg("3.14"), @" success: true exit_code: 0 ----- stdout ----- @@ -453,7 +452,7 @@ fn python_install_minor() { .with_managed_python_dirs(); // Install a minor version - uv_snapshot!(context.filters(), context.python_install().arg("3.11"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("3.11"), @" success: true exit_code: 0 ----- stdout ----- @@ -489,7 +488,7 @@ fn python_install_minor() { }); } - uv_snapshot!(context.filters(), context.python_uninstall().arg("3.11"), @r" + uv_snapshot!(context.filters(), context.python_uninstall().arg("3.11"), @" success: true exit_code: 0 ----- stdout ----- @@ -512,7 +511,7 @@ fn python_install_multiple_patch() { .with_managed_python_dirs(); // Install multiple patch versions - uv_snapshot!(context.filters(), context.python_install().arg("3.12.8").arg("3.12.6"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("3.12.8").arg("3.12.6"), @" success: true exit_code: 0 ----- stdout ----- @@ -549,7 +548,7 @@ fn python_install_multiple_patch() { }); } - uv_snapshot!(context.filters(), context.python_uninstall().arg("3.12.8"), @r" + uv_snapshot!(context.filters(), context.python_uninstall().arg("3.12.8"), @" success: true exit_code: 0 ----- stdout ----- @@ -594,7 +593,7 @@ fn python_install_preview() { .with_python_download_cache(); // Install the latest version - uv_snapshot!(context.filters(), context.python_install().arg("--preview"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("--preview"), @" success: true exit_code: 0 ----- stdout ----- @@ -636,17 +635,17 @@ fn python_install_preview() { // The executable should "work" uv_snapshot!(context.filters(), Command::new(bin_python.as_os_str()) - .arg("-c").arg("import subprocess; print('hello world')"), @r###" + .arg("-c").arg("import subprocess; print('hello world')"), @" success: true exit_code: 0 ----- stdout ----- hello world ----- stderr ----- - "###); + "); // Should be a no-op when already installed - uv_snapshot!(context.filters(), context.python_install().arg("--preview"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("--preview"), @" success: true exit_code: 0 ----- stdout ----- @@ -656,7 +655,7 @@ fn python_install_preview() { "); // You can opt-in to a reinstall - uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("--reinstall"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("--reinstall"), @" success: true exit_code: 0 ----- stdout ----- @@ -670,7 +669,7 @@ fn python_install_preview() { bin_python.assert(predicate::path::exists()); // You can also force replacement of the executables - uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("--force"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("--force"), @" success: true exit_code: 0 ----- stdout ----- @@ -687,7 +686,7 @@ fn python_install_preview() { fs_err::remove_file(bin_python.path()).unwrap(); bin_python.touch().unwrap(); - uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.14"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.14"), @" success: true exit_code: 0 ----- stdout ----- @@ -698,7 +697,7 @@ fn python_install_preview() { "); // With `--bin`, this should error instead of warn - uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("--bin").arg("3.14"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("--bin").arg("3.14"), @" success: false exit_code: 1 ----- stdout ----- @@ -707,7 +706,7 @@ fn python_install_preview() { error: Failed to install executable for cpython-3.14.[LATEST]-[PLATFORM] Caused by: Executable already exists at `[BIN]/python3.14` but is not managed by uv; use `--force` to replace it "); - uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.14").env(EnvVars::UV_PYTHON_INSTALL_BIN, "1"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.14").env(EnvVars::UV_PYTHON_INSTALL_BIN, "1"), @" success: false exit_code: 1 ----- stdout ----- @@ -718,7 +717,7 @@ fn python_install_preview() { "); // With `--no-bin`, this should be silent - uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("--no-bin").arg("3.14"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("--no-bin").arg("3.14"), @" success: true exit_code: 0 ----- stdout ----- @@ -726,7 +725,7 @@ fn python_install_preview() { ----- stderr ----- Python 3.14 is already installed "); - uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.14").env(EnvVars::UV_PYTHON_INSTALL_BIN, "0"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.14").env(EnvVars::UV_PYTHON_INSTALL_BIN, "0"), @" success: true exit_code: 0 ----- stdout ----- @@ -735,7 +734,7 @@ fn python_install_preview() { Python 3.14 is already installed "); - uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("--force").arg("3.14"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("--force").arg("3.14"), @" success: true exit_code: 0 ----- stdout ----- @@ -752,7 +751,7 @@ fn python_install_preview() { bin_python.assert(predicate::path::is_symlink()); // Uninstallation requires an argument - uv_snapshot!(context.filters(), context.python_uninstall(), @r###" + uv_snapshot!(context.filters(), context.python_uninstall(), @" success: false exit_code: 2 ----- stdout ----- @@ -764,9 +763,9 @@ fn python_install_preview() { Usage: uv python uninstall --install-dir ... For more information, try '--help'. - "###); + "); - uv_snapshot!(context.filters(), context.python_uninstall().arg("3.14"), @r" + uv_snapshot!(context.filters(), context.python_uninstall().arg("3.14"), @" success: true exit_code: 0 ----- stdout ----- @@ -781,7 +780,7 @@ fn python_install_preview() { bin_python.assert(predicate::path::missing()); // Install a minor version - uv_snapshot!(context.filters(), context.python_install().arg("3.11").arg("--preview"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("3.11").arg("--preview"), @" success: true exit_code: 0 ----- stdout ----- @@ -814,7 +813,7 @@ fn python_install_preview() { }); } - uv_snapshot!(context.filters(), context.python_uninstall().arg("3.11"), @r" + uv_snapshot!(context.filters(), context.python_uninstall().arg("3.11"), @" success: true exit_code: 0 ----- stdout ----- @@ -826,7 +825,7 @@ fn python_install_preview() { "); // Install multiple patch versions - uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.12.8").arg("3.12.6"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.12.8").arg("3.12.6"), @" success: true exit_code: 0 ----- stdout ----- @@ -871,7 +870,7 @@ fn python_install_preview_no_bin() { .with_python_download_cache(); // Install the latest version - uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("--no-bin"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("--no-bin"), @" success: true exit_code: 0 ----- stdout ----- @@ -888,7 +887,7 @@ fn python_install_preview_no_bin() { // The executable should not be installed in the bin directory bin_python.assert(predicate::path::missing()); - uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("--no-bin").arg("--default"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("--no-bin").arg("--default"), @" success: false exit_code: 2 ----- stdout ----- @@ -922,7 +921,7 @@ fn python_install_preview_upgrade() { .child(format!("python3.12{}", std::env::consts::EXE_SUFFIX)); // Install 3.12.5 - uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.12.5"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.12.5"), @" success: true exit_code: 0 ----- stdout ----- @@ -952,7 +951,7 @@ fn python_install_preview_upgrade() { } // Installing 3.12.4 should not replace the executable, but also shouldn't fail - uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.12.4"), @r###" + uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.12.4"), @" success: true exit_code: 0 ----- stdout ----- @@ -960,7 +959,7 @@ fn python_install_preview_upgrade() { ----- stderr ----- Installed Python 3.12.4 in [TIME] + cpython-3.12.4-[PLATFORM] - "###); + "); if cfg!(unix) { insta::with_settings!({ @@ -981,7 +980,7 @@ fn python_install_preview_upgrade() { } // Using `--reinstall` is not sufficient to replace it either - uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.12.4").arg("--reinstall"), @r###" + uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.12.4").arg("--reinstall"), @" success: true exit_code: 0 ----- stdout ----- @@ -989,7 +988,7 @@ fn python_install_preview_upgrade() { ----- stderr ----- Installed Python 3.12.4 in [TIME] ~ cpython-3.12.4-[PLATFORM] - "###); + "); if cfg!(unix) { insta::with_settings!({ @@ -1010,7 +1009,7 @@ fn python_install_preview_upgrade() { } // But `--force` is - uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.12.4").arg("--force"), @r###" + uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.12.4").arg("--force"), @" success: true exit_code: 0 ----- stdout ----- @@ -1018,7 +1017,7 @@ fn python_install_preview_upgrade() { ----- stderr ----- Installed Python 3.12.4 in [TIME] + cpython-3.12.4-[PLATFORM] (python3.12) - "###); + "); if cfg!(unix) { insta::with_settings!({ @@ -1039,7 +1038,7 @@ fn python_install_preview_upgrade() { } // But installing 3.12.6 should upgrade automatically - uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.12.6"), @r###" + uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.12.6"), @" success: true exit_code: 0 ----- stdout ----- @@ -1047,7 +1046,7 @@ fn python_install_preview_upgrade() { ----- stderr ----- Installed Python 3.12.6 in [TIME] + cpython-3.12.6-[PLATFORM] (python3.12) - "###); + "); if cfg!(unix) { insta::with_settings!({ @@ -1080,7 +1079,7 @@ fn python_install_freethreaded() { .with_filtered_exe_suffix(); // Install the latest version - uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.13t"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.13t"), @" success: true exit_code: 0 ----- stdout ----- @@ -1103,17 +1102,17 @@ fn python_install_freethreaded() { // The executable should "work" uv_snapshot!(context.filters(), Command::new(bin_python.as_os_str()) - .arg("-c").arg("import subprocess; print('hello world')"), @r###" + .arg("-c").arg("import subprocess; print('hello world')"), @" success: true exit_code: 0 ----- stdout ----- hello world ----- stderr ----- - "###); + "); // We should find it with opt-in - uv_snapshot!(context.filters(), context.python_find().arg("3.13t"), @r" + uv_snapshot!(context.filters(), context.python_find().arg("3.13t"), @" success: true exit_code: 0 ----- stdout ----- @@ -1123,7 +1122,7 @@ fn python_install_freethreaded() { "); // We should be able to select it with `+freethreaded` - uv_snapshot!(context.filters(), context.python_find().arg("3.13+freethreaded"), @r" + uv_snapshot!(context.filters(), context.python_find().arg("3.13+freethreaded"), @" success: true exit_code: 0 ----- stdout ----- @@ -1133,7 +1132,7 @@ fn python_install_freethreaded() { "); // Create a virtual environment with the freethreaded Python - uv_snapshot!(context.filters(), context.venv().arg("--python").arg("3.13t"), @r" + uv_snapshot!(context.filters(), context.venv().arg("--python").arg("3.13t"), @" success: true exit_code: 0 ----- stdout ----- @@ -1192,7 +1191,7 @@ fn python_install_freethreaded() { fs_err::remove_dir_all(&context.venv).unwrap(); // Should be distinct from 3.13 - uv_snapshot!(context.filters(), context.python_install().arg("3.13"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("3.13"), @" success: true exit_code: 0 ----- stdout ----- @@ -1203,7 +1202,7 @@ fn python_install_freethreaded() { "); // Should not work with older Python versions - uv_snapshot!(context.filters(), context.python_install().arg("3.12t"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("3.12t"), @" success: false exit_code: 2 ----- stdout ----- @@ -1212,7 +1211,7 @@ fn python_install_freethreaded() { error: No download found for request: cpython-3.12+freethreaded-[PLATFORM] "); - uv_snapshot!(context.filters(), context.python_uninstall().arg("--all"), @r" + uv_snapshot!(context.filters(), context.python_uninstall().arg("--all"), @" success: true exit_code: 0 ----- stdout ----- @@ -1233,7 +1232,7 @@ fn python_upgrade_not_allowed() { .with_managed_python_dirs(); // Request a patch upgrade - uv_snapshot!(context.filters(), context.python_upgrade().arg("--preview").arg("3.13.0"), @r" + uv_snapshot!(context.filters(), context.python_upgrade().arg("--preview").arg("3.13.0"), @" success: false exit_code: 1 ----- stdout ----- @@ -1243,7 +1242,7 @@ fn python_upgrade_not_allowed() { "); // Request a pre-release upgrade - uv_snapshot!(context.filters(), context.python_upgrade().arg("--preview").arg("3.14rc3"), @r" + uv_snapshot!(context.filters(), context.python_upgrade().arg("--preview").arg("3.14rc3"), @" success: false exit_code: 1 ----- stdout ----- @@ -1264,7 +1263,7 @@ fn python_install_debug() { .with_managed_python_dirs(); // Install the latest version - uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.13+debug"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.13+debug"), @" success: true exit_code: 0 ----- stdout ----- @@ -1287,17 +1286,17 @@ fn python_install_debug() { // The executable should "work" uv_snapshot!(context.filters(), Command::new(bin_python.as_os_str()) - .arg("-c").arg("import subprocess; print('hello world')"), @r###" + .arg("-c").arg("import subprocess; print('hello world')"), @" success: true exit_code: 0 ----- stdout ----- hello world ----- stderr ----- - "###); + "); // We should find it with opt-in - uv_snapshot!(context.filters(), context.python_find().arg("3.13d"), @r" + uv_snapshot!(context.filters(), context.python_find().arg("3.13d"), @" success: true exit_code: 0 ----- stdout ----- @@ -1307,7 +1306,7 @@ fn python_install_debug() { "); // We should find it without opt-in - uv_snapshot!(context.filters(), context.python_find().arg("3.13"), @r" + uv_snapshot!(context.filters(), context.python_find().arg("3.13"), @" success: true exit_code: 0 ----- stdout ----- @@ -1317,7 +1316,7 @@ fn python_install_debug() { "); // Should be distinct from 3.13 - uv_snapshot!(context.filters(), context.python_install().arg("3.13"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("3.13"), @" success: true exit_code: 0 ----- stdout ----- @@ -1328,7 +1327,7 @@ fn python_install_debug() { "); // Now we should prefer the non-debug version without opt-in - uv_snapshot!(context.filters(), context.python_find().arg("3.13"), @r" + uv_snapshot!(context.filters(), context.python_find().arg("3.13"), @" success: true exit_code: 0 ----- stdout ----- @@ -1338,7 +1337,7 @@ fn python_install_debug() { "); // But still select it with opt-in - uv_snapshot!(context.filters(), context.python_find().arg("3.13d"), @r" + uv_snapshot!(context.filters(), context.python_find().arg("3.13d"), @" success: true exit_code: 0 ----- stdout ----- @@ -1348,7 +1347,7 @@ fn python_install_debug() { "); // We should allow selection with `+debug` - uv_snapshot!(context.filters(), context.python_find().arg("3.13+debug"), @r" + uv_snapshot!(context.filters(), context.python_find().arg("3.13+debug"), @" success: true exit_code: 0 ----- stdout ----- @@ -1358,7 +1357,7 @@ fn python_install_debug() { "); // Should work with older Python versions too - uv_snapshot!(context.filters(), context.python_install().arg("3.12d"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("3.12d"), @" success: true exit_code: 0 ----- stdout ----- @@ -1368,7 +1367,7 @@ fn python_install_debug() { + cpython-3.12.[LATEST]+debug-[PLATFORM] (python3.12d) "); - uv_snapshot!(context.filters(), context.python_uninstall().arg("--all"), @r" + uv_snapshot!(context.filters(), context.python_uninstall().arg("--all"), @" success: true exit_code: 0 ----- stdout ----- @@ -1394,7 +1393,7 @@ fn python_install_debug_freethreaded() { .with_python_download_cache(); // Install the latest version - uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.13td"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.13td"), @" success: true exit_code: 0 ----- stdout ----- @@ -1417,17 +1416,17 @@ fn python_install_debug_freethreaded() { // The executable should "work" uv_snapshot!(context.filters(), Command::new(bin_python.as_os_str()) - .arg("-c").arg("import subprocess; print('hello world')"), @r###" + .arg("-c").arg("import subprocess; print('hello world')"), @" success: true exit_code: 0 ----- stdout ----- hello world ----- stderr ----- - "###); + "); // We should find it with opt-in - uv_snapshot!(context.filters(), context.python_find().arg("3.13td"), @r" + uv_snapshot!(context.filters(), context.python_find().arg("3.13td"), @" success: true exit_code: 0 ----- stdout ----- @@ -1437,7 +1436,7 @@ fn python_install_debug_freethreaded() { "); // We should not find it without opt-in - uv_snapshot!(context.filters(), context.python_find().arg("3.13"), @r" + uv_snapshot!(context.filters(), context.python_find().arg("3.13"), @" success: false exit_code: 2 ----- stdout ----- @@ -1448,7 +1447,7 @@ fn python_install_debug_freethreaded() { // We should allow selection with `+freethread+debug` // TODO(zanieb): We don't support this yet - uv_snapshot!(context.filters(), context.python_find().arg("3.13+freethreaded+debug"), @r" + uv_snapshot!(context.filters(), context.python_find().arg("3.13+freethreaded+debug"), @" success: true exit_code: 0 ----- stdout ----- @@ -1458,7 +1457,7 @@ fn python_install_debug_freethreaded() { "); // Should be distinct from 3.13 - uv_snapshot!(context.filters(), context.python_install().arg("3.13"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("3.13"), @" success: true exit_code: 0 ----- stdout ----- @@ -1469,7 +1468,7 @@ fn python_install_debug_freethreaded() { "); // Should be distinct from 3.13t - uv_snapshot!(context.filters(), context.python_install().arg("3.13t"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("3.13t"), @" success: true exit_code: 0 ----- stdout ----- @@ -1480,7 +1479,7 @@ fn python_install_debug_freethreaded() { "); // Should be distinct from 3.13d - uv_snapshot!(context.filters(), context.python_install().arg("3.13d"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("3.13d"), @" success: true exit_code: 0 ----- stdout ----- @@ -1491,7 +1490,7 @@ fn python_install_debug_freethreaded() { "); // Now we should prefer the non-debug version without opt-in - uv_snapshot!(context.filters(), context.python_find().arg("3.13"), @r" + uv_snapshot!(context.filters(), context.python_find().arg("3.13"), @" success: true exit_code: 0 ----- stdout ----- @@ -1500,7 +1499,7 @@ fn python_install_debug_freethreaded() { ----- stderr ----- "); - uv_snapshot!(context.filters(), context.python_find().arg("3.13t"), @r" + uv_snapshot!(context.filters(), context.python_find().arg("3.13t"), @" success: true exit_code: 0 ----- stdout ----- @@ -1510,7 +1509,7 @@ fn python_install_debug_freethreaded() { "); // But still select it with opt-in - uv_snapshot!(context.filters(), context.python_find().arg("3.13td"), @r" + uv_snapshot!(context.filters(), context.python_find().arg("3.13td"), @" success: true exit_code: 0 ----- stdout ----- @@ -1519,7 +1518,7 @@ fn python_install_debug_freethreaded() { ----- stderr ----- "); - uv_snapshot!(context.filters(), context.python_uninstall().arg("--all"), @r" + uv_snapshot!(context.filters(), context.python_uninstall().arg("--all"), @" success: true exit_code: 0 ----- stdout ----- @@ -1543,34 +1542,34 @@ fn python_install_invalid_request() { .with_python_download_cache(); // Request something that is not a Python version - uv_snapshot!(context.filters(), context.python_install().arg("foobar"), @r###" + uv_snapshot!(context.filters(), context.python_install().arg("foobar"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: `foobar` is not a valid Python download request; see `uv help python` for supported formats and `uv python list --only-downloads` for available versions - "###); + "); // Request a version we don't have a download for - uv_snapshot!(context.filters(), context.python_install().arg("3.8.0"), @r###" + uv_snapshot!(context.filters(), context.python_install().arg("3.8.0"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: No download found for request: cpython-3.8.0-[PLATFORM] - "###); + "); // Request a version we don't have a download for mixed with one we do - uv_snapshot!(context.filters(), context.python_install().arg("3.8.0").arg("3.12"), @r###" + uv_snapshot!(context.filters(), context.python_install().arg("3.8.0").arg("3.12"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: No download found for request: cpython-3.8.0-[PLATFORM] - "###); + "); } #[test] @@ -1595,7 +1594,7 @@ fn python_install_default() { .child(format!("python{}", std::env::consts::EXE_SUFFIX)); // Install a specific version - uv_snapshot!(context.filters(), context.python_install().arg("3.14"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("3.14"), @" success: true exit_code: 0 ----- stdout ----- @@ -1611,7 +1610,7 @@ fn python_install_default() { bin_python_default.assert(predicate::path::missing()); // Install again, with `--default` - uv_snapshot!(context.filters(), context.python_install().arg("--default").arg("3.14"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("--default").arg("3.14"), @" success: true exit_code: 0 ----- stdout ----- @@ -1628,7 +1627,7 @@ fn python_install_default() { bin_python_default.assert(predicate::path::exists()); // Uninstall - uv_snapshot!(context.filters(), context.python_uninstall().arg("--all"), @r" + uv_snapshot!(context.filters(), context.python_uninstall().arg("--all"), @" success: true exit_code: 0 ----- stdout ----- @@ -1645,7 +1644,7 @@ fn python_install_default() { bin_python_default.assert(predicate::path::missing()); // Install the latest version, i.e., a "default install" - uv_snapshot!(context.filters(), context.python_install().arg("--default"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("--default"), @" success: true exit_code: 0 ----- stdout ----- @@ -1713,7 +1712,7 @@ fn python_install_default() { } // Uninstall again - uv_snapshot!(context.filters(), context.python_uninstall().arg("3.14"), @r" + uv_snapshot!(context.filters(), context.python_uninstall().arg("3.14"), @" success: true exit_code: 0 ----- stdout ----- @@ -1730,7 +1729,7 @@ fn python_install_default() { bin_python_default.assert(predicate::path::missing()); // Install multiple versions, with the `--default` flag - uv_snapshot!(context.filters(), context.python_install().arg("3.12").arg("3.14").arg("--default"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("3.12").arg("3.14").arg("--default"), @" success: false exit_code: 2 ----- stdout ----- @@ -1741,7 +1740,7 @@ fn python_install_default() { "); // Install 3.12 as a new default - uv_snapshot!(context.filters(), context.python_install().arg("3.12").arg("--default"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("3.12").arg("--default"), @" success: true exit_code: 0 ----- stdout ----- @@ -1835,7 +1834,7 @@ fn python_install_default_preview() { .child(format!("python{}", std::env::consts::EXE_SUFFIX)); // Install a specific version - uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.14"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.14"), @" success: true exit_code: 0 ----- stdout ----- @@ -1851,7 +1850,7 @@ fn python_install_default_preview() { bin_python_default.assert(predicate::path::missing()); // Install again, with `--default` - uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("--default").arg("3.14"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("--default").arg("3.14"), @" success: true exit_code: 0 ----- stdout ----- @@ -1867,7 +1866,7 @@ fn python_install_default_preview() { bin_python_default.assert(predicate::path::exists()); // Uninstall - uv_snapshot!(context.filters(), context.python_uninstall().arg("--all"), @r" + uv_snapshot!(context.filters(), context.python_uninstall().arg("--all"), @" success: true exit_code: 0 ----- stdout ----- @@ -1884,7 +1883,7 @@ fn python_install_default_preview() { bin_python_default.assert(predicate::path::missing()); // Install the latest version, i.e., a "default install" - uv_snapshot!(context.filters(), context.python_install().arg("--default").arg("--preview"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("--default").arg("--preview"), @" success: true exit_code: 0 ----- stdout ----- @@ -1969,7 +1968,7 @@ fn python_install_default_preview() { } // Uninstall again - uv_snapshot!(context.filters(), context.python_uninstall().arg("3.14"), @r" + uv_snapshot!(context.filters(), context.python_uninstall().arg("3.14"), @" success: true exit_code: 0 ----- stdout ----- @@ -1986,17 +1985,17 @@ fn python_install_default_preview() { bin_python_default.assert(predicate::path::missing()); // Install multiple versions, with the `--default` flag - uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.12").arg("3.14").arg("--default"), @r###" + uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.12").arg("3.14").arg("--default"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: The `--default` flag cannot be used with multiple targets - "###); + "); // Install 3.12 as a new default - uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.12").arg("--default"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.12").arg("--default"), @" success: true exit_code: 0 ----- stdout ----- @@ -2085,7 +2084,7 @@ fn python_install_default_preview() { } // Change the default to 3.14 - uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.14").arg("--default"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.14").arg("--default"), @" success: true exit_code: 0 ----- stdout ----- @@ -2208,26 +2207,26 @@ fn python_install_unknown() { .with_python_download_cache(); // An unknown request - uv_snapshot!(context.filters(), context.python_install().arg("foobar"), @r###" + uv_snapshot!(context.filters(), context.python_install().arg("foobar"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: `foobar` is not a valid Python download request; see `uv help python` for supported formats and `uv python list --only-downloads` for available versions - "###); + "); context.temp_dir.child("foo").create_dir_all().unwrap(); // A directory - uv_snapshot!(context.filters(), context.python_install().arg("./foo"), @r###" + uv_snapshot!(context.filters(), context.python_install().arg("./foo"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: `./foo` is not a valid Python download request; see `uv help python` for supported formats and `uv python list --only-downloads` for available versions - "###); + "); } #[cfg(unix)] @@ -2249,7 +2248,7 @@ fn python_install_broken_link() { symlink(context.temp_dir.join("does-not-exist"), &bin_python).unwrap(); // Install - uv_snapshot!(context.filters(), context.python_install().arg("3.13"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("3.13"), @" success: true exit_code: 0 ----- stdout ----- @@ -2318,7 +2317,7 @@ fn python_install_default_from_env() { .with_python_download_cache(); // Install the version specified by the `UV_PYTHON` environment variable by default - uv_snapshot!(context.filters(), context.python_install().env(EnvVars::UV_PYTHON, "3.12"), @r" + uv_snapshot!(context.filters(), context.python_install().env(EnvVars::UV_PYTHON, "3.12"), @" success: true exit_code: 0 ----- stdout ----- @@ -2329,7 +2328,7 @@ fn python_install_default_from_env() { "); // But prefer explicit requests - uv_snapshot!(context.filters(), context.python_install().arg("3.11").env(EnvVars::UV_PYTHON, "3.12"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("3.11").env(EnvVars::UV_PYTHON, "3.12"), @" success: true exit_code: 0 ----- stdout ----- @@ -2340,7 +2339,7 @@ fn python_install_default_from_env() { "); // We should ignore `UV_PYTHON` here and complain there is not a target - uv_snapshot!(context.filters(), context.python_uninstall().env(EnvVars::UV_PYTHON, "3.12"), @r###" + uv_snapshot!(context.filters(), context.python_uninstall().env(EnvVars::UV_PYTHON, "3.12"), @" success: false exit_code: 2 ----- stdout ----- @@ -2352,10 +2351,10 @@ fn python_install_default_from_env() { Usage: uv python uninstall --install-dir ... For more information, try '--help'. - "###); + "); // We should ignore `UV_PYTHON` here and respect `--all` - uv_snapshot!(context.filters(), context.python_uninstall().arg("--all").env(EnvVars::UV_PYTHON, "3.11"), @r" + uv_snapshot!(context.filters(), context.python_uninstall().arg("--all").env(EnvVars::UV_PYTHON, "3.11"), @" success: true exit_code: 0 ----- stdout ----- @@ -2368,7 +2367,7 @@ fn python_install_default_from_env() { "); // Uninstall with no targets should error - uv_snapshot!(context.filters(), context.python_uninstall(), @r###" + uv_snapshot!(context.filters(), context.python_uninstall(), @" success: false exit_code: 2 ----- stdout ----- @@ -2380,10 +2379,10 @@ fn python_install_default_from_env() { Usage: uv python uninstall --install-dir ... For more information, try '--help'. - "###); + "); // Uninstall with conflicting options should error - uv_snapshot!(context.filters(), context.python_uninstall().arg("--all").arg("3.12"), @r###" + uv_snapshot!(context.filters(), context.python_uninstall().arg("--all").arg("3.12"), @" success: false exit_code: 2 ----- stdout ----- @@ -2394,7 +2393,7 @@ fn python_install_default_from_env() { Usage: uv python uninstall --all --install-dir ... For more information, try '--help'. - "###); + "); } #[cfg(target_os = "macos")] @@ -2456,7 +2455,7 @@ fn python_install_prerelease() { // Install 3.15 // For now, this provides test coverage of pre-release handling - uv_snapshot!(context.filters(), context.python_install().arg("3.15"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("3.15"), @" success: true exit_code: 0 ----- stdout ----- @@ -2467,7 +2466,7 @@ fn python_install_prerelease() { "); // Install a specific pre-release - uv_snapshot!(context.filters(), context.python_install().arg("3.15.0a2"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("3.15.0a2"), @" success: true exit_code: 0 ----- stdout ----- @@ -2495,7 +2494,7 @@ fn python_find_prerelease() { // We should be able to find this version without opt-in, because there is no stable release // installed - uv_snapshot!(context.filters(), context.python_find().arg("3.15"), @r" + uv_snapshot!(context.filters(), context.python_find().arg("3.15"), @" success: true exit_code: 0 ----- stdout ----- @@ -2505,7 +2504,7 @@ fn python_find_prerelease() { "); // This also applies to `>=` requests, even though pre-releases aren't technically in the range - uv_snapshot!(context.filters(), context.python_find().arg(">=3.15"), @r" + uv_snapshot!(context.filters(), context.python_find().arg(">=3.15"), @" success: true exit_code: 0 ----- stdout ----- @@ -2514,7 +2513,7 @@ fn python_find_prerelease() { ----- stderr ----- "); - uv_snapshot!(context.filters(), context.python_find().arg("3"), @r" + uv_snapshot!(context.filters(), context.python_find().arg("3"), @" success: true exit_code: 0 ----- stdout ----- @@ -2524,7 +2523,7 @@ fn python_find_prerelease() { "); // If we install a stable version, that should be preferred though - uv_snapshot!(context.filters(), context.python_install().arg("3.13"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("3.13"), @" success: true exit_code: 0 ----- stdout ----- @@ -2534,7 +2533,7 @@ fn python_find_prerelease() { + cpython-3.13.[LATEST]-[PLATFORM] (python3.13) "); - uv_snapshot!(context.filters(), context.python_find().arg("3"), @r" + uv_snapshot!(context.filters(), context.python_find().arg("3"), @" success: true exit_code: 0 ----- stdout ----- @@ -2565,7 +2564,7 @@ fn python_install_cached() { // Install the latest version uv_snapshot!(context.filters(), context .python_install() - .env(EnvVars::UV_PYTHON_CACHE_DIR, python_cache.as_ref()), @r" + .env(EnvVars::UV_PYTHON_CACHE_DIR, python_cache.as_ref()), @" success: true exit_code: 0 ----- stdout ----- @@ -2585,16 +2584,16 @@ fn python_install_cached() { // Should be a no-op when already installed uv_snapshot!(context.filters(), context .python_install() - .env(EnvVars::UV_PYTHON_CACHE_DIR, python_cache.as_ref()), @r###" + .env(EnvVars::UV_PYTHON_CACHE_DIR, python_cache.as_ref()), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Python is already installed. Use `uv python install ` to install another version. - "###); + "); - uv_snapshot!(context.filters(), context.python_uninstall().arg("3.14"), @r" + uv_snapshot!(context.filters(), context.python_uninstall().arg("3.14"), @" success: true exit_code: 0 ----- stdout ----- @@ -2609,7 +2608,7 @@ fn python_install_cached() { uv_snapshot!(context.filters(), context .python_install() .arg("--offline") - .env(EnvVars::UV_PYTHON_CACHE_DIR, python_cache.as_ref()), @r" + .env(EnvVars::UV_PYTHON_CACHE_DIR, python_cache.as_ref()), @" success: true exit_code: 0 ----- stdout ----- @@ -2629,7 +2628,7 @@ fn python_install_cached() { .python_install() .arg("3.12") .arg("--offline") - .env(EnvVars::UV_PYTHON_CACHE_DIR, python_cache.as_ref()), @r" + .env(EnvVars::UV_PYTHON_CACHE_DIR, python_cache.as_ref()), @" success: false exit_code: 1 ----- stdout ----- @@ -2655,7 +2654,7 @@ fn python_install_no_cache() { .with_managed_python_dirs(); // Install the latest version - uv_snapshot!(context.filters(), context.python_install(), @r" + uv_snapshot!(context.filters(), context.python_install(), @" success: true exit_code: 0 ----- stdout ----- @@ -2673,17 +2672,17 @@ fn python_install_no_cache() { bin_python.assert(predicate::path::exists()); // Should be a no-op when already installed - uv_snapshot!(context.filters(), context.python_install(), @r###" + uv_snapshot!(context.filters(), context.python_install(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Python is already installed. Use `uv python install ` to install another version. - "###); + "); // Similarly, when a requested version is already installed - uv_snapshot!(context.filters(), context.python_install().arg("3.14"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("3.14"), @" success: true exit_code: 0 ----- stdout ----- @@ -2693,7 +2692,7 @@ fn python_install_no_cache() { "); // You can opt-in to a reinstall - uv_snapshot!(context.filters(), context.python_install().arg("3.14").arg("--reinstall"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("3.14").arg("--reinstall"), @" success: true exit_code: 0 ----- stdout ----- @@ -2704,7 +2703,7 @@ fn python_install_no_cache() { "); // Uninstallation requires an argument - uv_snapshot!(context.filters(), context.python_uninstall(), @r###" + uv_snapshot!(context.filters(), context.python_uninstall(), @" success: false exit_code: 2 ----- stdout ----- @@ -2716,9 +2715,9 @@ fn python_install_no_cache() { Usage: uv python uninstall --install-dir ... For more information, try '--help'. - "###); + "); - uv_snapshot!(context.filters(), context.python_uninstall().arg("3.14"), @r" + uv_snapshot!(context.filters(), context.python_uninstall().arg("3.14"), @" success: true exit_code: 0 ----- stdout ----- @@ -2739,7 +2738,7 @@ fn python_install_no_cache() { uv_snapshot!(filters, context .python_install() .arg("3.12") - .arg("--offline"), @r" + .arg("--offline"), @" success: false exit_code: 1 ----- stdout ----- @@ -2919,7 +2918,7 @@ fn install_transparent_patch_upgrade_uv_venv() { .with_filtered_python_install_bin(); // Install a lower patch version. - uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.12.9"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.12.9"), @" success: true exit_code: 0 ----- stdout ----- @@ -2932,7 +2931,7 @@ fn install_transparent_patch_upgrade_uv_venv() { // Create a virtual environment. uv_snapshot!(context.filters(), context.venv().arg("-p").arg("3.12") - .arg(context.venv.as_os_str()), @r" + .arg(context.venv.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -2944,7 +2943,7 @@ fn install_transparent_patch_upgrade_uv_venv() { " ); - uv_snapshot!(context.filters(), context.run().arg("python").arg("--version"), @r" + uv_snapshot!(context.filters(), context.run().arg("python").arg("--version"), @" success: true exit_code: 0 ----- stdout ----- @@ -2955,7 +2954,7 @@ fn install_transparent_patch_upgrade_uv_venv() { ); // Install a higher patch version. - uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.12.11"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.12.11"), @" success: true exit_code: 0 ----- stdout ----- @@ -2967,7 +2966,7 @@ fn install_transparent_patch_upgrade_uv_venv() { ); // Virtual environment should reflect higher version. - uv_snapshot!(context.filters(), context.run().arg("python").arg("--version"), @r" + uv_snapshot!(context.filters(), context.run().arg("python").arg("--version"), @" success: true exit_code: 0 ----- stdout ----- @@ -2978,7 +2977,7 @@ fn install_transparent_patch_upgrade_uv_venv() { ); // Install a lower patch version. - uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.12.8"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.12.8"), @" success: true exit_code: 0 ----- stdout ----- @@ -2990,7 +2989,7 @@ fn install_transparent_patch_upgrade_uv_venv() { ); // Virtual environment should reflect highest version. - uv_snapshot!(context.filters(), context.run().arg("python").arg("--version"), @r" + uv_snapshot!(context.filters(), context.run().arg("python").arg("--version"), @" success: true exit_code: 0 ----- stdout ----- @@ -3013,7 +3012,7 @@ fn install_multiple_patches() { .with_filtered_python_install_bin(); // Install 3.12 patches in ascending order list - uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.12.9").arg("3.12.11"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.12.9").arg("3.12.11"), @" success: true exit_code: 0 ----- stdout ----- @@ -3027,7 +3026,7 @@ fn install_multiple_patches() { // Create a virtual environment. uv_snapshot!(context.filters(), context.venv().arg("-p").arg("3.12") - .arg(context.venv.as_os_str()), @r" + .arg(context.venv.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -3040,7 +3039,7 @@ fn install_multiple_patches() { ); // Virtual environment should be on highest installed patch. - uv_snapshot!(context.filters(), context.run().arg("python").arg("--version"), @r" + uv_snapshot!(context.filters(), context.run().arg("python").arg("--version"), @" success: true exit_code: 0 ----- stdout ----- @@ -3054,7 +3053,7 @@ fn install_multiple_patches() { fs_err::remove_dir_all(&context.venv).unwrap(); // Install 3.10 patches in descending order list - uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.10.17").arg("3.10.16"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.10.17").arg("3.10.16"), @" success: true exit_code: 0 ----- stdout ----- @@ -3068,7 +3067,7 @@ fn install_multiple_patches() { // Create a virtual environment on 3.10. uv_snapshot!(context.filters(), context.venv().arg("-p").arg("3.10") - .arg(context.venv.as_os_str()), @r" + .arg(context.venv.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -3081,7 +3080,7 @@ fn install_multiple_patches() { ); // Virtual environment should be on highest installed patch. - uv_snapshot!(context.filters(), context.run().arg("python").arg("--version"), @r" + uv_snapshot!(context.filters(), context.run().arg("python").arg("--version"), @" success: true exit_code: 0 ----- stdout ----- @@ -3104,7 +3103,7 @@ fn uninstall_highest_patch() { .with_filtered_python_install_bin(); // Install patches in ascending order list - uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.12.11").arg("3.12.9").arg("3.12.8"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.12.11").arg("3.12.9").arg("3.12.8"), @" success: true exit_code: 0 ----- stdout ----- @@ -3118,7 +3117,7 @@ fn uninstall_highest_patch() { ); uv_snapshot!(context.filters(), context.venv().arg("-p").arg("3.12") - .arg(context.venv.as_os_str()), @r" + .arg(context.venv.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -3130,7 +3129,7 @@ fn uninstall_highest_patch() { " ); - uv_snapshot!(context.filters(), context.run().arg("python").arg("--version"), @r" + uv_snapshot!(context.filters(), context.run().arg("python").arg("--version"), @" success: true exit_code: 0 ----- stdout ----- @@ -3141,7 +3140,7 @@ fn uninstall_highest_patch() { ); // Uninstall the highest patch version - uv_snapshot!(context.filters(), context.python_uninstall().arg("--preview").arg("3.12.11"), @r" + uv_snapshot!(context.filters(), context.python_uninstall().arg("--preview").arg("3.12.11"), @" success: true exit_code: 0 ----- stdout ----- @@ -3154,7 +3153,7 @@ fn uninstall_highest_patch() { ); // Virtual environment should be on highest patch version remaining. - uv_snapshot!(context.filters(), context.run().arg("python").arg("--version"), @r" + uv_snapshot!(context.filters(), context.run().arg("python").arg("--version"), @" success: true exit_code: 0 ----- stdout ----- @@ -3177,7 +3176,7 @@ fn install_no_transparent_upgrade_with_venv_patch_specification() { .with_python_download_cache() .with_filtered_python_install_bin(); - uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.12.9"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.12.9"), @" success: true exit_code: 0 ----- stdout ----- @@ -3190,7 +3189,7 @@ fn install_no_transparent_upgrade_with_venv_patch_specification() { // Create a virtual environment with a patch version uv_snapshot!(context.filters(), context.venv().arg("-p").arg("3.12.9") - .arg(context.venv.as_os_str()), @r" + .arg(context.venv.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -3202,7 +3201,7 @@ fn install_no_transparent_upgrade_with_venv_patch_specification() { " ); - uv_snapshot!(context.filters(), context.run().arg("python").arg("--version"), @r" + uv_snapshot!(context.filters(), context.run().arg("python").arg("--version"), @" success: true exit_code: 0 ----- stdout ----- @@ -3213,7 +3212,7 @@ fn install_no_transparent_upgrade_with_venv_patch_specification() { ); // Install a higher patch version. - uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.12.11"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.12.11"), @" success: true exit_code: 0 ----- stdout ----- @@ -3225,7 +3224,7 @@ fn install_no_transparent_upgrade_with_venv_patch_specification() { ); // The virtual environment Python version is transparently upgraded. - uv_snapshot!(context.filters(), context.run().arg("python").arg("--version"), @r" + uv_snapshot!(context.filters(), context.run().arg("python").arg("--version"), @" success: true exit_code: 0 ----- stdout ----- @@ -3249,7 +3248,7 @@ fn install_transparent_patch_upgrade_venv_module() { let bin_dir = context.temp_dir.child("bin"); - uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.12.9"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.12.9"), @" success: true exit_code: 0 ----- stdout ----- @@ -3260,7 +3259,7 @@ fn install_transparent_patch_upgrade_venv_module() { " ); - uv_snapshot!(context.filters(), context.run().arg("python").arg("--version"), @r" + uv_snapshot!(context.filters(), context.run().arg("python").arg("--version"), @" success: true exit_code: 0 ----- stdout ----- @@ -3272,7 +3271,7 @@ fn install_transparent_patch_upgrade_venv_module() { // Create a virtual environment using venv module. uv_snapshot!(context.filters(), context.run().arg("python").arg("-m").arg("venv").arg(context.venv.as_os_str()).arg("--without-pip") - .env(EnvVars::PATH, bin_dir.as_os_str()), @r" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -3280,7 +3279,7 @@ fn install_transparent_patch_upgrade_venv_module() { ----- stderr ----- "); - uv_snapshot!(context.filters(), context.run().arg("python").arg("--version"), @r" + uv_snapshot!(context.filters(), context.run().arg("python").arg("--version"), @" success: true exit_code: 0 ----- stdout ----- @@ -3291,7 +3290,7 @@ fn install_transparent_patch_upgrade_venv_module() { ); // Install a higher patch version - uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.12.11"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.12.11"), @" success: true exit_code: 0 ----- stdout ----- @@ -3303,7 +3302,7 @@ fn install_transparent_patch_upgrade_venv_module() { ); // Virtual environment should reflect highest patch version. - uv_snapshot!(context.filters(), context.run().arg("python").arg("--version"), @r" + uv_snapshot!(context.filters(), context.run().arg("python").arg("--version"), @" success: true exit_code: 0 ----- stdout ----- @@ -3325,7 +3324,7 @@ fn install_lower_patch_automatically() { .with_python_download_cache() .with_filtered_python_install_bin(); - uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.12.11"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.12.11"), @" success: true exit_code: 0 ----- stdout ----- @@ -3337,7 +3336,7 @@ fn install_lower_patch_automatically() { ); uv_snapshot!(context.filters(), context.venv().arg("-p").arg("3.12") - .arg(context.venv.as_os_str()), @r" + .arg(context.venv.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -3349,7 +3348,7 @@ fn install_lower_patch_automatically() { " ); - uv_snapshot!(context.filters(), context.init().arg("-p").arg("3.12.9").arg("proj"), @r" + uv_snapshot!(context.filters(), context.init().arg("-p").arg("3.12.9").arg("proj"), @" success: true exit_code: 0 ----- stdout ----- @@ -3363,7 +3362,7 @@ fn install_lower_patch_automatically() { // lower patch version uv_snapshot!(context.filters(), context.venv() .arg("--directory").arg("proj") - .arg("-p").arg("3.12.9"), @r" + .arg("-p").arg("3.12.9"), @" success: true exit_code: 0 ----- stdout ----- @@ -3375,7 +3374,7 @@ fn install_lower_patch_automatically() { "); // Original virtual environment should still point to higher patch - uv_snapshot!(context.filters(), context.run().arg("python").arg("--version"), @r" + uv_snapshot!(context.filters(), context.run().arg("python").arg("--version"), @" success: true exit_code: 0 ----- stdout ----- @@ -3395,7 +3394,7 @@ fn uninstall_last_patch() { .with_python_download_cache() .with_filtered_virtualenv_bin(); - uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.10.17"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.10.17"), @" success: true exit_code: 0 ----- stdout ----- @@ -3406,7 +3405,7 @@ fn uninstall_last_patch() { " ); - uv_snapshot!(context.filters(), context.venv().arg("-p").arg("3.10"), @r" + uv_snapshot!(context.filters(), context.venv().arg("-p").arg("3.10"), @" success: true exit_code: 0 ----- stdout ----- @@ -3418,7 +3417,7 @@ fn uninstall_last_patch() { " ); - uv_snapshot!(context.filters(), context.run().arg("python").arg("--version"), @r" + uv_snapshot!(context.filters(), context.run().arg("python").arg("--version"), @" success: true exit_code: 0 ----- stdout ----- @@ -3428,7 +3427,7 @@ fn uninstall_last_patch() { " ); - uv_snapshot!(context.filters(), context.python_uninstall().arg("--preview").arg("3.10.17"), @r" + uv_snapshot!(context.filters(), context.python_uninstall().arg("--preview").arg("3.10.17"), @" success: true exit_code: 0 ----- stdout ----- @@ -3444,7 +3443,7 @@ fn uninstall_last_patch() { filters.push(("python3", "python")); #[cfg(unix)] - uv_snapshot!(filters, context.run().arg("python").arg("--version"), @r" + uv_snapshot!(filters, context.run().arg("python").arg("--version"), @" success: false exit_code: 2 ----- stdout ----- @@ -3479,7 +3478,7 @@ fn python_install_pyodide() { .with_managed_python_dirs() .with_python_download_cache(); - uv_snapshot!(context.filters(), context.python_install().arg("cpython-3.13.2-emscripten-wasm32-musl"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("cpython-3.13.2-emscripten-wasm32-musl"), @" success: true exit_code: 0 ----- stdout ----- @@ -3510,17 +3509,17 @@ fn python_install_pyodide() { // The executable should "work" uv_snapshot!(context.filters(), Command::new(bin_python.as_os_str()) - .arg("-c").arg("import subprocess; print('hello world')"), @r###" + .arg("-c").arg("import subprocess; print('hello world')"), @" success: true exit_code: 0 ----- stdout ----- hello world ----- stderr ----- - "###); + "); // We should be able to find the Pyodide interpreter - uv_snapshot!(context.filters(), context.python_find().arg("cpython-3.13.2-emscripten-wasm32-musl"), @r" + uv_snapshot!(context.filters(), context.python_find().arg("cpython-3.13.2-emscripten-wasm32-musl"), @" success: true exit_code: 0 ----- stdout ----- @@ -3530,7 +3529,7 @@ fn python_install_pyodide() { "); // We should be able to create a virtual environment with it - uv_snapshot!(context.filters(), context.venv().arg("--python").arg("cpython-3.13.2-emscripten-wasm32-musl"), @r" + uv_snapshot!(context.filters(), context.venv().arg("--python").arg("cpython-3.13.2-emscripten-wasm32-musl"), @" success: true exit_code: 0 ----- stdout ----- @@ -3542,7 +3541,7 @@ fn python_install_pyodide() { "); // We should be able to run the Python in the virtual environment - uv_snapshot!(context.filters(), context.python_command().arg("-c").arg("import subprocess; print('hello world')"), @r" + uv_snapshot!(context.filters(), context.python_command().arg("-c").arg("import subprocess; print('hello world')"), @" success: true exit_code: 0 ----- stdout ----- @@ -3555,7 +3554,7 @@ fn python_install_pyodide() { fs_err::remove_dir_all(&context.venv).unwrap(); // Install via `pyodide` - uv_snapshot!(context.filters(), context.python_install().arg("pyodide"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("pyodide"), @" success: true exit_code: 0 ----- stdout ----- @@ -3568,7 +3567,7 @@ fn python_install_pyodide() { context.python_uninstall().arg("--all").assert().success(); // Install via `pyodide@` - uv_snapshot!(context.filters(), context.python_install().arg("pyodide@3.13"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("pyodide@3.13"), @" success: true exit_code: 0 ----- stdout ----- @@ -3579,7 +3578,7 @@ fn python_install_pyodide() { "); // Find via `pyodide`` - uv_snapshot!(context.filters(), context.python_find().arg("pyodide"), @r" + uv_snapshot!(context.filters(), context.python_find().arg("pyodide"), @" success: true exit_code: 0 ----- stdout ----- @@ -3589,7 +3588,7 @@ fn python_install_pyodide() { "); // Find without a request should fail - uv_snapshot!(context.filters(), context.python_find(), @r" + uv_snapshot!(context.filters(), context.python_find(), @" success: false exit_code: 2 ----- stdout ----- @@ -3598,7 +3597,7 @@ fn python_install_pyodide() { error: No interpreter found in virtual environments, managed installations, or search path "); // Find with "cpython" should also fail - uv_snapshot!(context.filters(), context.python_find().arg("cpython"), @r" + uv_snapshot!(context.filters(), context.python_find().arg("cpython"), @" success: false exit_code: 2 ----- stdout ----- @@ -3609,7 +3608,7 @@ fn python_install_pyodide() { // Install a CPython interpreter let context = context.with_filtered_python_keys(); - uv_snapshot!(context.filters(), context.python_install().arg("cpython"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("cpython"), @" success: true exit_code: 0 ----- stdout ----- @@ -3620,7 +3619,7 @@ fn python_install_pyodide() { "); // Now, we should prefer that - uv_snapshot!(context.filters(), context.python_find().arg("any"), @r" + uv_snapshot!(context.filters(), context.python_find().arg("any"), @" success: true exit_code: 0 ----- stdout ----- @@ -3630,7 +3629,7 @@ fn python_install_pyodide() { "); // Unless we request pyodide - uv_snapshot!(context.filters(), context.python_find().arg("pyodide"), @r" + uv_snapshot!(context.filters(), context.python_find().arg("pyodide"), @" success: true exit_code: 0 ----- stdout ----- @@ -3655,7 +3654,7 @@ fn python_install_build_version() { uv_snapshot!(context.filters(), context.python_install() .arg("3.12") - .env(EnvVars::UV_PYTHON_CPYTHON_BUILD, "20240814"), @r" + .env(EnvVars::UV_PYTHON_CPYTHON_BUILD, "20240814"), @" success: true exit_code: 0 ----- stdout ----- @@ -3677,7 +3676,7 @@ fn python_install_build_version() { // We should find the build uv_snapshot!(context.filters(), context.python_find() .arg("3.12") - .env(EnvVars::UV_PYTHON_CPYTHON_BUILD, "20240814"), @r" + .env(EnvVars::UV_PYTHON_CPYTHON_BUILD, "20240814"), @" success: true exit_code: 0 ----- stdout ----- @@ -3689,7 +3688,7 @@ fn python_install_build_version() { // If the build number does not match, we should ignore the installation uv_snapshot!(context.filters(), context.python_find() .arg("3.12") - .env(EnvVars::UV_PYTHON_CPYTHON_BUILD, "99999999"), @r" + .env(EnvVars::UV_PYTHON_CPYTHON_BUILD, "99999999"), @" success: false exit_code: 2 ----- stdout ----- @@ -3701,7 +3700,7 @@ fn python_install_build_version() { // If there's no install for a build number, we should fail uv_snapshot!(context.filters(), context.python_install() .arg("3.12") - .env(EnvVars::UV_PYTHON_CPYTHON_BUILD, "99999999"), @r" + .env(EnvVars::UV_PYTHON_CPYTHON_BUILD, "99999999"), @" success: false exit_code: 2 ----- stdout ----- @@ -3713,7 +3712,7 @@ fn python_install_build_version() { // Requesting a specific patch version without a matching build number should fail uv_snapshot!(context.filters(), context.python_install() .arg("3.12.10") - .env(EnvVars::UV_PYTHON_CPYTHON_BUILD, "20250814"), @r" + .env(EnvVars::UV_PYTHON_CPYTHON_BUILD, "20250814"), @" success: false exit_code: 2 ----- stdout ----- @@ -3738,7 +3737,7 @@ fn python_install_build_version_pypy() { uv_snapshot!(context.filters(), context.python_install() .arg("pypy3.10") - .env(EnvVars::UV_PYTHON_PYPY_BUILD, "7.3.19"), @r" + .env(EnvVars::UV_PYTHON_PYPY_BUILD, "7.3.19"), @" success: true exit_code: 0 ----- stdout ----- @@ -3760,7 +3759,7 @@ fn python_install_build_version_pypy() { // We should find the build uv_snapshot!(context.filters(), context.python_find() .arg("pypy3.10") - .env(EnvVars::UV_PYTHON_PYPY_BUILD, "7.3.19"), @r" + .env(EnvVars::UV_PYTHON_PYPY_BUILD, "7.3.19"), @" success: true exit_code: 0 ----- stdout ----- @@ -3772,7 +3771,7 @@ fn python_install_build_version_pypy() { // If the build number does not match, we should ignore the installation uv_snapshot!(context.filters(), context.python_find() .arg("pypy3.10") - .env(EnvVars::UV_PYTHON_PYPY_BUILD, "99.99.99"), @r" + .env(EnvVars::UV_PYTHON_PYPY_BUILD, "99.99.99"), @" success: false exit_code: 2 ----- stdout ----- @@ -3784,7 +3783,7 @@ fn python_install_build_version_pypy() { // If there's no install for a build number, we should fail uv_snapshot!(context.filters(), context.python_install() .arg("pypy3.10") - .env(EnvVars::UV_PYTHON_PYPY_BUILD, "99.99.99"), @r" + .env(EnvVars::UV_PYTHON_PYPY_BUILD, "99.99.99"), @" success: false exit_code: 2 ----- stdout ----- @@ -3803,7 +3802,7 @@ fn python_install_upgrade() { .with_managed_python_dirs(); // Provide `--upgrade` as an `install` option without any versions - uv_snapshot!(context.filters(), context.python_install().arg("--upgrade"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("--upgrade"), @" success: true exit_code: 0 ----- stdout ----- @@ -3814,7 +3813,7 @@ fn python_install_upgrade() { "); // Provide `--upgrade` as an `install` option without any versions again! - uv_snapshot!(context.filters(), context.python_install().arg("--upgrade"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("--upgrade"), @" success: true exit_code: 0 ----- stdout ----- @@ -3824,7 +3823,7 @@ fn python_install_upgrade() { "); // Install an earlier patch version - uv_snapshot!(context.filters(), context.python_install().arg("3.10.17"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("3.10.17"), @" success: true exit_code: 0 ----- stdout ----- @@ -3835,7 +3834,7 @@ fn python_install_upgrade() { "); // Ask for an `--upgrade` - uv_snapshot!(context.filters(), context.python_install().arg("--upgrade").arg("3.10"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("--upgrade").arg("3.10"), @" success: true exit_code: 0 ----- stdout ----- @@ -3846,7 +3845,7 @@ fn python_install_upgrade() { "); // Request a patch version with `--upgrade` - uv_snapshot!(context.filters(), context.python_install().arg("--upgrade").arg("3.11.4"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("--upgrade").arg("3.11.4"), @" success: false exit_code: 1 ----- stdout ----- @@ -3856,7 +3855,7 @@ fn python_install_upgrade() { "); // Request a version that isn't installed yet - uv_snapshot!(context.filters(), context.python_install().arg("--upgrade").arg("3.11"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("--upgrade").arg("3.11"), @" success: true exit_code: 0 ----- stdout ----- @@ -3867,7 +3866,7 @@ fn python_install_upgrade() { "); // Ask for it again - uv_snapshot!(context.filters(), context.python_install().arg("--upgrade").arg("3.11"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("--upgrade").arg("3.11"), @" success: true exit_code: 0 ----- stdout ----- @@ -3877,7 +3876,7 @@ fn python_install_upgrade() { "); // Install an outdated version - uv_snapshot!(context.filters(), context.python_install().arg("3.9.5"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("3.9.5"), @" success: true exit_code: 0 ----- stdout ----- @@ -3888,7 +3887,7 @@ fn python_install_upgrade() { "); // We shouldn't update it when not relevant - uv_snapshot!(context.filters(), context.python_install().arg("--upgrade").arg("3.11"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("--upgrade").arg("3.11"), @" success: true exit_code: 0 ----- stdout ----- @@ -3898,7 +3897,7 @@ fn python_install_upgrade() { "); // Ask for multiple already satisfied versions - uv_snapshot!(context.filters(), context.python_install().arg("--upgrade").arg("3.10").arg("3.11"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("--upgrade").arg("3.10").arg("3.11"), @" success: true exit_code: 0 ----- stdout ----- @@ -3908,7 +3907,7 @@ fn python_install_upgrade() { "); // Mix in an unsatisfied version and a missing one - uv_snapshot!(context.filters(), context.python_install().arg("--upgrade").arg("3.9").arg("3.10").arg("3.11").arg("3.12"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("--upgrade").arg("3.9").arg("3.10").arg("3.11").arg("3.12"), @" success: true exit_code: 0 ----- stdout ----- @@ -3932,7 +3931,7 @@ fn python_install_upgrade_version_file() { context.python_pin().arg("3.13").assert().success(); // Provide `--upgrade` as an `install` option without any versions - uv_snapshot!(context.filters(), context.python_install().arg("--upgrade"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("--upgrade"), @" success: true exit_code: 0 ----- stdout ----- @@ -3943,7 +3942,7 @@ fn python_install_upgrade_version_file() { "); // Provide `--upgrade` as an `install` option without any versions again! - uv_snapshot!(context.filters(), context.python_install().arg("--upgrade"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("--upgrade"), @" success: true exit_code: 0 ----- stdout ----- @@ -3956,7 +3955,7 @@ fn python_install_upgrade_version_file() { context.python_pin().arg("3.12.4").assert().success(); // Provide `--upgrade` as an `install` option without any versions - uv_snapshot!(context.filters(), context.python_install().arg("--upgrade"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("--upgrade"), @" success: false exit_code: 1 ----- stdout ----- @@ -3980,17 +3979,17 @@ fn python_install_armv7() { .with_filtered_exe_suffix(); // Explicitly request a musl build for armv7l - uv_snapshot!(context.filters(), context.python_install().arg("cpython-3.12.12-linux-armv7-musl"), @r###" + uv_snapshot!(context.filters(), context.python_install().arg("cpython-3.12.12-linux-armv7-musl"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: uv does not yet provide musl Python distributions on armv7. - "###); + "); // Explicitly request a gnuabi build for armv7l - uv_snapshot!(context.filters(), context.python_install().arg("cpython-3.12.12-linux-armv7-gnueabi"), @r###" + uv_snapshot!(context.filters(), context.python_install().arg("cpython-3.12.12-linux-armv7-gnueabi"), @" success: true exit_code: 0 ----- stdout ----- @@ -3998,7 +3997,7 @@ fn python_install_armv7() { ----- stderr ----- Installed Python 3.12.12 in [TIME] + cpython-3.12.12-[PLATFORM] (python3.12) - "###); + "); } #[test] @@ -4025,7 +4024,7 @@ fn python_install_compile_bytecode() -> anyhow::Result<()> { .with_python_download_cache(); // Install 3.14 and compile its bytecode - uv_snapshot!(context.filters(), context.python_install().arg("--compile-bytecode").arg("3.14"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("--compile-bytecode").arg("3.14"), @" success: true exit_code: 0 ----- stdout ----- @@ -4062,7 +4061,7 @@ fn python_install_compile_bytecode() -> anyhow::Result<()> { // Attempting to install with --compile-bytecode should (currently) // unconditionally re-run the bytecode compiler - uv_snapshot!(context.filters(), context.python_install().arg("--compile-bytecode").arg("3.14"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("--compile-bytecode").arg("3.14"), @" success: true exit_code: 0 ----- stdout ----- @@ -4073,7 +4072,7 @@ fn python_install_compile_bytecode() -> anyhow::Result<()> { "); // Reinstalling with --compile-bytecode should compile bytecode. - uv_snapshot!(context.filters(), context.python_install().arg("--reinstall").arg("--compile-bytecode").arg("3.14"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("--reinstall").arg("--compile-bytecode").arg("3.14"), @" success: true exit_code: 0 ----- stdout ----- @@ -4098,7 +4097,7 @@ fn python_install_compile_bytecode_existing() { .with_python_download_cache(); // A fresh install should be able to be compiled later - uv_snapshot!(context.filters(), context.python_install().arg("3.14"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("3.14"), @" success: true exit_code: 0 ----- stdout ----- @@ -4108,7 +4107,7 @@ fn python_install_compile_bytecode_existing() { + cpython-3.14.2-[PLATFORM] (python3.14) "); - uv_snapshot!(context.filters(), context.python_install().arg("--compile-bytecode").arg("3.14"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("--compile-bytecode").arg("3.14"), @" success: true exit_code: 0 ----- stdout ----- @@ -4130,7 +4129,7 @@ fn python_install_compile_bytecode_upgrade() { .with_python_download_cache(); // An upgrade should also compile bytecode - uv_snapshot!(context.filters(), context.python_install().arg("3.14.0"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("3.14.0"), @" success: true exit_code: 0 ----- stdout ----- @@ -4140,7 +4139,7 @@ fn python_install_compile_bytecode_upgrade() { + cpython-3.14.0-[PLATFORM] (python3.14) "); - uv_snapshot!(context.filters(), context.python_install().arg("--upgrade").arg("--compile-bytecode").arg("3.14"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("--upgrade").arg("--compile-bytecode").arg("3.14"), @" success: true exit_code: 0 ----- stdout ----- @@ -4163,7 +4162,7 @@ fn python_install_compile_bytecode_multiple() { .with_python_download_cache(); // Should handle installing and compiling multiple versions correctly - uv_snapshot!(context.filters(), context.python_install().arg("--compile-bytecode").arg("3.14").arg("3.12"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("--compile-bytecode").arg("3.14").arg("3.12"), @" success: true exit_code: 0 ----- stdout ----- @@ -4188,7 +4187,7 @@ fn python_install_compile_bytecode_pyodide() { .with_python_download_cache(); // Should warn on explicit pyodide installation - uv_snapshot!(context.filters(), context.python_install().arg("--compile-bytecode").arg("cpython-3.13.2-emscripten-wasm32-musl"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("--compile-bytecode").arg("cpython-3.13.2-emscripten-wasm32-musl"), @" success: true exit_code: 0 ----- stdout ----- @@ -4216,7 +4215,7 @@ fn python_install_compile_bytecode_graalpy() { .with_python_download_cache(); // Should work for graalpy - uv_snapshot!(context.filters(), context.python_install().arg("--compile-bytecode").arg("graalpy-3.12"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("--compile-bytecode").arg("graalpy-3.12"), @" success: true exit_code: 0 ----- stdout ----- @@ -4239,7 +4238,7 @@ fn python_install_compile_bytecode_pypy() { .with_python_download_cache(); // Should work for pypy - uv_snapshot!(context.filters(), context.python_install().arg("--compile-bytecode").arg("pypy-3.11"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("--compile-bytecode").arg("pypy-3.11"), @" success: true exit_code: 0 ----- stdout ----- diff --git a/crates/uv/tests/it/python_list.rs b/crates/uv/tests/it/python_list.rs index ec11424b2..5cd2caa81 100644 --- a/crates/uv/tests/it/python_list.rs +++ b/crates/uv/tests/it/python_list.rs @@ -15,7 +15,7 @@ fn python_list() { .with_filtered_python_keys() .with_collapsed_whitespace(); - uv_snapshot!(context.filters(), context.python_list().env(EnvVars::UV_TEST_PYTHON_PATH, ""), @r" + uv_snapshot!(context.filters(), context.python_list().env(EnvVars::UV_TEST_PYTHON_PATH, ""), @" success: true exit_code: 0 ----- stdout ----- @@ -24,7 +24,7 @@ fn python_list() { "); // We show all interpreters - uv_snapshot!(context.filters(), context.python_list(), @r" + uv_snapshot!(context.filters(), context.python_list(), @" success: true exit_code: 0 ----- stdout ----- @@ -35,7 +35,7 @@ fn python_list() { "); // Request Python 3.12 - uv_snapshot!(context.filters(), context.python_list().arg("3.12"), @r" + uv_snapshot!(context.filters(), context.python_list().arg("3.12"), @" success: true exit_code: 0 ----- stdout ----- @@ -45,7 +45,7 @@ fn python_list() { "); // Request Python 3.11 - uv_snapshot!(context.filters(), context.python_list().arg("3.11"), @r" + uv_snapshot!(context.filters(), context.python_list().arg("3.11"), @" success: true exit_code: 0 ----- stdout ----- @@ -55,7 +55,7 @@ fn python_list() { "); // Request CPython - uv_snapshot!(context.filters(), context.python_list().arg("cpython"), @r" + uv_snapshot!(context.filters(), context.python_list().arg("cpython"), @" success: true exit_code: 0 ----- stdout ----- @@ -66,7 +66,7 @@ fn python_list() { "); // Request CPython 3.12 - uv_snapshot!(context.filters(), context.python_list().arg("cpython@3.12"), @r" + uv_snapshot!(context.filters(), context.python_list().arg("cpython@3.12"), @" success: true exit_code: 0 ----- stdout ----- @@ -76,7 +76,7 @@ fn python_list() { "); // Request CPython 3.12 via partial key syntax - uv_snapshot!(context.filters(), context.python_list().arg("cpython-3.12"), @r" + uv_snapshot!(context.filters(), context.python_list().arg("cpython-3.12"), @" success: true exit_code: 0 ----- stdout ----- @@ -89,7 +89,7 @@ fn python_list() { let os = Os::from_env(); let arch = Arch::from_env(); - uv_snapshot!(context.filters(), context.python_list().arg(format!("cpython-3.12-{os}-{arch}")), @r" + uv_snapshot!(context.filters(), context.python_list().arg(format!("cpython-3.12-{os}-{arch}")), @" success: true exit_code: 0 ----- stdout ----- @@ -99,7 +99,7 @@ fn python_list() { "); // Request PyPy (which should be missing) - uv_snapshot!(context.filters(), context.python_list().arg("pypy"), @r" + uv_snapshot!(context.filters(), context.python_list().arg("pypy"), @" success: true exit_code: 0 ----- stdout ----- @@ -110,7 +110,7 @@ fn python_list() { // Swap the order of the Python versions context.python_versions.reverse(); - uv_snapshot!(context.filters(), context.python_list(), @r" + uv_snapshot!(context.filters(), context.python_list(), @" success: true exit_code: 0 ----- stdout ----- @@ -121,7 +121,7 @@ fn python_list() { "); // Request Python 3.11 - uv_snapshot!(context.filters(), context.python_list().arg("3.11"), @r" + uv_snapshot!(context.filters(), context.python_list().arg("3.11"), @" success: true exit_code: 0 ----- stdout ----- @@ -139,17 +139,17 @@ fn python_list_pin() { .with_collapsed_whitespace(); // Pin to a version - uv_snapshot!(context.filters(), context.python_pin().arg("3.12"), @r###" + uv_snapshot!(context.filters(), context.python_pin().arg("3.12"), @" success: true exit_code: 0 ----- stdout ----- Pinned `.python-version` to `3.12` ----- stderr ----- - "###); + "); // The pin should not affect the listing - uv_snapshot!(context.filters(), context.python_list(), @r" + uv_snapshot!(context.filters(), context.python_list(), @" success: true exit_code: 0 ----- stdout ----- @@ -160,7 +160,7 @@ fn python_list_pin() { "); // So `--no-config` has no effect - uv_snapshot!(context.filters(), context.python_list().arg("--no-config"), @r" + uv_snapshot!(context.filters(), context.python_list().arg("--no-config"), @" success: true exit_code: 0 ----- stdout ----- @@ -182,16 +182,16 @@ fn python_list_venv() { .with_collapsed_whitespace(); // Create a virtual environment - uv_snapshot!(context.filters(), context.venv().arg("--python").arg("3.12").arg("-q"), @r###" + uv_snapshot!(context.filters(), context.venv().arg("--python").arg("3.12").arg("-q"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- - "###); + "); // We should not display the virtual environment - uv_snapshot!(context.filters(), context.python_list(), @r" + uv_snapshot!(context.filters(), context.python_list(), @" success: true exit_code: 0 ----- stdout ----- @@ -202,7 +202,7 @@ fn python_list_venv() { "); // Same if the `VIRTUAL_ENV` is not set (the test context includes it by default) - uv_snapshot!(context.filters(), context.python_list().env_remove(EnvVars::VIRTUAL_ENV), @r" + uv_snapshot!(context.filters(), context.python_list().env_remove(EnvVars::VIRTUAL_ENV), @" success: true exit_code: 0 ----- stdout ----- @@ -221,7 +221,7 @@ fn python_list_unsupported_version() { .with_filtered_python_keys(); // Request a low version - uv_snapshot!(context.filters(), context.python_list().arg("3.6"), @r" + uv_snapshot!(context.filters(), context.python_list().arg("3.6"), @" success: false exit_code: 2 ----- stdout ----- @@ -231,7 +231,7 @@ fn python_list_unsupported_version() { "); // Request a low version with a patch - uv_snapshot!(context.filters(), context.python_list().arg("3.6.9"), @r" + uv_snapshot!(context.filters(), context.python_list().arg("3.6.9"), @" success: false exit_code: 2 ----- stdout ----- @@ -241,7 +241,7 @@ fn python_list_unsupported_version() { "); // Request a really low version - uv_snapshot!(context.filters(), context.python_list().arg("2.6"), @r" + uv_snapshot!(context.filters(), context.python_list().arg("2.6"), @" success: false exit_code: 2 ----- stdout ----- @@ -251,7 +251,7 @@ fn python_list_unsupported_version() { "); // Request a really low version with a patch - uv_snapshot!(context.filters(), context.python_list().arg("2.6.8"), @r" + uv_snapshot!(context.filters(), context.python_list().arg("2.6.8"), @" success: false exit_code: 2 ----- stdout ----- @@ -261,7 +261,7 @@ fn python_list_unsupported_version() { "); // Request a future version - uv_snapshot!(context.filters(), context.python_list().arg("4.2"), @r" + uv_snapshot!(context.filters(), context.python_list().arg("4.2"), @" success: true exit_code: 0 ----- stdout ----- @@ -270,7 +270,7 @@ fn python_list_unsupported_version() { "); // Request a low version with a range - uv_snapshot!(context.filters(), context.python_list().arg("<3.0"), @r" + uv_snapshot!(context.filters(), context.python_list().arg("<3.0"), @" success: true exit_code: 0 ----- stdout ----- @@ -279,7 +279,7 @@ fn python_list_unsupported_version() { "); // Request free-threaded Python on unsupported version - uv_snapshot!(context.filters(), context.python_list().arg("3.12t"), @r" + uv_snapshot!(context.filters(), context.python_list().arg("3.12t"), @" success: false exit_code: 2 ----- stdout ----- @@ -303,7 +303,7 @@ fn python_list_duplicate_path_entries() { ) .unwrap(); - uv_snapshot!(context.filters(), context.python_list().env(EnvVars::UV_TEST_PYTHON_PATH, &path), @r" + uv_snapshot!(context.filters(), context.python_list().env(EnvVars::UV_TEST_PYTHON_PATH, &path), @" success: true exit_code: 0 ----- stdout ----- @@ -325,15 +325,15 @@ fn python_list_duplicate_path_entries() { )) .unwrap(); - uv_snapshot!(context.filters(), context.python_list().env(EnvVars::UV_TEST_PYTHON_PATH, &path), @r" - success: true - exit_code: 0 - ----- stdout ----- - cpython-3.12.[X]-[PLATFORM] [PYTHON-3.12] - cpython-3.11.[X]-[PLATFORM] [PYTHON-3.11] + uv_snapshot!(context.filters(), context.python_list().env(EnvVars::UV_TEST_PYTHON_PATH, &path), @" + success: true + exit_code: 0 + ----- stdout ----- + cpython-3.12.[X]-[PLATFORM] [PYTHON-3.12] + cpython-3.11.[X]-[PLATFORM] [PYTHON-3.11] - ----- stderr ----- - "); + ----- stderr ----- + "); // Reverse the order so the symlinks are first let path = std::env::join_paths( @@ -346,7 +346,7 @@ fn python_list_duplicate_path_entries() { ) .unwrap(); - uv_snapshot!(context.filters(), context.python_list().env(EnvVars::UV_TEST_PYTHON_PATH, &path), @r" + uv_snapshot!(context.filters(), context.python_list().env(EnvVars::UV_TEST_PYTHON_PATH, &path), @" success: true exit_code: 0 ----- stdout ----- @@ -366,7 +366,7 @@ fn python_list_downloads() { // Instead, we choose a Python version where our available distributions are stable // Test the default display, which requires reverting the test context disabling Python downloads - uv_snapshot!(context.filters(), context.python_list().arg("3.10").env_remove(EnvVars::UV_PYTHON_DOWNLOADS), @r" + uv_snapshot!(context.filters(), context.python_list().arg("3.10").env_remove(EnvVars::UV_PYTHON_DOWNLOADS), @" success: true exit_code: 0 ----- stdout ----- @@ -378,7 +378,7 @@ fn python_list_downloads() { "); // Show patch versions - uv_snapshot!(context.filters(), context.python_list().arg("3.10").arg("--all-versions").env_remove(EnvVars::UV_PYTHON_DOWNLOADS), @r" + uv_snapshot!(context.filters(), context.python_list().arg("3.10").arg("--all-versions").env_remove(EnvVars::UV_PYTHON_DOWNLOADS), @" success: true exit_code: 0 ----- stdout ----- @@ -425,7 +425,7 @@ fn python_list_downloads_installed() { // Instead, we choose a Python version where our available distributions are stable // First, the download is shown as available - uv_snapshot!(context.filters(), context.python_list().arg("3.10").env_remove(EnvVars::UV_PYTHON_DOWNLOADS), @r" + uv_snapshot!(context.filters(), context.python_list().arg("3.10").env_remove(EnvVars::UV_PYTHON_DOWNLOADS), @" success: true exit_code: 0 ----- stdout ----- @@ -440,7 +440,7 @@ fn python_list_downloads_installed() { // the URL // But not if `--only-installed` is used - uv_snapshot!(context.filters(), context.python_list().arg("3.10").arg("--only-installed").env_remove(EnvVars::UV_PYTHON_DOWNLOADS), @r" + uv_snapshot!(context.filters(), context.python_list().arg("3.10").arg("--only-installed").env_remove(EnvVars::UV_PYTHON_DOWNLOADS), @" success: true exit_code: 0 ----- stdout ----- @@ -452,7 +452,7 @@ fn python_list_downloads_installed() { context.python_install().arg("3.10").assert().success(); // Then, it should be listed as installed instead of available - uv_snapshot!(context.filters(), context.python_list().arg("3.10").env_remove(EnvVars::UV_PYTHON_DOWNLOADS), @r" + uv_snapshot!(context.filters(), context.python_list().arg("3.10").env_remove(EnvVars::UV_PYTHON_DOWNLOADS), @" success: true exit_code: 0 ----- stdout ----- @@ -464,7 +464,7 @@ fn python_list_downloads_installed() { "); // But, the display should be reverted if `--only-downloads` is used - uv_snapshot!(context.filters(), context.python_list().arg("3.10").arg("--only-downloads").env_remove(EnvVars::UV_PYTHON_DOWNLOADS), @r" + uv_snapshot!(context.filters(), context.python_list().arg("3.10").arg("--only-downloads").env_remove(EnvVars::UV_PYTHON_DOWNLOADS), @" success: true exit_code: 0 ----- stdout ----- @@ -476,7 +476,7 @@ fn python_list_downloads_installed() { "); // And should not be shown if `--no-managed-python` is used - uv_snapshot!(context.filters(), context.python_list().arg("3.10").arg("--no-managed-python").env_remove(EnvVars::UV_PYTHON_DOWNLOADS), @r" + uv_snapshot!(context.filters(), context.python_list().arg("3.10").arg("--no-managed-python").env_remove(EnvVars::UV_PYTHON_DOWNLOADS), @" success: true exit_code: 0 ----- stdout ----- @@ -548,7 +548,7 @@ async fn python_list_remote_python_downloads_json_url() -> Result<()> { .arg("--all-platforms") .arg("--all-arches") .arg("--show-urls") - .arg("--python-downloads-json-url").arg(server.uri()), @r" + .arg("--python-downloads-json-url").arg(server.uri()), @" success: true exit_code: 0 ----- stdout ----- @@ -562,7 +562,7 @@ async fn python_list_remote_python_downloads_json_url() -> Result<()> { uv_snapshot!(context.filters(), context .python_list() .env_remove(EnvVars::UV_PYTHON_DOWNLOADS) - .arg("--python-downloads-json-url").arg(format!("{}/404", server.uri())), @r" + .arg("--python-downloads-json-url").arg(format!("{}/404", server.uri())), @" success: false exit_code: 2 ----- stdout ----- @@ -571,14 +571,13 @@ async fn python_list_remote_python_downloads_json_url() -> Result<()> { error: Error while fetching remote python downloads json from 'http://[LOCALHOST]/404' Caused by: Failed to download http://[LOCALHOST]/404 Caused by: HTTP status client error (404 Not Found) for url (http://[LOCALHOST]/404) - "); // test invalid json uv_snapshot!(context.filters(), context .python_list() .env_remove(EnvVars::UV_PYTHON_DOWNLOADS) - .arg("--python-downloads-json-url").arg(format!("{}/invalid", server.uri())), @r" + .arg("--python-downloads-json-url").arg(format!("{}/invalid", server.uri())), @" success: false exit_code: 2 ----- stdout ----- @@ -586,7 +585,6 @@ async fn python_list_remote_python_downloads_json_url() -> Result<()> { ----- stderr ----- error: Unable to parse the JSON Python download list at http://[LOCALHOST]/invalid Caused by: EOF while parsing an object at line 1 column 1 - "); Ok(()) @@ -629,7 +627,7 @@ fn python_list_with_mirrors() { .arg("cpython@3.10.19") .arg("--show-urls") .env(EnvVars::UV_PYTHON_INSTALL_MIRROR, "https://mirror.example.com") - .env_remove(EnvVars::UV_PYTHON_DOWNLOADS), @r" + .env_remove(EnvVars::UV_PYTHON_DOWNLOADS), @" success: true exit_code: 0 ----- stdout ----- @@ -643,7 +641,7 @@ fn python_list_with_mirrors() { .arg("pypy@3.10") .arg("--show-urls") .env(EnvVars::UV_PYPY_INSTALL_MIRROR, "https://pypy-mirror.example.com") - .env_remove(EnvVars::UV_PYTHON_DOWNLOADS), @r" + .env_remove(EnvVars::UV_PYTHON_DOWNLOADS), @" success: true exit_code: 0 ----- stdout ----- @@ -658,7 +656,7 @@ fn python_list_with_mirrors() { .arg("--show-urls") .env(EnvVars::UV_PYTHON_INSTALL_MIRROR, "https://python-mirror.example.com") .env(EnvVars::UV_PYPY_INSTALL_MIRROR, "https://pypy-mirror.example.com") - .env_remove(EnvVars::UV_PYTHON_DOWNLOADS), @r" + .env_remove(EnvVars::UV_PYTHON_DOWNLOADS), @" success: true exit_code: 0 ----- stdout ----- @@ -673,7 +671,7 @@ fn python_list_with_mirrors() { uv_snapshot!(context.filters(), context.python_list() .arg("3.10") .arg("--show-urls") - .env_remove(EnvVars::UV_PYTHON_DOWNLOADS), @r" + .env_remove(EnvVars::UV_PYTHON_DOWNLOADS), @" success: true exit_code: 0 ----- stdout ----- diff --git a/crates/uv/tests/it/python_module.rs b/crates/uv/tests/it/python_module.rs index 2aa63f8c9..0b1489c09 100644 --- a/crates/uv/tests/it/python_module.rs +++ b/crates/uv/tests/it/python_module.rs @@ -43,7 +43,7 @@ fn find_uv_bin_venv() { // Install in a virtual environment uv_snapshot!(context.filters(), context.pip_install() - .arg(context.workspace_root.join("test/packages/fake-uv")), @r" + .arg(context.workspace_root.join("test/packages/fake-uv")), @" success: true exit_code: 0 ----- stdout ----- @@ -59,7 +59,7 @@ fn find_uv_bin_venv() { // We should find the binary in the virtual environment uv_snapshot!(context.filters(), context.python_command() .arg("-c") - .arg(TEST_SCRIPT), @r" + .arg(TEST_SCRIPT), @" success: true exit_code: 0 ----- stdout ----- @@ -85,7 +85,7 @@ fn find_uv_bin_target() { uv_snapshot!(context.filters(), context.pip_install() .arg(context.workspace_root.join("test/packages/fake-uv")) .arg("--target") - .arg("target"), @r" + .arg("target"), @" success: true exit_code: 0 ----- stdout ----- @@ -103,7 +103,7 @@ fn find_uv_bin_target() { uv_snapshot!(context.filters(), context.python_command() .arg("-c") .arg(TEST_SCRIPT) - .env(EnvVars::PYTHONPATH, context.temp_dir.child("target").path()), @r" + .env(EnvVars::PYTHONPATH, context.temp_dir.child("target").path()), @" success: true exit_code: 0 ----- stdout ----- @@ -131,7 +131,7 @@ fn find_uv_bin_prefix() { uv_snapshot!(context.filters(), context.pip_install() .arg(context.workspace_root.join("test/packages/fake-uv")) .arg("--prefix") - .arg(prefix.path()), @r" + .arg(prefix.path()), @" success: true exit_code: 0 ----- stdout ----- @@ -152,7 +152,7 @@ fn find_uv_bin_prefix() { .env( EnvVars::PYTHONPATH, site_packages_path(&context.temp_dir.join("prefix"), "python3.12"), - ), @r" + ), @" success: true exit_code: 0 ----- stdout ----- @@ -183,7 +183,7 @@ fn find_uv_bin_base_prefix() { uv_snapshot!(context.filters(), context.pip_install() .arg("--python") .arg(base_venv.path()) - .arg(context.workspace_root.join("test/packages/fake-uv")), @r" + .arg(context.workspace_root.join("test/packages/fake-uv")), @" success: true exit_code: 0 ----- stdout ----- @@ -203,7 +203,7 @@ fn find_uv_bin_base_prefix() { uv_snapshot!(context.filters(), context.python_command() .arg("-c") .arg(format!(r#"import sys, uv; sys.base_prefix = "{}"; print(uv.find_uv_bin())"#, base_venv.path().portable_display())) - .env(EnvVars::PYTHONPATH, site_packages_path(base_venv.path(), "python3.12")), @r" + .env(EnvVars::PYTHONPATH, site_packages_path(base_venv.path(), "python3.12")), @" success: true exit_code: 0 ----- stdout ----- @@ -242,7 +242,7 @@ fn find_uv_bin_in_ephemeral_environment() -> anyhow::Result<()> { .arg(context.workspace_root.join("test/packages/fake-uv")) .arg("python") .arg("-c") - .arg(TEST_SCRIPT), @r" + .arg(TEST_SCRIPT), @" success: true exit_code: 0 ----- stdout ----- @@ -295,7 +295,7 @@ fn find_uv_bin_in_parent_of_ephemeral_environment() -> anyhow::Result<()> { .arg("python") .arg("-c") .arg(TEST_SCRIPT), - @r" + @" success: true exit_code: 0 ----- stdout ----- @@ -346,7 +346,7 @@ fn find_uv_bin_user_bin() { // Install in a virtual environment uv_snapshot!(context.filters(), context.pip_install() - .arg(context.workspace_root.join("test/packages/fake-uv")), @r" + .arg(context.workspace_root.join("test/packages/fake-uv")), @" success: true exit_code: 0 ----- stdout ----- @@ -362,7 +362,7 @@ fn find_uv_bin_user_bin() { // We should find the binary in the virtual environment first uv_snapshot!(context.filters(), context.python_command() .arg("-c") - .arg(TEST_SCRIPT), @r" + .arg(TEST_SCRIPT), @" success: true exit_code: 0 ----- stdout ----- @@ -383,7 +383,7 @@ fn find_uv_bin_user_bin() { // We should find the binary in the bin now uv_snapshot!(context.filters(), context.python_command() .arg("-c") - .arg(TEST_SCRIPT), @r" + .arg(TEST_SCRIPT), @" success: true exit_code: 0 ----- stdout ----- @@ -430,7 +430,7 @@ fn find_uv_bin_error_message() { // Install in a virtual environment uv_snapshot!(context.filters(), context.pip_install() - .arg(context.workspace_root.join("test/packages/fake-uv")), @r" + .arg(context.workspace_root.join("test/packages/fake-uv")), @" success: true exit_code: 0 ----- stdout ----- @@ -486,7 +486,7 @@ fn find_uv_bin_py38() { // Install in a virtual environment uv_snapshot!(context.filters(), context.pip_install() - .arg(context.workspace_root.join("test/packages/fake-uv")), @r" + .arg(context.workspace_root.join("test/packages/fake-uv")), @" success: true exit_code: 0 ----- stdout ----- @@ -502,7 +502,7 @@ fn find_uv_bin_py38() { // We should find the binary in the virtual environment uv_snapshot!(context.filters(), context.python_command() .arg("-c") - .arg(TEST_SCRIPT), @r" + .arg(TEST_SCRIPT), @" success: true exit_code: 0 ----- stdout ----- @@ -526,7 +526,7 @@ fn find_uv_bin_py39() { // Install in a virtual environment uv_snapshot!(context.filters(), context.pip_install() - .arg(context.workspace_root.join("test/packages/fake-uv")), @r" + .arg(context.workspace_root.join("test/packages/fake-uv")), @" success: true exit_code: 0 ----- stdout ----- @@ -542,7 +542,7 @@ fn find_uv_bin_py39() { // We should find the binary in the virtual environment uv_snapshot!(context.filters(), context.python_command() .arg("-c") - .arg(TEST_SCRIPT), @r" + .arg(TEST_SCRIPT), @" success: true exit_code: 0 ----- stdout ----- @@ -566,7 +566,7 @@ fn find_uv_bin_py310() { // Install in a virtual environment uv_snapshot!(context.filters(), context.pip_install() - .arg(context.workspace_root.join("test/packages/fake-uv")), @r" + .arg(context.workspace_root.join("test/packages/fake-uv")), @" success: true exit_code: 0 ----- stdout ----- @@ -582,7 +582,7 @@ fn find_uv_bin_py310() { // We should find the binary in the virtual environment uv_snapshot!(context.filters(), context.python_command() .arg("-c") - .arg(TEST_SCRIPT), @r" + .arg(TEST_SCRIPT), @" success: true exit_code: 0 ----- stdout ----- @@ -606,7 +606,7 @@ fn find_uv_bin_py311() { // Install in a virtual environment uv_snapshot!(context.filters(), context.pip_install() - .arg(context.workspace_root.join("test/packages/fake-uv")), @r" + .arg(context.workspace_root.join("test/packages/fake-uv")), @" success: true exit_code: 0 ----- stdout ----- @@ -622,7 +622,7 @@ fn find_uv_bin_py311() { // We should find the binary in the virtual environment uv_snapshot!(context.filters(), context.python_command() .arg("-c") - .arg(TEST_SCRIPT), @r" + .arg(TEST_SCRIPT), @" success: true exit_code: 0 ----- stdout ----- @@ -646,7 +646,7 @@ fn find_uv_bin_py312() { // Install in a virtual environment uv_snapshot!(context.filters(), context.pip_install() - .arg(context.workspace_root.join("test/packages/fake-uv")), @r" + .arg(context.workspace_root.join("test/packages/fake-uv")), @" success: true exit_code: 0 ----- stdout ----- @@ -662,7 +662,7 @@ fn find_uv_bin_py312() { // We should find the binary in the virtual environment uv_snapshot!(context.filters(), context.python_command() .arg("-c") - .arg(TEST_SCRIPT), @r" + .arg(TEST_SCRIPT), @" success: true exit_code: 0 ----- stdout ----- @@ -686,7 +686,7 @@ fn find_uv_bin_py313() { // Install in a virtual environment uv_snapshot!(context.filters(), context.pip_install() - .arg(context.workspace_root.join("test/packages/fake-uv")), @r" + .arg(context.workspace_root.join("test/packages/fake-uv")), @" success: true exit_code: 0 ----- stdout ----- @@ -702,7 +702,7 @@ fn find_uv_bin_py313() { // We should find the binary in the virtual environment uv_snapshot!(context.filters(), context.python_command() .arg("-c") - .arg(TEST_SCRIPT), @r" + .arg(TEST_SCRIPT), @" success: true exit_code: 0 ----- stdout ----- @@ -726,7 +726,7 @@ fn find_uv_bin_py314() { // Install in a virtual environment uv_snapshot!(context.filters(), context.pip_install() - .arg(context.workspace_root.join("test/packages/fake-uv")), @r" + .arg(context.workspace_root.join("test/packages/fake-uv")), @" success: true exit_code: 0 ----- stdout ----- @@ -742,7 +742,7 @@ fn find_uv_bin_py314() { // We should find the binary in the virtual environment uv_snapshot!(context.filters(), context.python_command() .arg("-c") - .arg(TEST_SCRIPT), @r" + .arg(TEST_SCRIPT), @" success: true exit_code: 0 ----- stdout ----- diff --git a/crates/uv/tests/it/python_pin.rs b/crates/uv/tests/it/python_pin.rs index 03606b20c..2f0c0d21e 100644 --- a/crates/uv/tests/it/python_pin.rs +++ b/crates/uv/tests/it/python_pin.rs @@ -14,7 +14,7 @@ fn python_pin() { let context: TestContext = TestContext::new_with_versions(&["3.11", "3.12"]); // Without arguments, we attempt to read the current pin (which does not exist yet) - uv_snapshot!(context.filters(), context.python_pin(), @r" + uv_snapshot!(context.filters(), context.python_pin(), @" success: false exit_code: 2 ----- stdout ----- @@ -24,146 +24,132 @@ fn python_pin() { "); // Given an argument, we pin to that version - uv_snapshot!(context.filters(), context.python_pin().arg("any"), @r###" + uv_snapshot!(context.filters(), context.python_pin().arg("any"), @" success: true exit_code: 0 ----- stdout ----- Pinned `.python-version` to `any` ----- stderr ----- - "###); + "); let python_version = context.read(PYTHON_VERSION_FILENAME); - assert_snapshot!(python_version, @r#"any"#); + assert_snapshot!(python_version, @"any"); // Without arguments, we read the current pin - uv_snapshot!(context.filters(), context.python_pin(), @r###" + uv_snapshot!(context.filters(), context.python_pin(), @" success: true exit_code: 0 ----- stdout ----- any ----- stderr ----- - "###); + "); // We should not mutate the file let python_version = context.read(PYTHON_VERSION_FILENAME); - assert_snapshot!(python_version, @r#"any"#); + assert_snapshot!(python_version, @"any"); // Request Python 3.12 - uv_snapshot!(context.filters(), context.python_pin().arg("3.12"), @r###" + uv_snapshot!(context.filters(), context.python_pin().arg("3.12"), @" success: true exit_code: 0 ----- stdout ----- Updated `.python-version` from `any` -> `3.12` ----- stderr ----- - "###); + "); let python_version = context.read(PYTHON_VERSION_FILENAME); - assert_snapshot!(python_version, @r###" - 3.12 - "###); + assert_snapshot!(python_version, @"3.12"); // Request Python 3.11 - uv_snapshot!(context.filters(), context.python_pin().arg("3.11"), @r###" + uv_snapshot!(context.filters(), context.python_pin().arg("3.11"), @" success: true exit_code: 0 ----- stdout ----- Updated `.python-version` from `3.12` -> `3.11` ----- stderr ----- - "###); + "); let python_version = context.read(PYTHON_VERSION_FILENAME); - assert_snapshot!(python_version, @r###" - 3.11 - "###); + assert_snapshot!(python_version, @"3.11"); // Request CPython - uv_snapshot!(context.filters(), context.python_pin().arg("cpython"), @r###" + uv_snapshot!(context.filters(), context.python_pin().arg("cpython"), @" success: true exit_code: 0 ----- stdout ----- Updated `.python-version` from `3.11` -> `cpython` ----- stderr ----- - "###); + "); let python_version = context.read(PYTHON_VERSION_FILENAME); - assert_snapshot!(python_version, @r###" - cpython - "###); + assert_snapshot!(python_version, @"cpython"); // Request CPython 3.12 - uv_snapshot!(context.filters(), context.python_pin().arg("cpython@3.12"), @r###" + uv_snapshot!(context.filters(), context.python_pin().arg("cpython@3.12"), @" success: true exit_code: 0 ----- stdout ----- Updated `.python-version` from `cpython` -> `cpython@3.12` ----- stderr ----- - "###); + "); let python_version = context.read(PYTHON_VERSION_FILENAME); - assert_snapshot!(python_version, @r###" - cpython@3.12 - "###); + assert_snapshot!(python_version, @"cpython@3.12"); // Request CPython 3.12 via non-canonical syntax - uv_snapshot!(context.filters(), context.python_pin().arg("cp3.12"), @r###" + uv_snapshot!(context.filters(), context.python_pin().arg("cp3.12"), @" success: true exit_code: 0 ----- stdout ----- Pinned `.python-version` to `cpython@3.12` ----- stderr ----- - "###); + "); let python_version = context.read(PYTHON_VERSION_FILENAME); - assert_snapshot!(python_version, @r###" - cpython@3.12 - "###); + assert_snapshot!(python_version, @"cpython@3.12"); // Request CPython 3.12 via partial key syntax - uv_snapshot!(context.filters(), context.python_pin().arg("cpython-3.12"), @r###" + uv_snapshot!(context.filters(), context.python_pin().arg("cpython-3.12"), @" success: true exit_code: 0 ----- stdout ----- Updated `.python-version` from `cpython@3.12` -> `cpython-3.12-any-any-any` ----- stderr ----- - "###); + "); let python_version = context.read(PYTHON_VERSION_FILENAME); - assert_snapshot!(python_version, @r###" - cpython-3.12-any-any-any - "###); + assert_snapshot!(python_version, @"cpython-3.12-any-any-any"); // Request a specific path - uv_snapshot!(context.filters(), context.python_pin().arg(&context.python_versions.first().unwrap().1), @r###" + uv_snapshot!(context.filters(), context.python_pin().arg(&context.python_versions.first().unwrap().1), @" success: true exit_code: 0 ----- stdout ----- Updated `.python-version` from `cpython-3.12-any-any-any` -> `[PYTHON-3.11]` ----- stderr ----- - "###); + "); let python_version = context.read(PYTHON_VERSION_FILENAME); insta::with_settings!({ filters => context.filters(), }, { - assert_snapshot!(python_version, @r###" - [PYTHON-3.11] - "###); + assert_snapshot!(python_version, @"[PYTHON-3.11]"); }); // Request an implementation that is not installed // (skip on Windows because the snapshot is different and the behavior is not platform dependent) #[cfg(unix)] { - uv_snapshot!(context.filters(), context.python_pin().arg("pypy"), @r" + uv_snapshot!(context.filters(), context.python_pin().arg("pypy"), @" success: true exit_code: 0 ----- stdout ----- @@ -174,16 +160,14 @@ fn python_pin() { "); let python_version = context.read(PYTHON_VERSION_FILENAME); - assert_snapshot!(python_version, @r###" - pypy - "###); + assert_snapshot!(python_version, @"pypy"); } // Request a version that is not installed // (skip on Windows because the snapshot is different and the behavior is not platform dependent) #[cfg(unix)] { - uv_snapshot!(context.filters(), context.python_pin().arg("3.7"), @r###" + uv_snapshot!(context.filters(), context.python_pin().arg("3.7"), @" success: true exit_code: 0 ----- stdout ----- @@ -191,12 +175,10 @@ fn python_pin() { ----- stderr ----- warning: No interpreter found for Python 3.7 in managed installations or search path - "###); + "); let python_version = context.read(PYTHON_VERSION_FILENAME); - assert_snapshot!(python_version, @r###" - 3.7 - "###); + assert_snapshot!(python_version, @"3.7"); } } @@ -208,7 +190,7 @@ fn python_pin_global_if_no_local() -> Result<()> { uv.create_dir_all()?; // Without arguments, we attempt to read the current pin (which does not exist yet) - uv_snapshot!(context.filters(), context.python_pin(), @r" + uv_snapshot!(context.filters(), context.python_pin(), @" success: false exit_code: 2 ----- stdout ----- @@ -218,7 +200,7 @@ fn python_pin_global_if_no_local() -> Result<()> { "); // Given an argument, we globally pin to that version - uv_snapshot!(context.filters(), context.python_pin().arg("3.11").arg("--global"), @r" + uv_snapshot!(context.filters(), context.python_pin().arg("3.11").arg("--global"), @" success: true exit_code: 0 ----- stdout ----- @@ -228,14 +210,14 @@ fn python_pin_global_if_no_local() -> Result<()> { "); // If no local pin, use global. - uv_snapshot!(context.filters(), context.python_pin(), @r###" + uv_snapshot!(context.filters(), context.python_pin(), @" success: true exit_code: 0 ----- stdout ----- 3.11 ----- stderr ----- - "###); + "); Ok(()) } @@ -249,7 +231,7 @@ fn python_pin_global_use_local_if_available() -> Result<()> { uv.create_dir_all()?; // Given an argument, we globally pin to that version - uv_snapshot!(context.filters(), context.python_pin().arg("3.12").arg("--global"), @r" + uv_snapshot!(context.filters(), context.python_pin().arg("3.12").arg("--global"), @" success: true exit_code: 0 ----- stdout ----- @@ -259,14 +241,14 @@ fn python_pin_global_use_local_if_available() -> Result<()> { "); // With no local, we get the global pin - uv_snapshot!(context.filters(), context.python_pin(), @r###" + uv_snapshot!(context.filters(), context.python_pin(), @" success: true exit_code: 0 ----- stdout ----- 3.12 ----- stderr ----- - "###); + "); let mut global_version_path = PathBuf::from(uv.path()); global_version_path.push(PYTHON_VERSION_FILENAME); @@ -274,55 +256,49 @@ fn python_pin_global_use_local_if_available() -> Result<()> { insta::with_settings!({ filters => context.filters(), }, { - assert_snapshot!(global_python_version, @r###" - 3.12 - "###); + assert_snapshot!(global_python_version, @"3.12"); }); // Request Python 3.11 for local .python-version - uv_snapshot!(context.filters(), context.python_pin().arg("3.11"), @r###" + uv_snapshot!(context.filters(), context.python_pin().arg("3.11"), @" success: true exit_code: 0 ----- stdout ----- Pinned `.python-version` to `3.11` ----- stderr ----- - "###); + "); // Local should override global - uv_snapshot!(context.filters(), context.python_pin(), @r###" + uv_snapshot!(context.filters(), context.python_pin(), @" success: true exit_code: 0 ----- stdout ----- 3.11 ----- stderr ----- - "###); + "); // We should still be able to check global pin - uv_snapshot!(context.filters(), context.python_pin().arg("--global"), @r###" + uv_snapshot!(context.filters(), context.python_pin().arg("--global"), @" success: true exit_code: 0 ----- stdout ----- 3.12 ----- stderr ----- - "###); + "); // Local .python-version exists and has the right version. let local_python_version = context.read(PYTHON_VERSION_FILENAME); - assert_snapshot!(local_python_version, @r###" - 3.11 - "###); + assert_snapshot!(local_python_version, @"3.11"); // Global .python-version still exists and has the right version. let global_python_version = context.read(&global_version_path); insta::with_settings!({ filters => context.filters(), }, { - assert_snapshot!(global_python_version, @r###" - 3.12 - "###); + assert_snapshot!(global_python_version, @"3.12"); }); Ok(()) @@ -338,7 +314,7 @@ fn python_pin_global_creates_parent_dirs() { "Global config directory should not exist yet." ); - uv_snapshot!(context.filters(), context.python_pin().arg("3.12").arg("--global"), @r" + uv_snapshot!(context.filters(), context.python_pin().arg("3.12").arg("--global"), @" success: true exit_code: 0 ----- stdout ----- @@ -360,7 +336,7 @@ fn python_pin_global_creates_parent_dirs() { fn python_pin_no_python() { let context: TestContext = TestContext::new_with_versions(&[]); - uv_snapshot!(context.filters(), context.python_pin().arg("3.12"), @r" + uv_snapshot!(context.filters(), context.python_pin().arg("3.12"), @" success: true exit_code: 0 ----- stdout ----- @@ -386,47 +362,47 @@ fn python_pin_compatible_with_requires_python() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.python_pin().arg("3.10"), @r###" + uv_snapshot!(context.filters(), context.python_pin().arg("3.10"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: The requested Python version `3.10` is incompatible with the project `requires-python` value of `>=3.11`. - "###); + "); // Request a implementation version that is incompatible - uv_snapshot!(context.filters(), context.python_pin().arg("cpython@3.10"), @r###" + uv_snapshot!(context.filters(), context.python_pin().arg("cpython@3.10"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: The requested Python version `cpython@3.10` is incompatible with the project `requires-python` value of `>=3.11`. - "###); + "); // Request an incompatible version with project discovery turned off - uv_snapshot!(context.filters(), context.python_pin().arg("cpython@3.10").arg("--no-project"), @r###" + uv_snapshot!(context.filters(), context.python_pin().arg("cpython@3.10").arg("--no-project"), @" success: true exit_code: 0 ----- stdout ----- Pinned `.python-version` to `cpython@3.10` ----- stderr ----- - "###); + "); // And, as an alias, workspace discovery - uv_snapshot!(context.filters(), context.python_pin().arg("cpython@3.10").arg("--no-workspace"), @r###" + uv_snapshot!(context.filters(), context.python_pin().arg("cpython@3.10").arg("--no-workspace"), @" success: true exit_code: 0 ----- stdout ----- Pinned `.python-version` to `cpython@3.10` ----- stderr ----- - "###); + "); // Request a complex version range that resolves to an incompatible version - uv_snapshot!(context.filters(), context.python_pin().arg(">3.8,<3.11"), @r###" + uv_snapshot!(context.filters(), context.python_pin().arg(">3.8,<3.11"), @" success: true exit_code: 0 ----- stdout ----- @@ -434,20 +410,20 @@ fn python_pin_compatible_with_requires_python() -> Result<()> { ----- stderr ----- warning: The requested Python version `>3.8, <3.11` resolves to `3.10.[X]` which is incompatible with the project `requires-python` value of `>=3.11`. - "###); + "); // Request a version that is compatible - uv_snapshot!(context.filters(), context.python_pin().arg("3.11"), @r###" + uv_snapshot!(context.filters(), context.python_pin().arg("3.11"), @" success: true exit_code: 0 ----- stdout ----- Updated `.python-version` from `>3.8, <3.11` -> `3.11` ----- stderr ----- - "###); + "); // Request a version that is compatible and uses a Python variant - uv_snapshot!(context.filters(), context.python_pin().arg("3.13t"), @r" + uv_snapshot!(context.filters(), context.python_pin().arg("3.13t"), @" success: true exit_code: 0 ----- stdout ----- @@ -458,7 +434,7 @@ fn python_pin_compatible_with_requires_python() -> Result<()> { "); // Request a implementation version that is compatible - uv_snapshot!(context.filters(), context.python_pin().arg("cpython@3.11"), @r" + uv_snapshot!(context.filters(), context.python_pin().arg("cpython@3.11"), @" success: true exit_code: 0 ----- stdout ----- @@ -471,9 +447,7 @@ fn python_pin_compatible_with_requires_python() -> Result<()> { insta::with_settings!({ filters => context.filters(), }, { - assert_snapshot!(python_version, @r###" - cpython@3.11 - "###); + assert_snapshot!(python_version, @"cpython@3.11"); }); // Updating `requires-python` should affect `uv python pin` compatibilities. @@ -487,7 +461,7 @@ fn python_pin_compatible_with_requires_python() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.python_pin(), @r###" + uv_snapshot!(context.filters(), context.python_pin(), @" success: true exit_code: 0 ----- stdout ----- @@ -495,10 +469,10 @@ fn python_pin_compatible_with_requires_python() -> Result<()> { ----- stderr ----- warning: The pinned Python version `cpython@3.11` is incompatible with the project `requires-python` value of `>=3.12`. - "###); + "); // Request a implementation that resolves to a compatible version - uv_snapshot!(context.filters(), context.python_pin().arg("cpython"), @r###" + uv_snapshot!(context.filters(), context.python_pin().arg("cpython"), @" success: true exit_code: 0 ----- stdout ----- @@ -506,9 +480,9 @@ fn python_pin_compatible_with_requires_python() -> Result<()> { ----- stderr ----- warning: The requested Python version `cpython` resolves to `3.10.[X]` which is incompatible with the project `requires-python` value of `>=3.12`. - "###); + "); - uv_snapshot!(context.filters(), context.python_pin(), @r###" + uv_snapshot!(context.filters(), context.python_pin(), @" success: true exit_code: 0 ----- stdout ----- @@ -516,10 +490,10 @@ fn python_pin_compatible_with_requires_python() -> Result<()> { ----- stderr ----- warning: The pinned Python version `cpython` resolves to `3.10.[X]` which is incompatible with the project `requires-python` value of `>=3.12`. - "###); + "); // Request a complex version range that resolves to a compatible version - uv_snapshot!(context.filters(), context.python_pin().arg(">3.8,<3.12"), @r###" + uv_snapshot!(context.filters(), context.python_pin().arg(">3.8,<3.12"), @" success: true exit_code: 0 ----- stdout ----- @@ -527,9 +501,9 @@ fn python_pin_compatible_with_requires_python() -> Result<()> { ----- stderr ----- warning: The requested Python version `>3.8, <3.12` resolves to `3.10.[X]` which is incompatible with the project `requires-python` value of `>=3.12`. - "###); + "); - uv_snapshot!(context.filters(), context.python_pin(), @r###" + uv_snapshot!(context.filters(), context.python_pin(), @" success: true exit_code: 0 ----- stdout ----- @@ -537,7 +511,7 @@ fn python_pin_compatible_with_requires_python() -> Result<()> { ----- stderr ----- warning: The pinned Python version `>3.8, <3.12` resolves to `3.10.[X]` which is incompatible with the project `requires-python` value of `>=3.12`. - "###); + "); Ok(()) } @@ -569,7 +543,7 @@ fn warning_pinned_python_version_not_installed() -> Result<()> { warning: Failed to resolve pinned Python version `3.12`: No interpreter found for Python 3.12 in managed installations, search path, or registry "###); } else { - uv_snapshot!(context.filters(), context.python_pin(), @r###" + uv_snapshot!(context.filters(), context.python_pin(), @" success: true exit_code: 0 ----- stdout ----- @@ -577,7 +551,7 @@ fn warning_pinned_python_version_not_installed() -> Result<()> { ----- stderr ----- warning: Failed to resolve pinned Python version `3.12`: No interpreter found for Python 3.12 in managed installations or search path - "###); + "); } Ok(()) @@ -587,7 +561,7 @@ fn warning_pinned_python_version_not_installed() -> Result<()> { #[test] fn python_pin_resolve_no_python() { let context: TestContext = TestContext::new_with_versions(&[]).with_filtered_python_sources(); - uv_snapshot!(context.filters(), context.python_pin().arg("--resolved").arg("3.12"), @r" + uv_snapshot!(context.filters(), context.python_pin().arg("--resolved").arg("3.12"), @" success: false exit_code: 2 ----- stdout ----- @@ -604,14 +578,14 @@ fn python_pin_resolve() { let context: TestContext = TestContext::new_with_versions(&["3.12", "3.13"]); // We pin the first interpreter on the path - uv_snapshot!(context.filters(), context.python_pin().arg("--resolved").arg("any"), @r###" + uv_snapshot!(context.filters(), context.python_pin().arg("--resolved").arg("any"), @" success: true exit_code: 0 ----- stdout ----- Pinned `.python-version` to `[PYTHON-3.12]` ----- stderr ----- - "###); + "); let python_version = context.read(PYTHON_VERSION_FILENAME); insta::with_settings!({ @@ -621,14 +595,14 @@ fn python_pin_resolve() { }); // Request Python 3.13 - uv_snapshot!(context.filters(), context.python_pin().arg("--resolved").arg("3.13"), @r###" + uv_snapshot!(context.filters(), context.python_pin().arg("--resolved").arg("3.13"), @" success: true exit_code: 0 ----- stdout ----- Updated `.python-version` from `[PYTHON-3.12]` -> `[PYTHON-3.13]` ----- stderr ----- - "###); + "); let python_version = context.read(PYTHON_VERSION_FILENAME); insta::with_settings!({ @@ -638,14 +612,14 @@ fn python_pin_resolve() { }); // Request Python 3.13 - uv_snapshot!(context.filters(), context.python_pin().arg("--resolved").arg("3.13"), @r###" + uv_snapshot!(context.filters(), context.python_pin().arg("--resolved").arg("3.13"), @" success: true exit_code: 0 ----- stdout ----- Pinned `.python-version` to `[PYTHON-3.13]` ----- stderr ----- - "###); + "); let python_version = context.read(PYTHON_VERSION_FILENAME); insta::with_settings!({ @@ -655,14 +629,14 @@ fn python_pin_resolve() { }); // Request CPython - uv_snapshot!(context.filters(), context.python_pin().arg("--resolved").arg("cpython"), @r###" + uv_snapshot!(context.filters(), context.python_pin().arg("--resolved").arg("cpython"), @" success: true exit_code: 0 ----- stdout ----- Updated `.python-version` from `[PYTHON-3.13]` -> `[PYTHON-3.12]` ----- stderr ----- - "###); + "); let python_version = context.read(PYTHON_VERSION_FILENAME); insta::with_settings!({ @@ -672,14 +646,14 @@ fn python_pin_resolve() { }); // Request CPython 3.13 - uv_snapshot!(context.filters(), context.python_pin().arg("--resolved").arg("cpython@3.13"), @r###" + uv_snapshot!(context.filters(), context.python_pin().arg("--resolved").arg("cpython@3.13"), @" success: true exit_code: 0 ----- stdout ----- Updated `.python-version` from `[PYTHON-3.12]` -> `[PYTHON-3.13]` ----- stderr ----- - "###); + "); let python_version = context.read(PYTHON_VERSION_FILENAME); insta::with_settings!({ @@ -689,14 +663,14 @@ fn python_pin_resolve() { }); // Request CPython 3.13 via partial key syntax - uv_snapshot!(context.filters(), context.python_pin().arg("--resolved").arg("cpython-3.13"), @r###" + uv_snapshot!(context.filters(), context.python_pin().arg("--resolved").arg("cpython-3.13"), @" success: true exit_code: 0 ----- stdout ----- Pinned `.python-version` to `[PYTHON-3.13]` ----- stderr ----- - "###); + "); let python_version = context.read(PYTHON_VERSION_FILENAME); insta::with_settings!({ @@ -711,14 +685,14 @@ fn python_pin_resolve() { uv_snapshot!(context.filters(), context.python_pin().arg("--resolved") .arg(format!("cpython-3.13-{os}-{arch}")) - , @r###" + , @" success: true exit_code: 0 ----- stdout ----- Pinned `.python-version` to `[PYTHON-3.13]` ----- stderr ----- - "###); + "); let python_version = context.read(PYTHON_VERSION_FILENAME); insta::with_settings!({ @@ -730,7 +704,7 @@ fn python_pin_resolve() { // Request an implementation that is not installed // (skip on Windows because the snapshot is different and the behavior is not platform dependent) #[cfg(unix)] - uv_snapshot!(context.filters(), context.python_pin().arg("--resolved").arg("pypy"), @r" + uv_snapshot!(context.filters(), context.python_pin().arg("--resolved").arg("pypy"), @" success: false exit_code: 2 ----- stdout ----- @@ -751,14 +725,14 @@ fn python_pin_resolve() { // Request a version that is not installed // (skip on Windows because the snapshot is different and the behavior is not platform dependent) #[cfg(unix)] - uv_snapshot!(context.filters(), context.python_pin().arg("--resolved").arg("3.7"), @r###" + uv_snapshot!(context.filters(), context.python_pin().arg("--resolved").arg("3.7"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: No interpreter found for Python 3.7 in managed installations or search path - "###); + "); let python_version = context.read(PYTHON_VERSION_FILENAME); insta::with_settings!({ @@ -781,7 +755,7 @@ fn python_pin_with_comments() -> Result<()> { let version_file = context.temp_dir.child(PYTHON_VERSION_FILENAME); version_file.write_str(content)?; - uv_snapshot!(context.filters(), context.python_pin(), @r###" + uv_snapshot!(context.filters(), context.python_pin(), @" success: true exit_code: 0 ----- stdout ----- @@ -789,12 +763,12 @@ fn python_pin_with_comments() -> Result<()> { 3.10 ----- stderr ----- - "###); + "); fs_err::remove_file(version_file)?; let versions_file = context.temp_dir.child(PYTHON_VERSIONS_FILENAME); versions_file.write_str(content)?; - uv_snapshot!(context.filters(), context.python_pin(), @r###" + uv_snapshot!(context.filters(), context.python_pin(), @" success: true exit_code: 0 ----- stdout ----- @@ -802,7 +776,7 @@ fn python_pin_with_comments() -> Result<()> { 3.10 ----- stderr ----- - "###); + "); Ok(()) } @@ -813,7 +787,7 @@ fn python_pin_install() { let context: TestContext = TestContext::new_with_versions(&[]).with_filtered_python_sources(); // Should not install 3.12 when downloads are not automatic - uv_snapshot!(context.filters(), context.python_pin().arg("3.12"), @r" + uv_snapshot!(context.filters(), context.python_pin().arg("3.12"), @" success: true exit_code: 0 ----- stdout ----- @@ -823,7 +797,7 @@ fn python_pin_install() { warning: No interpreter found for Python 3.12 in [PYTHON SOURCES] "); - uv_snapshot!(context.filters(), context.python_pin().arg("3.12").env(EnvVars::UV_PYTHON_DOWNLOADS, "auto"), @r" + uv_snapshot!(context.filters(), context.python_pin().arg("3.12").env(EnvVars::UV_PYTHON_DOWNLOADS, "auto"), @" success: true exit_code: 0 ----- stdout ----- @@ -837,7 +811,7 @@ fn python_pin_install() { fn python_pin_rm() { let context: TestContext = TestContext::new_with_versions(&["3.12"]); - uv_snapshot!(context.filters(), context.python_pin().arg("--rm"), @r" + uv_snapshot!(context.filters(), context.python_pin().arg("--rm"), @" success: false exit_code: 2 ----- stdout ----- @@ -848,7 +822,7 @@ fn python_pin_rm() { // Create and remove a local pin context.python_pin().arg("3.12").assert().success(); - uv_snapshot!(context.filters(), context.python_pin().arg("--rm"), @r" + uv_snapshot!(context.filters(), context.python_pin().arg("--rm"), @" success: true exit_code: 0 ----- stdout ----- @@ -857,7 +831,7 @@ fn python_pin_rm() { ----- stderr ----- "); - uv_snapshot!(context.filters(), context.python_pin().arg("--rm").arg("--global"), @r" + uv_snapshot!(context.filters(), context.python_pin().arg("--rm").arg("--global"), @" success: false exit_code: 2 ----- stdout ----- @@ -868,7 +842,7 @@ fn python_pin_rm() { // Global does not detect the local pin context.python_pin().arg("3.12").assert().success(); - uv_snapshot!(context.filters(), context.python_pin().arg("--rm").arg("--global"), @r" + uv_snapshot!(context.filters(), context.python_pin().arg("--rm").arg("--global"), @" success: false exit_code: 2 ----- stdout ----- @@ -884,7 +858,7 @@ fn python_pin_rm() { .assert() .success(); - uv_snapshot!(context.filters(), context.python_pin().arg("--rm").arg("--global"), @r" + uv_snapshot!(context.filters(), context.python_pin().arg("--rm").arg("--global"), @" success: true exit_code: 0 ----- stdout ----- @@ -902,7 +876,7 @@ fn python_pin_rm() { .success(); // Remove the local pin - uv_snapshot!(context.filters(), context.python_pin().arg("--rm"), @r" + uv_snapshot!(context.filters(), context.python_pin().arg("--rm"), @" success: true exit_code: 0 ----- stdout ----- @@ -912,7 +886,7 @@ fn python_pin_rm() { "); // The global pin should not be removed without `--global` - uv_snapshot!(context.filters(), context.python_pin().arg("--rm"), @r" + uv_snapshot!(context.filters(), context.python_pin().arg("--rm"), @" success: false exit_code: 2 ----- stdout ----- diff --git a/crates/uv/tests/it/python_upgrade.rs b/crates/uv/tests/it/python_upgrade.rs index 57ba225de..78de90985 100644 --- a/crates/uv/tests/it/python_upgrade.rs +++ b/crates/uv/tests/it/python_upgrade.rs @@ -15,7 +15,7 @@ fn python_upgrade() { .with_managed_python_dirs(); // Install an earlier patch version - uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.10.17"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.10.17"), @" success: true exit_code: 0 ----- stdout ----- @@ -26,7 +26,7 @@ fn python_upgrade() { "); // Don't accept patch version as argument to upgrade command - uv_snapshot!(context.filters(), context.python_upgrade().arg("--preview").arg("3.10.17"), @r" + uv_snapshot!(context.filters(), context.python_upgrade().arg("--preview").arg("3.10.17"), @" success: false exit_code: 1 ----- stdout ----- @@ -36,7 +36,7 @@ fn python_upgrade() { "); // Upgrade patch version - uv_snapshot!(context.filters(), context.python_upgrade().arg("--preview").arg("3.10"), @r" + uv_snapshot!(context.filters(), context.python_upgrade().arg("--preview").arg("3.10"), @" success: true exit_code: 0 ----- stdout ----- @@ -47,7 +47,7 @@ fn python_upgrade() { "); // Should be a no-op when already upgraded - uv_snapshot!(context.filters(), context.python_upgrade().arg("--preview").arg("3.10"), @r" + uv_snapshot!(context.filters(), context.python_upgrade().arg("--preview").arg("3.10"), @" success: true exit_code: 0 ----- stdout ----- @@ -57,7 +57,7 @@ fn python_upgrade() { "); // Should reinstall on `--reinstall` - uv_snapshot!(context.filters(), context.python_upgrade().arg("--preview").arg("3.10").arg("--reinstall"), @r" + uv_snapshot!(context.filters(), context.python_upgrade().arg("--preview").arg("3.10").arg("--reinstall"), @" success: true exit_code: 0 ----- stdout ----- @@ -68,7 +68,7 @@ fn python_upgrade() { "); // Install an earlier pre-release version - uv_snapshot!(context.filters(), context.python_install().arg("3.14.0rc2"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("3.14.0rc2"), @" success: true exit_code: 0 ----- stdout ----- @@ -79,7 +79,7 @@ fn python_upgrade() { "); // Upgrade the pre-release version - uv_snapshot!(context.filters(), context.python_upgrade(), @r" + uv_snapshot!(context.filters(), context.python_upgrade(), @" success: true exit_code: 0 ----- stdout ----- @@ -100,7 +100,7 @@ fn python_upgrade_without_version() { .with_managed_python_dirs(); // Should be a no-op when no versions have been installed - uv_snapshot!(context.filters(), context.python_upgrade().arg("--preview"), @r" + uv_snapshot!(context.filters(), context.python_upgrade().arg("--preview"), @" success: true exit_code: 0 ----- stdout ----- @@ -110,7 +110,7 @@ fn python_upgrade_without_version() { "); // Install earlier patch versions for different minor versions - uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.11.8").arg("3.12.8").arg("3.13.1"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.11.8").arg("3.12.8").arg("3.13.1"), @" success: true exit_code: 0 ----- stdout ----- @@ -126,7 +126,7 @@ fn python_upgrade_without_version() { filters.push((r"3.13.\d+", "3.13.[X]")); // Upgrade one patch version - uv_snapshot!(filters, context.python_upgrade().arg("--preview").arg("3.13"), @r" + uv_snapshot!(filters, context.python_upgrade().arg("--preview").arg("3.13"), @" success: true exit_code: 0 ----- stdout ----- @@ -138,7 +138,7 @@ fn python_upgrade_without_version() { // Providing no minor version to `uv python upgrade` should upgrade the rest // of the patch versions - uv_snapshot!(context.filters(), context.python_upgrade().arg("--preview"), @r" + uv_snapshot!(context.filters(), context.python_upgrade().arg("--preview"), @" success: true exit_code: 0 ----- stdout ----- @@ -150,7 +150,7 @@ fn python_upgrade_without_version() { "); // Should be a no-op when every version is already upgraded - uv_snapshot!(context.filters(), context.python_upgrade().arg("--preview"), @r" + uv_snapshot!(context.filters(), context.python_upgrade().arg("--preview"), @" success: true exit_code: 0 ----- stdout ----- @@ -169,7 +169,7 @@ fn python_upgrade_transparent_from_venv() { .with_managed_python_dirs(); // Install an earlier patch version - uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.10.17"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.10.17"), @" success: true exit_code: 0 ----- stdout ----- @@ -180,7 +180,7 @@ fn python_upgrade_transparent_from_venv() { "); // Create a virtual environment - uv_snapshot!(context.filters(), context.venv(), @r" + uv_snapshot!(context.filters(), context.venv(), @" success: true exit_code: 0 ----- stdout ----- @@ -191,7 +191,7 @@ fn python_upgrade_transparent_from_venv() { Activate with: source .venv/[BIN]/activate "); - uv_snapshot!(context.filters(), context.run().arg("python").arg("--version"), @r" + uv_snapshot!(context.filters(), context.run().arg("python").arg("--version"), @" success: true exit_code: 0 ----- stdout ----- @@ -204,7 +204,7 @@ fn python_upgrade_transparent_from_venv() { let second_venv = ".venv2"; // Create a second virtual environment with minor version request - uv_snapshot!(context.filters(), context.venv().arg(second_venv).arg("-p").arg("3.10"), @r" + uv_snapshot!(context.filters(), context.venv().arg(second_venv).arg("-p").arg("3.10"), @" success: true exit_code: 0 ----- stdout ----- @@ -216,7 +216,7 @@ fn python_upgrade_transparent_from_venv() { "); uv_snapshot!(context.filters(), context.run().arg("python").arg("--version") - .env(EnvVars::VIRTUAL_ENV, second_venv), @r" + .env(EnvVars::VIRTUAL_ENV, second_venv), @" success: true exit_code: 0 ----- stdout ----- @@ -227,7 +227,7 @@ fn python_upgrade_transparent_from_venv() { ); // Upgrade patch version - uv_snapshot!(context.filters(), context.python_upgrade().arg("--preview").arg("3.10"), @r" + uv_snapshot!(context.filters(), context.python_upgrade().arg("--preview").arg("3.10"), @" success: true exit_code: 0 ----- stdout ----- @@ -238,7 +238,7 @@ fn python_upgrade_transparent_from_venv() { "); // First virtual environment should reflect upgraded patch - uv_snapshot!(context.filters(), context.run().arg("python").arg("--version"), @r" + uv_snapshot!(context.filters(), context.run().arg("python").arg("--version"), @" success: true exit_code: 0 ----- stdout ----- @@ -250,7 +250,7 @@ fn python_upgrade_transparent_from_venv() { // Second virtual environment should reflect upgraded patch uv_snapshot!(context.filters(), context.run().arg("python").arg("--version") - .env(EnvVars::VIRTUAL_ENV, second_venv), @r" + .env(EnvVars::VIRTUAL_ENV, second_venv), @" success: true exit_code: 0 ----- stdout ----- @@ -272,7 +272,7 @@ fn python_upgrade_transparent_from_venv_preview() { .with_managed_python_dirs(); // Install an earlier patch version using `--preview` - uv_snapshot!(context.filters(), context.python_install().arg("3.10.17").arg("--preview"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("3.10.17").arg("--preview"), @" success: true exit_code: 0 ----- stdout ----- @@ -283,7 +283,7 @@ fn python_upgrade_transparent_from_venv_preview() { "); // Create a virtual environment - uv_snapshot!(context.filters(), context.venv().arg("-p").arg("3.10"), @r" + uv_snapshot!(context.filters(), context.venv().arg("-p").arg("3.10"), @" success: true exit_code: 0 ----- stdout ----- @@ -294,7 +294,7 @@ fn python_upgrade_transparent_from_venv_preview() { Activate with: source .venv/[BIN]/activate "); - uv_snapshot!(context.filters(), context.run().arg("python").arg("--version"), @r" + uv_snapshot!(context.filters(), context.run().arg("python").arg("--version"), @" success: true exit_code: 0 ----- stdout ----- @@ -305,7 +305,7 @@ fn python_upgrade_transparent_from_venv_preview() { ); // Upgrade patch version - uv_snapshot!(context.filters(), context.python_upgrade().arg("--preview").arg("3.10"), @r" + uv_snapshot!(context.filters(), context.python_upgrade().arg("--preview").arg("3.10"), @" success: true exit_code: 0 ----- stdout ----- @@ -316,7 +316,7 @@ fn python_upgrade_transparent_from_venv_preview() { "); // Virtual environment should reflect upgraded patch - uv_snapshot!(context.filters(), context.run().arg("python").arg("--version"), @r" + uv_snapshot!(context.filters(), context.run().arg("python").arg("--version"), @" success: true exit_code: 0 ----- stdout ----- @@ -336,7 +336,7 @@ fn python_upgrade_ignored_with_python_pin() { .with_managed_python_dirs(); // Install an earlier patch version - uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.10.17"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.10.17"), @" success: true exit_code: 0 ----- stdout ----- @@ -347,7 +347,7 @@ fn python_upgrade_ignored_with_python_pin() { "); // Create a virtual environment - uv_snapshot!(context.filters(), context.venv(), @r" + uv_snapshot!(context.filters(), context.venv(), @" success: true exit_code: 0 ----- stdout ----- @@ -359,7 +359,7 @@ fn python_upgrade_ignored_with_python_pin() { "); // Pin to older patch version - uv_snapshot!(context.filters(), context.python_pin().arg("3.10.17"), @r" + uv_snapshot!(context.filters(), context.python_pin().arg("3.10.17"), @" success: true exit_code: 0 ----- stdout ----- @@ -369,7 +369,7 @@ fn python_upgrade_ignored_with_python_pin() { "); // Upgrade patch version - uv_snapshot!(context.filters(), context.python_upgrade().arg("--preview").arg("3.10"), @r" + uv_snapshot!(context.filters(), context.python_upgrade().arg("--preview").arg("3.10"), @" success: true exit_code: 0 ----- stdout ----- @@ -380,7 +380,7 @@ fn python_upgrade_ignored_with_python_pin() { "); // Virtual environment should continue to respect pinned patch version - uv_snapshot!(context.filters(), context.run().arg("python").arg("--version"), @r" + uv_snapshot!(context.filters(), context.run().arg("python").arg("--version"), @" success: true exit_code: 0 ----- stdout ----- @@ -402,7 +402,7 @@ fn python_no_transparent_upgrade_with_venv_patch_specification() { .with_managed_python_dirs(); // Install an earlier patch version - uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.10.17"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.10.17"), @" success: true exit_code: 0 ----- stdout ----- @@ -413,7 +413,7 @@ fn python_no_transparent_upgrade_with_venv_patch_specification() { "); // Create a virtual environment with a patch version - uv_snapshot!(context.filters(), context.venv().arg("-p").arg("3.10.17"), @r" + uv_snapshot!(context.filters(), context.venv().arg("-p").arg("3.10.17"), @" success: true exit_code: 0 ----- stdout ----- @@ -424,7 +424,7 @@ fn python_no_transparent_upgrade_with_venv_patch_specification() { Activate with: source .venv/[BIN]/activate "); - uv_snapshot!(context.filters(), context.run().arg("python").arg("--version"), @r" + uv_snapshot!(context.filters(), context.run().arg("python").arg("--version"), @" success: true exit_code: 0 ----- stdout ----- @@ -435,7 +435,7 @@ fn python_no_transparent_upgrade_with_venv_patch_specification() { ); // Upgrade patch version - uv_snapshot!(context.filters(), context.python_upgrade().arg("--preview").arg("3.10"), @r" + uv_snapshot!(context.filters(), context.python_upgrade().arg("--preview").arg("3.10"), @" success: true exit_code: 0 ----- stdout ----- @@ -446,7 +446,7 @@ fn python_no_transparent_upgrade_with_venv_patch_specification() { "); // The virtual environment Python version remains the same. - uv_snapshot!(context.filters(), context.run().arg("python").arg("--version"), @r" + uv_snapshot!(context.filters(), context.run().arg("python").arg("--version"), @" success: true exit_code: 0 ----- stdout ----- @@ -469,7 +469,7 @@ fn python_transparent_upgrade_venv_venv() { .with_managed_python_dirs(); // Install an earlier patch version - uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.10.17"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.10.17"), @" success: true exit_code: 0 ----- stdout ----- @@ -480,7 +480,7 @@ fn python_transparent_upgrade_venv_venv() { "); // Create an initial virtual environment - uv_snapshot!(context.filters(), context.venv().arg("-p").arg("3.10"), @r" + uv_snapshot!(context.filters(), context.venv().arg("-p").arg("3.10"), @" success: true exit_code: 0 ----- stdout ----- @@ -502,7 +502,7 @@ fn python_transparent_upgrade_venv_venv() { // Create a new virtual environment from within a virtual environment uv_snapshot!(context.filters(), context.venv() .arg(second_venv) - .arg("-p").arg(venv_python.as_os_str()), @r" + .arg("-p").arg(venv_python.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -516,7 +516,7 @@ fn python_transparent_upgrade_venv_venv() { // Check version from within second virtual environment uv_snapshot!(context.filters(), context.run() .arg("python").arg("--version") - .env(EnvVars::VIRTUAL_ENV, second_venv), @r" + .env(EnvVars::VIRTUAL_ENV, second_venv), @" success: true exit_code: 0 ----- stdout ----- @@ -527,7 +527,7 @@ fn python_transparent_upgrade_venv_venv() { ); // Upgrade patch version - uv_snapshot!(context.filters(), context.python_upgrade().arg("--preview").arg("3.10"), @r" + uv_snapshot!(context.filters(), context.python_upgrade().arg("--preview").arg("3.10"), @" success: true exit_code: 0 ----- stdout ----- @@ -540,7 +540,7 @@ fn python_transparent_upgrade_venv_venv() { // Should have transparently upgraded in second virtual environment uv_snapshot!(context.filters(), context.run() .arg("python").arg("--version") - .env(EnvVars::VIRTUAL_ENV, second_venv), @r" + .env(EnvVars::VIRTUAL_ENV, second_venv), @" success: true exit_code: 0 ----- stdout ----- @@ -565,7 +565,7 @@ fn python_upgrade_transparent_from_venv_module() { let bin_dir = context.temp_dir.child("bin"); // Install earlier patch version - uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.12.9"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.12.9"), @" success: true exit_code: 0 ----- stdout ----- @@ -577,7 +577,7 @@ fn python_upgrade_transparent_from_venv_module() { // Create a virtual environment using venv module uv_snapshot!(context.filters(), context.run().arg("python").arg("-m").arg("venv").arg(context.venv.as_os_str()).arg("--without-pip") - .env(EnvVars::PATH, bin_dir.as_os_str()), @r" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -585,7 +585,7 @@ fn python_upgrade_transparent_from_venv_module() { ----- stderr ----- "); - uv_snapshot!(context.filters(), context.run().arg("python").arg("--version"), @r" + uv_snapshot!(context.filters(), context.run().arg("python").arg("--version"), @" success: true exit_code: 0 ----- stdout ----- @@ -596,7 +596,7 @@ fn python_upgrade_transparent_from_venv_module() { ); // Upgrade patch version - uv_snapshot!(context.filters(), context.python_upgrade().arg("--preview").arg("3.12"), @r" + uv_snapshot!(context.filters(), context.python_upgrade().arg("--preview").arg("3.12"), @" success: true exit_code: 0 ----- stdout ----- @@ -608,7 +608,7 @@ fn python_upgrade_transparent_from_venv_module() { ); // Virtual environment should reflect upgraded patch - uv_snapshot!(context.filters(), context.run().arg("python").arg("--version"), @r" + uv_snapshot!(context.filters(), context.run().arg("python").arg("--version"), @" success: true exit_code: 0 ----- stdout ----- @@ -633,7 +633,7 @@ fn python_upgrade_transparent_from_venv_module_in_venv() { let bin_dir = context.temp_dir.child("bin"); // Install earlier patch version - uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.10.17"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("--preview").arg("3.10.17"), @" success: true exit_code: 0 ----- stdout ----- @@ -644,7 +644,7 @@ fn python_upgrade_transparent_from_venv_module_in_venv() { "); // Create first virtual environment - uv_snapshot!(context.filters(), context.venv().arg("-p").arg("3.10"), @r" + uv_snapshot!(context.filters(), context.venv().arg("-p").arg("3.10"), @" success: true exit_code: 0 ----- stdout ----- @@ -660,7 +660,7 @@ fn python_upgrade_transparent_from_venv_module_in_venv() { // Create a virtual environment using `venv`` module from within the first virtual environment. uv_snapshot!(context.filters(), context.run() .arg("python").arg("-m").arg("venv").arg(second_venv).arg("--without-pip") - .env(EnvVars::PATH, bin_dir.as_os_str()), @r" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -671,7 +671,7 @@ fn python_upgrade_transparent_from_venv_module_in_venv() { // Check version within second virtual environment uv_snapshot!(context.filters(), context.run() .env(EnvVars::VIRTUAL_ENV, second_venv) - .arg("python").arg("--version"), @r" + .arg("python").arg("--version"), @" success: true exit_code: 0 ----- stdout ----- @@ -682,7 +682,7 @@ fn python_upgrade_transparent_from_venv_module_in_venv() { ); // Upgrade patch version - uv_snapshot!(context.filters(), context.python_upgrade().arg("--preview").arg("3.10"), @r" + uv_snapshot!(context.filters(), context.python_upgrade().arg("--preview").arg("3.10"), @" success: true exit_code: 0 ----- stdout ----- @@ -696,7 +696,7 @@ fn python_upgrade_transparent_from_venv_module_in_venv() { // Second virtual environment should reflect upgraded patch. uv_snapshot!(context.filters(), context.run() .env(EnvVars::VIRTUAL_ENV, second_venv) - .arg("python").arg("--version"), @r" + .arg("python").arg("--version"), @" success: true exit_code: 0 ----- stdout ----- @@ -724,7 +724,7 @@ fn python_upgrade_force_install() -> Result<()> { .touch()?; // Try to upgrade with a non-managed interpreter installed in `bin`. - uv_snapshot!(context.filters(), context.python_upgrade().arg("--preview").arg("3.12"), @r" + uv_snapshot!(context.filters(), context.python_upgrade().arg("--preview").arg("3.12"), @" success: true exit_code: 0 ----- stdout ----- @@ -736,7 +736,7 @@ fn python_upgrade_force_install() -> Result<()> { "); // Force the `bin` install. - uv_snapshot!(context.filters(), context.python_install().arg("3.12").arg("--force").arg("--preview").arg("3.12"), @r" + uv_snapshot!(context.filters(), context.python_install().arg("3.12").arg("--force").arg("--preview").arg("3.12"), @" success: true exit_code: 0 ----- stdout ----- @@ -762,7 +762,7 @@ fn python_upgrade_implementation() { context.python_install().arg("pypy@3.11").assert().success(); // Run the upgrade, we should not install cpython - uv_snapshot!(context.filters(), context.python_upgrade(), @r" + uv_snapshot!(context.filters(), context.python_upgrade(), @" success: true exit_code: 0 ----- stdout ----- diff --git a/crates/uv/tests/it/run.rs b/crates/uv/tests/it/run.rs index e10784552..9019ab025 100644 --- a/crates/uv/tests/it/run.rs +++ b/crates/uv/tests/it/run.rs @@ -47,7 +47,7 @@ fn run_with_python_version() -> Result<()> { // get stale files, see https://github.com/python/cpython/issues/75953. let mut command = context.run(); let command_with_args = command.arg("python").arg("-B").arg("main.py"); - uv_snapshot!(context.filters(), command_with_args, @r###" + uv_snapshot!(context.filters(), command_with_args, @" success: true exit_code: 0 ----- stdout ----- @@ -64,7 +64,7 @@ fn run_with_python_version() -> Result<()> { + foo==1.0.0 (from file://[TEMP_DIR]/) + idna==3.6 + sniffio==1.3.1 - "###); + "); // This is the same Python, no reinstallation. let mut command = context.run(); @@ -74,7 +74,7 @@ fn run_with_python_version() -> Result<()> { .arg("python") .arg("-B") .arg("main.py"); - uv_snapshot!(context.filters(), command_with_args, @r###" + uv_snapshot!(context.filters(), command_with_args, @" success: true exit_code: 0 ----- stdout ----- @@ -84,7 +84,7 @@ fn run_with_python_version() -> Result<()> { ----- stderr ----- Resolved 5 packages in [TIME] Audited 4 packages in [TIME] - "###); + "); // This time, we target Python 3.11 instead. let mut command = context.run(); @@ -96,7 +96,7 @@ fn run_with_python_version() -> Result<()> { .arg("main.py") .env_remove(EnvVars::VIRTUAL_ENV); - uv_snapshot!(context.filters(), command_with_args, @r###" + uv_snapshot!(context.filters(), command_with_args, @" success: true exit_code: 0 ----- stdout ----- @@ -114,7 +114,7 @@ fn run_with_python_version() -> Result<()> { + foo==1.0.0 (from file://[TEMP_DIR]/) + idna==3.6 + sniffio==1.3.1 - "###); + "); // This time, we target Python 3.9 instead. let mut command = context.run(); @@ -126,7 +126,7 @@ fn run_with_python_version() -> Result<()> { .arg("main.py") .env_remove(EnvVars::VIRTUAL_ENV); - uv_snapshot!(context.filters(), command_with_args, @r" + uv_snapshot!(context.filters(), command_with_args, @" success: false exit_code: 2 ----- stdout ----- @@ -162,7 +162,7 @@ fn run_args() -> Result<()> { })?; // We treat arguments before the command as uv arguments - uv_snapshot!(filters, context.run().arg("--help").arg("python"), @r" + uv_snapshot!(filters, context.run().arg("--help").arg("python"), @" success: true exit_code: 0 ----- stdout ----- @@ -172,7 +172,7 @@ fn run_args() -> Result<()> { "); // We don't treat arguments after the command as uv arguments - uv_snapshot!(filters, context.run().arg("python").arg("--help"), @r" + uv_snapshot!(filters, context.run().arg("python").arg("--help"), @" success: true exit_code: 0 ----- stdout ----- @@ -180,7 +180,7 @@ fn run_args() -> Result<()> { "); // Can use `--` to separate uv arguments from the command arguments. - uv_snapshot!(filters, context.run().arg("--").arg("python").arg("--version"), @r###" + uv_snapshot!(filters, context.run().arg("--").arg("python").arg("--version"), @" success: true exit_code: 0 ----- stdout ----- @@ -189,7 +189,7 @@ fn run_args() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] Audited 1 package in [TIME] - "###); + "); Ok(()) } @@ -217,7 +217,7 @@ fn run_no_args() -> Result<()> { // Run without specifying any arguments. #[cfg(not(windows))] - uv_snapshot!(context.filters(), context.run(), @r###" + uv_snapshot!(context.filters(), context.run(), @" success: false exit_code: 2 ----- stdout ----- @@ -236,7 +236,7 @@ fn run_no_args() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + foo==1.0.0 (from file://[TEMP_DIR]/) - "###); + "); #[cfg(windows)] uv_snapshot!(context.filters(), context.run(), @r###" @@ -298,7 +298,7 @@ fn run_pep723_script() -> Result<()> { })?; // Running the script should install the requirements. - uv_snapshot!(context.filters(), context.run().arg("main.py"), @r###" + uv_snapshot!(context.filters(), context.run().arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -308,16 +308,16 @@ fn run_pep723_script() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + iniconfig==2.0.0 - "###); + "); // Running again should use the existing environment. - uv_snapshot!(context.filters(), context.run().arg("main.py"), @r###" + uv_snapshot!(context.filters(), context.run().arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- - "###); + "); // But neither invocation should create a lockfile. assert!(!context.temp_dir.child("main.py.lock").exists()); @@ -330,7 +330,7 @@ fn run_pep723_script() -> Result<()> { " })?; - uv_snapshot!(context.filters(), context.run().arg("main.py"), @r###" + uv_snapshot!(context.filters(), context.run().arg("main.py"), @r#" success: false exit_code: 1 ----- stdout ----- @@ -347,7 +347,7 @@ fn run_pep723_script() -> Result<()> { File "[TEMP_DIR]/main.py", line 1, in import iniconfig ModuleNotFoundError: No module named 'iniconfig' - "###); + "#); // But the script should be runnable. let test_non_script = context.temp_dir.child("main.py"); @@ -358,7 +358,7 @@ fn run_pep723_script() -> Result<()> { "# })?; - uv_snapshot!(context.filters(), context.run().arg("main.py"), @r###" + uv_snapshot!(context.filters(), context.run().arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -367,7 +367,7 @@ fn run_pep723_script() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] Audited 4 packages in [TIME] - "###); + "); // If the script contains a PEP 723 tag, it can omit the dependencies field. let test_script = context.temp_dir.child("main.py"); @@ -381,17 +381,17 @@ fn run_pep723_script() -> Result<()> { })?; // Running the script should install the requirements. - uv_snapshot!(context.filters(), context.run().arg("main.py"), @r###" + uv_snapshot!(context.filters(), context.run().arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- Hello, world! ----- stderr ----- - "###); + "); // Running a script with `--locked` should warn. - uv_snapshot!(context.filters(), context.run().arg("--locked").arg("main.py"), @r###" + uv_snapshot!(context.filters(), context.run().arg("--locked").arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -399,7 +399,7 @@ fn run_pep723_script() -> Result<()> { ----- stderr ----- warning: No lockfile found for Python script (ignoring `--locked`); run `uv lock --script` to generate a lockfile - "###); + "); // If the script can't be resolved, we should reference the script. let test_script = context.temp_dir.child("main.py"); @@ -414,7 +414,7 @@ fn run_pep723_script() -> Result<()> { })?; // Running a script with `--group` should warn. - uv_snapshot!(context.filters(), context.run().arg("--group").arg("foo").arg("main.py"), @r###" + uv_snapshot!(context.filters(), context.run().arg("--group").arg("foo").arg("main.py"), @" success: false exit_code: 1 ----- stdout ----- @@ -422,7 +422,7 @@ fn run_pep723_script() -> Result<()> { ----- stderr ----- × No solution found when resolving script dependencies: ╰─▶ Because there are no versions of add and you require add, we can conclude that your requirements are unsatisfiable. - "###); + "); // If the script can't be resolved, we should reference the script. let test_script = context.temp_dir.child("main.py"); @@ -436,7 +436,7 @@ fn run_pep723_script() -> Result<()> { "# })?; - uv_snapshot!(context.filters(), context.run().arg("--no-project").arg("main.py"), @r###" + uv_snapshot!(context.filters(), context.run().arg("--no-project").arg("main.py"), @" success: false exit_code: 1 ----- stdout ----- @@ -444,7 +444,7 @@ fn run_pep723_script() -> Result<()> { ----- stderr ----- × No solution found when resolving script dependencies: ╰─▶ Because there are no versions of add and you require add, we can conclude that your requirements are unsatisfiable. - "###); + "); // If the script contains an unclosed PEP 723 tag, we should error. let test_script = context.temp_dir.child("main.py"); @@ -461,14 +461,14 @@ fn run_pep723_script() -> Result<()> { "# })?; - uv_snapshot!(context.filters(), context.run().arg("--no-project").arg("main.py"), @r###" + uv_snapshot!(context.filters(), context.run().arg("--no-project").arg("main.py"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: An opening tag (`# /// script`) was found without a closing tag (`# ///`). Ensure that every line between the opening and closing tags (including empty lines) starts with a leading `#`. - "###); + "); Ok(()) } @@ -518,7 +518,7 @@ fn run_pep723_script_requires_python() -> Result<()> { // Delete the `.python-version` file to allow the script to run. fs_err::remove_file(&python_version)?; - uv_snapshot!(context.filters(), context.run().arg("main.py"), @r###" + uv_snapshot!(context.filters(), context.run().arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -528,7 +528,7 @@ fn run_pep723_script_requires_python() -> Result<()> { Resolved 1 package in [TIME] Installed 1 package in [TIME] + iniconfig==2.0.0 - "###); + "); Ok(()) } @@ -558,7 +558,7 @@ fn run_pythonw_script() -> Result<()> { " })?; - uv_snapshot!(context.filters(), context.run().arg("main.pyw"), @r###" + uv_snapshot!(context.filters(), context.run().arg("main.pyw"), @" success: true exit_code: 0 ----- stdout ----- @@ -571,7 +571,7 @@ fn run_pythonw_script() -> Result<()> { + foo==1.0.0 (from file://[TEMP_DIR]/) + idna==3.6 + sniffio==1.3.1 - "###); + "); Ok(()) } @@ -600,7 +600,7 @@ fn run_pep723_script_metadata() -> Result<()> { })?; // Running the script should fail without network access. - uv_snapshot!(context.filters(), context.run().arg("main.py"), @r###" + uv_snapshot!(context.filters(), context.run().arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -610,7 +610,7 @@ fn run_pep723_script_metadata() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + iniconfig==1.0.1 - "###); + "); // Respect `tool.uv.sources`. let test_script = context.temp_dir.child("main.py"); @@ -630,7 +630,7 @@ fn run_pep723_script_metadata() -> Result<()> { })?; // The script should succeed with the specified source. - uv_snapshot!(context.filters(), context.run().arg("main.py"), @r###" + uv_snapshot!(context.filters(), context.run().arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -640,7 +640,7 @@ fn run_pep723_script_metadata() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + uv-public-pypackage==0.1.0 (from git+https://github.com/astral-test/uv-public-pypackage@0dacfd662c64cb4ceb16e6cf65a157a8b715b979) - "###); + "); Ok(()) } @@ -671,7 +671,7 @@ fn run_pep723_script_index() -> Result<()> { "# })?; - uv_snapshot!(context.filters(), context.run().arg("main.py"), @r###" + uv_snapshot!(context.filters(), context.run().arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -681,7 +681,7 @@ fn run_pep723_script_index() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + idna==2.7 - "###); + "); Ok(()) } @@ -707,7 +707,7 @@ fn run_pep723_script_constraints() -> Result<()> { "# })?; - uv_snapshot!(context.filters(), context.run().arg("main.py"), @r###" + uv_snapshot!(context.filters(), context.run().arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -719,7 +719,7 @@ fn run_pep723_script_constraints() -> Result<()> { + anyio==4.3.0 + idna==3.0 + sniffio==1.3.1 - "###); + "); Ok(()) } @@ -745,7 +745,7 @@ fn run_pep723_script_overrides() -> Result<()> { "# })?; - uv_snapshot!(context.filters(), context.run().arg("main.py"), @r###" + uv_snapshot!(context.filters(), context.run().arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -757,7 +757,7 @@ fn run_pep723_script_overrides() -> Result<()> { + anyio==4.3.0 + idna==2.0 + sniffio==1.3.1 - "###); + "); Ok(()) } @@ -786,7 +786,7 @@ fn run_pep723_script_build_constraints() -> Result<()> { "# })?; - uv_snapshot!(context.filters(), context.run().arg("main.py"), @r###" + uv_snapshot!(context.filters(), context.run().arg("main.py"), @" success: false exit_code: 1 ----- stdout ----- @@ -796,7 +796,7 @@ fn run_pep723_script_build_constraints() -> Result<()> { ├─▶ Failed to resolve requirements from `setup.py` build ├─▶ No solution found when resolving: `setuptools>=40.8.0` ╰─▶ Because you require setuptools>=40.8.0 and setuptools==1, we can conclude that your requirements are unsatisfiable. - "###); + "); // Compatible build constraints. test_script.write_str(indoc! { r#" @@ -815,7 +815,7 @@ fn run_pep723_script_build_constraints() -> Result<()> { "# })?; - uv_snapshot!(context.filters(), context.run().arg("main.py"), @r###" + uv_snapshot!(context.filters(), context.run().arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -830,7 +830,7 @@ fn run_pep723_script_build_constraints() -> Result<()> { + requests==1.2.0 + sniffio==1.3.1 + typing-extensions==4.10.0 - "###); + "); Ok(()) } @@ -856,7 +856,7 @@ fn run_pep723_script_lock() -> Result<()> { })?; // Without a lockfile, running with `--locked` should warn. - uv_snapshot!(context.filters(), context.run().arg("--locked").arg("main.py"), @r###" + uv_snapshot!(context.filters(), context.run().arg("--locked").arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -868,17 +868,17 @@ fn run_pep723_script_lock() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + iniconfig==2.0.0 - "###); + "); // Explicitly lock the script. - uv_snapshot!(context.filters(), context.lock().arg("--script").arg("main.py"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--script").arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 1 package in [TIME] - "###); + "); let lock = context.read("main.py.lock"); @@ -910,7 +910,7 @@ fn run_pep723_script_lock() -> Result<()> { }); // Run the script. - uv_snapshot!(context.filters(), context.run().arg("main.py"), @r###" + uv_snapshot!(context.filters(), context.run().arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -919,10 +919,10 @@ fn run_pep723_script_lock() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] Audited 1 package in [TIME] - "###); + "); // With a lockfile, running with `--locked` should not warn. - uv_snapshot!(context.filters(), context.run().arg("--locked").arg("main.py"), @r###" + uv_snapshot!(context.filters(), context.run().arg("--locked").arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -931,7 +931,7 @@ fn run_pep723_script_lock() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] Audited 1 package in [TIME] - "###); + "); // Modify the metadata. test_script.write_str(indoc! { r#" @@ -949,7 +949,7 @@ fn run_pep723_script_lock() -> Result<()> { })?; // Re-running the script with `--locked` should error. - uv_snapshot!(context.filters(), context.run().arg("--locked").arg("main.py"), @r###" + uv_snapshot!(context.filters(), context.run().arg("--locked").arg("main.py"), @" success: false exit_code: 2 ----- stdout ----- @@ -957,10 +957,10 @@ fn run_pep723_script_lock() -> Result<()> { ----- stderr ----- Resolved 3 packages in [TIME] error: The lockfile at `uv.lock` needs to be updated, but `--locked` was provided. To update the lockfile, run `uv lock`. - "###); + "); // Re-running the script with `--frozen` should also error, but at runtime. - uv_snapshot!(context.filters(), context.run().arg("--frozen").arg("main.py"), @r###" + uv_snapshot!(context.filters(), context.run().arg("--frozen").arg("main.py"), @r#" success: false exit_code: 1 ----- stdout ----- @@ -971,10 +971,10 @@ fn run_pep723_script_lock() -> Result<()> { File "[TEMP_DIR]/main.py", line 8, in import anyio ModuleNotFoundError: No module named 'anyio' - "###); + "#); // Re-running the script should update the lockfile. - uv_snapshot!(context.filters(), context.run().arg("main.py"), @r###" + uv_snapshot!(context.filters(), context.run().arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -987,7 +987,7 @@ fn run_pep723_script_lock() -> Result<()> { + anyio==4.3.0 + idna==3.6 + sniffio==1.3.1 - "###); + "); let lock = context.read("main.py.lock"); @@ -1065,14 +1065,14 @@ fn run_managed_false() -> Result<()> { "# })?; - uv_snapshot!(context.filters(), context.run().arg("python").arg("--version"), @r###" + uv_snapshot!(context.filters(), context.run().arg("python").arg("--version"), @" success: true exit_code: 0 ----- stdout ----- Python 3.12.[X] ----- stderr ----- - "###); + "); Ok(()) } @@ -1091,7 +1091,7 @@ fn run_exact() -> Result<()> { "# })?; - uv_snapshot!(context.filters(), context.run().arg("python").arg("-c").arg("import iniconfig"), @r###" + uv_snapshot!(context.filters(), context.run().arg("python").arg("-c").arg("import iniconfig"), @" success: true exit_code: 0 ----- stdout ----- @@ -1101,7 +1101,7 @@ fn run_exact() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + iniconfig==2.0.0 - "###); + "); // Remove `iniconfig`. pyproject_toml.write_str(indoc! { r#" @@ -1114,7 +1114,7 @@ fn run_exact() -> Result<()> { })?; // By default, `uv run` uses inexact semantics, so both `iniconfig` and `anyio` should still be available. - uv_snapshot!(context.filters(), context.run().arg("python").arg("-c").arg("import iniconfig; import anyio"), @r###" + uv_snapshot!(context.filters(), context.run().arg("python").arg("-c").arg("import iniconfig; import anyio"), @" success: true exit_code: 0 ----- stdout ----- @@ -1126,10 +1126,10 @@ fn run_exact() -> Result<()> { + anyio==4.3.0 + idna==3.6 + sniffio==1.3.1 - "###); + "); // But under `--exact`, `iniconfig` should not be available. - uv_snapshot!(context.filters(), context.run().arg("--exact").arg("python").arg("-c").arg("import iniconfig"), @r###" + uv_snapshot!(context.filters(), context.run().arg("--exact").arg("python").arg("-c").arg("import iniconfig"), @r#" success: false exit_code: 1 ----- stdout ----- @@ -1141,7 +1141,7 @@ fn run_exact() -> Result<()> { Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'iniconfig' - "###); + "#); Ok(()) } @@ -1173,7 +1173,7 @@ fn run_with() -> Result<()> { })?; // Requesting an unsatisfied requirement should install it. - uv_snapshot!(context.filters(), context.run().arg("--with").arg("iniconfig").arg("main.py"), @r" + uv_snapshot!(context.filters(), context.run().arg("--with").arg("iniconfig").arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -1192,7 +1192,7 @@ fn run_with() -> Result<()> { "); // Requesting a satisfied requirement should use the base environment. - uv_snapshot!(context.filters(), context.run().arg("--with").arg("sniffio").arg("main.py"), @r" + uv_snapshot!(context.filters(), context.run().arg("--with").arg("sniffio").arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -1204,7 +1204,7 @@ fn run_with() -> Result<()> { "); // Unless the user requests a different version. - uv_snapshot!(context.filters(), context.run().arg("--with").arg("sniffio<1.3.0").arg("main.py"), @r" + uv_snapshot!(context.filters(), context.run().arg("--with").arg("sniffio<1.3.0").arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -1222,7 +1222,7 @@ fn run_with() -> Result<()> { // If we request a dependency that isn't in the base environment, we should still respect any // other dependencies. In this case, `sniffio==1.3.0` is not the latest-compatible version, but // we should use it anyway. - uv_snapshot!(context.filters(), context.run().arg("--with").arg("anyio").arg("main.py"), @r" + uv_snapshot!(context.filters(), context.run().arg("--with").arg("anyio").arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -1240,7 +1240,7 @@ fn run_with() -> Result<()> { "); // Even if we run with` --no-sync`. - uv_snapshot!(context.filters(), context.run().arg("--with").arg("anyio==4.2.0").arg("--no-sync").arg("main.py"), @r" + uv_snapshot!(context.filters(), context.run().arg("--with").arg("anyio==4.2.0").arg("--no-sync").arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -1256,7 +1256,7 @@ fn run_with() -> Result<()> { "); // If the dependencies can't be resolved, we should reference `--with`. - uv_snapshot!(context.filters(), context.run().arg("--with").arg("add").arg("main.py"), @r###" + uv_snapshot!(context.filters(), context.run().arg("--with").arg("add").arg("main.py"), @" success: false exit_code: 1 ----- stdout ----- @@ -1266,7 +1266,7 @@ fn run_with() -> Result<()> { Audited 2 packages in [TIME] × No solution found when resolving `--with` dependencies: ╰─▶ Because there are no versions of add and you require add, we can conclude that your requirements are unsatisfiable. - "###); + "); Ok(()) } @@ -1300,7 +1300,7 @@ fn run_with_pyvenv_cfg_file() -> Result<()> { "# })?; - uv_snapshot!(context.filters(), context.run().arg("--with").arg("iniconfig").arg("main.py"), @r" + uv_snapshot!(context.filters(), context.run().arg("--with").arg("iniconfig").arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -1382,7 +1382,7 @@ fn run_with_overlay_interpreter() -> Result<()> { })?; // The project's entrypoint should be rewritten to use the overlay interpreter. - uv_snapshot!(context.filters(), context.run().arg("--with").arg("iniconfig").arg("main").arg(context.temp_dir.child("main").as_os_str()), @r" + uv_snapshot!(context.filters(), context.run().arg("--with").arg("iniconfig").arg("main").arg(context.temp_dir.child("main").as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -1421,7 +1421,7 @@ fn run_with_overlay_interpreter() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - context.read("main"), @r##" + context.read("main"), @r#" #![CACHE_DIR]/builds-v0/[TMP]/python # -*- coding: utf-8 -*- import sys @@ -1432,7 +1432,7 @@ fn run_with_overlay_interpreter() -> Result<()> { elif sys.argv[0].endswith(".exe"): sys.argv[0] = sys.argv[0][:-4] sys.exit(main()) - "## + "# ); } ); @@ -1449,7 +1449,7 @@ fn run_with_overlay_interpreter() -> Result<()> { .success(); // When layering the project on top (via `--with`), the overlay interpreter also should be used. - uv_snapshot!(context.filters(), context.run().arg("--no-project").arg("--with").arg(".").arg("main"), @r" + uv_snapshot!(context.filters(), context.run().arg("--no-project").arg("--with").arg(".").arg("main"), @" success: true exit_code: 0 ----- stdout ----- @@ -1486,7 +1486,7 @@ fn run_with_overlay_interpreter() -> Result<()> { fs_err::remove_file(context.temp_dir.child("main_gui"))?; // The project's entrypoint should be rewritten to use the overlay interpreter. - uv_snapshot!(context.filters(), context.run().arg("--with").arg("iniconfig").arg("main").arg(context.temp_dir.child("main").as_os_str()), @r" + uv_snapshot!(context.filters(), context.run().arg("--with").arg("iniconfig").arg("main").arg(context.temp_dir.child("main").as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -1528,7 +1528,7 @@ fn run_with_overlay_interpreter() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - context.read("main"), @r##" + context.read("main"), @r#" #![CACHE_DIR]/builds-v0/[TMP]/python # -*- coding: utf-8 -*- import sys @@ -1539,13 +1539,13 @@ fn run_with_overlay_interpreter() -> Result<()> { elif sys.argv[0].endswith(".exe"): sys.argv[0] = sys.argv[0][:-4] sys.exit(main()) - "## + "# ); } ); // When layering the project on top (via `--with`), the overlay interpreter also should be used. - uv_snapshot!(context.filters(), context.run().arg("--no-project").arg("--with").arg(".").arg("main"), @r" + uv_snapshot!(context.filters(), context.run().arg("--no-project").arg("--with").arg(".").arg("main"), @" success: true exit_code: 0 ----- stdout ----- @@ -1594,7 +1594,7 @@ fn run_with_build_constraints() -> Result<()> { })?; // Installing requests with incompatible build constraints should fail. - uv_snapshot!(context.filters(), context.run().arg("--with").arg("requests==1.2").arg("main.py"), @r" + uv_snapshot!(context.filters(), context.run().arg("--with").arg("requests==1.2").arg("main.py"), @" success: false exit_code: 1 ----- stdout ----- @@ -1627,7 +1627,7 @@ fn run_with_build_constraints() -> Result<()> { "# })?; - uv_snapshot!(context.filters(), context.run().arg("--with").arg("requests==1.2").arg("main.py"), @r###" + uv_snapshot!(context.filters(), context.run().arg("--with").arg("requests==1.2").arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -1639,7 +1639,7 @@ fn run_with_build_constraints() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + requests==1.2.0 - "###); + "); Ok(()) } @@ -1723,7 +1723,7 @@ fn run_in_workspace() -> Result<()> { " })?; - uv_snapshot!(context.filters(), context.run().arg("main.py"), @r###" + uv_snapshot!(context.filters(), context.run().arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -1736,7 +1736,7 @@ fn run_in_workspace() -> Result<()> { + idna==3.6 + project==0.1.0 (from file://[TEMP_DIR]/) + sniffio==1.3.1 - "###); + "); let test_script = context.temp_dir.child("main.py"); test_script.write_str(indoc! { r" @@ -1744,7 +1744,7 @@ fn run_in_workspace() -> Result<()> { " })?; - uv_snapshot!(context.filters(), context.run().arg("main.py"), @r###" + uv_snapshot!(context.filters(), context.run().arg("main.py"), @r#" success: false exit_code: 1 ----- stdout ----- @@ -1756,9 +1756,9 @@ fn run_in_workspace() -> Result<()> { File "[TEMP_DIR]/main.py", line 1, in import iniconfig ModuleNotFoundError: No module named 'iniconfig' - "###); + "#); - uv_snapshot!(context.filters(), context.run().arg("--package").arg("child1").arg("main.py"), @r###" + uv_snapshot!(context.filters(), context.run().arg("--package").arg("child1").arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -1769,7 +1769,7 @@ fn run_in_workspace() -> Result<()> { Installed 2 packages in [TIME] + child1==0.1.0 (from file://[TEMP_DIR]/child1) + iniconfig==2.0.0 - "###); + "); let test_script = context.temp_dir.child("main.py"); test_script.write_str(indoc! { r" @@ -1777,7 +1777,7 @@ fn run_in_workspace() -> Result<()> { " })?; - uv_snapshot!(context.filters(), context.run().arg("main.py"), @r###" + uv_snapshot!(context.filters(), context.run().arg("main.py"), @r#" success: false exit_code: 1 ----- stdout ----- @@ -1789,9 +1789,9 @@ fn run_in_workspace() -> Result<()> { File "[TEMP_DIR]/main.py", line 1, in import typing_extensions ModuleNotFoundError: No module named 'typing_extensions' - "###); + "#); - uv_snapshot!(context.filters(), context.run().arg("--all-packages").arg("main.py"), @r###" + uv_snapshot!(context.filters(), context.run().arg("--all-packages").arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -1802,7 +1802,7 @@ fn run_in_workspace() -> Result<()> { Installed 2 packages in [TIME] + child2==0.1.0 (from file://[TEMP_DIR]/child2) + typing-extensions==4.10.0 - "###); + "); Ok(()) } @@ -1851,7 +1851,7 @@ fn run_with_editable() -> Result<()> { })?; // Requesting an editable requirement should install it in a layer. - uv_snapshot!(context.filters(), context.run().arg("--with-editable").arg("./src/black_editable").arg("main.py"), @r###" + uv_snapshot!(context.filters(), context.run().arg("--with-editable").arg("./src/black_editable").arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -1868,10 +1868,10 @@ fn run_with_editable() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + black==0.1.0 (from file://[TEMP_DIR]/src/black_editable) - "###); + "); // Requesting an editable requirement should install it in a layer, even if it satisfied - uv_snapshot!(context.filters(), context.run().arg("--with-editable").arg("./src/anyio_local").arg("main.py"), @r###" + uv_snapshot!(context.filters(), context.run().arg("--with-editable").arg("./src/anyio_local").arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -1883,10 +1883,10 @@ fn run_with_editable() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + anyio==4.3.0+foo (from file://[TEMP_DIR]/src/anyio_local) - "###); + "); // Requesting the project itself should use the base environment. - uv_snapshot!(context.filters(), context.run().arg("--with-editable").arg(".").arg("main.py"), @r###" + uv_snapshot!(context.filters(), context.run().arg("--with-editable").arg(".").arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -1894,7 +1894,7 @@ fn run_with_editable() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] Audited 4 packages in [TIME] - "###); + "); // Similarly, an already editable requirement does not require a layer pyproject_toml.write_str(indoc! { r#" @@ -1913,7 +1913,7 @@ fn run_with_editable() -> Result<()> { "# })?; - uv_snapshot!(context.filters(), context.sync(), @r###" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -1927,9 +1927,9 @@ fn run_with_editable() -> Result<()> { + anyio==4.3.0+foo (from file://[TEMP_DIR]/src/anyio_local) ~ foo==1.0.0 (from file://[TEMP_DIR]/) - idna==3.6 - "###); + "); - uv_snapshot!(context.filters(), context.run().arg("--with-editable").arg("./src/anyio_local").arg("main.py"), @r###" + uv_snapshot!(context.filters(), context.run().arg("--with-editable").arg("./src/anyio_local").arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -1937,10 +1937,10 @@ fn run_with_editable() -> Result<()> { ----- stderr ----- Resolved 3 packages in [TIME] Audited 3 packages in [TIME] - "###); + "); // If invalid, we should reference `--with-editable`. - uv_snapshot!(context.filters(), context.run().arg("--with-editable").arg("./foo").arg("main.py"), @r###" + uv_snapshot!(context.filters(), context.run().arg("--with-editable").arg("./foo").arg("main.py"), @" success: false exit_code: 1 ----- stdout ----- @@ -1950,7 +1950,7 @@ fn run_with_editable() -> Result<()> { Audited 3 packages in [TIME] × Failed to resolve `--with` requirement ╰─▶ Distribution not found at: file://[TEMP_DIR]/foo - "###); + "); Ok(()) } @@ -1999,7 +1999,7 @@ fn run_group() -> Result<()> { context.lock().assert().success(); - uv_snapshot!(context.filters(), context.run().arg("main.py"), @r###" + uv_snapshot!(context.filters(), context.run().arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -2013,9 +2013,9 @@ fn run_group() -> Result<()> { Installed 2 packages in [TIME] + sniffio==1.3.1 + typing-extensions==4.10.0 - "###); + "); - uv_snapshot!(context.filters(), context.run().arg("--only-group").arg("bar").arg("main.py"), @r###" + uv_snapshot!(context.filters(), context.run().arg("--only-group").arg("bar").arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -2028,9 +2028,9 @@ fn run_group() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + iniconfig==2.0.0 - "###); + "); - uv_snapshot!(context.filters(), context.run().arg("--group").arg("foo").arg("main.py"), @r###" + uv_snapshot!(context.filters(), context.run().arg("--group").arg("foo").arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -2044,9 +2044,9 @@ fn run_group() -> Result<()> { Installed 2 packages in [TIME] + anyio==4.3.0 + idna==3.6 - "###); + "); - uv_snapshot!(context.filters(), context.run().arg("--group").arg("foo").arg("--group").arg("bar").arg("main.py"), @r###" + uv_snapshot!(context.filters(), context.run().arg("--group").arg("foo").arg("--group").arg("bar").arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -2057,9 +2057,9 @@ fn run_group() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] Audited 5 packages in [TIME] - "###); + "); - uv_snapshot!(context.filters(), context.run().arg("--all-groups").arg("main.py"), @r###" + uv_snapshot!(context.filters(), context.run().arg("--all-groups").arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -2070,9 +2070,9 @@ fn run_group() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] Audited 5 packages in [TIME] - "###); + "); - uv_snapshot!(context.filters(), context.run().arg("--all-groups").arg("--no-group").arg("bar").arg("main.py"), @r###" + uv_snapshot!(context.filters(), context.run().arg("--all-groups").arg("--no-group").arg("bar").arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -2083,9 +2083,9 @@ fn run_group() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] Audited 4 packages in [TIME] - "###); + "); - uv_snapshot!(context.filters(), context.run().arg("--group").arg("foo").arg("--no-project").arg("main.py"), @r###" + uv_snapshot!(context.filters(), context.run().arg("--group").arg("foo").arg("--no-project").arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -2095,9 +2095,9 @@ fn run_group() -> Result<()> { ----- stderr ----- warning: `--group foo` has no effect when used alongside `--no-project` - "###); + "); - uv_snapshot!(context.filters(), context.run().arg("--group").arg("foo").arg("--group").arg("bar").arg("--no-project").arg("main.py"), @r" + uv_snapshot!(context.filters(), context.run().arg("--group").arg("foo").arg("--group").arg("bar").arg("--no-project").arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -2109,7 +2109,7 @@ fn run_group() -> Result<()> { warning: `--group` has no effect when used alongside `--no-project` "); - uv_snapshot!(context.filters(), context.run().arg("--group").arg("dev").arg("--no-project").arg("main.py"), @r###" + uv_snapshot!(context.filters(), context.run().arg("--group").arg("dev").arg("--no-project").arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -2119,9 +2119,9 @@ fn run_group() -> Result<()> { ----- stderr ----- warning: `--group dev` has no effect when used alongside `--no-project` - "###); + "); - uv_snapshot!(context.filters(), context.run().arg("--all-groups").arg("--no-project").arg("main.py"), @r###" + uv_snapshot!(context.filters(), context.run().arg("--all-groups").arg("--no-project").arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -2131,9 +2131,9 @@ fn run_group() -> Result<()> { ----- stderr ----- warning: `--all-groups` has no effect when used alongside `--no-project` - "###); + "); - uv_snapshot!(context.filters(), context.run().arg("--dev").arg("--no-project").arg("main.py"), @r###" + uv_snapshot!(context.filters(), context.run().arg("--dev").arg("--no-project").arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -2143,7 +2143,7 @@ fn run_group() -> Result<()> { ----- stderr ----- warning: `--dev` has no effect when used alongside `--no-project` - "###); + "); Ok(()) } @@ -2168,14 +2168,14 @@ fn run_locked() -> Result<()> { )?; // Running with `--locked` should error, if no lockfile is present. - uv_snapshot!(context.filters(), context.run().arg("--locked").arg("--").arg("python").arg("--version"), @r###" + uv_snapshot!(context.filters(), context.run().arg("--locked").arg("--").arg("python").arg("--version"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: Unable to find lockfile at `uv.lock`, but `--locked` was provided. To create a lockfile, run `uv lock` or `uv sync` without the flag. - "###); + "); // Lock the initial requirements. context.lock().assert().success(); @@ -2255,7 +2255,7 @@ fn run_locked() -> Result<()> { )?; // Running with `--locked` should error. - uv_snapshot!(context.filters(), context.run().arg("--locked").arg("--").arg("python").arg("--version"), @r###" + uv_snapshot!(context.filters(), context.run().arg("--locked").arg("--").arg("python").arg("--version"), @" success: false exit_code: 2 ----- stdout ----- @@ -2263,7 +2263,7 @@ fn run_locked() -> Result<()> { ----- stderr ----- Resolved 2 packages in [TIME] error: The lockfile at `uv.lock` needs to be updated, but `--locked` was provided. To update the lockfile, run `uv lock`. - "###); + "); let updated = context.read("uv.lock"); @@ -2271,7 +2271,7 @@ fn run_locked() -> Result<()> { assert_eq!(existing, updated); // Lock the updated requirements. - uv_snapshot!(context.lock(), @r###" + uv_snapshot!(context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -2282,20 +2282,20 @@ fn run_locked() -> Result<()> { Removed idna v3.6 Added iniconfig v2.0.0 Removed sniffio v1.3.1 - "###); + "); // Lock the updated requirements. - uv_snapshot!(context.lock(), @r###" + uv_snapshot!(context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); // Running with `--locked` should succeed. - uv_snapshot!(context.filters(), context.run().arg("--locked").arg("--").arg("python").arg("--version"), @r###" + uv_snapshot!(context.filters(), context.run().arg("--locked").arg("--").arg("python").arg("--version"), @" success: true exit_code: 0 ----- stdout ----- @@ -2307,7 +2307,7 @@ fn run_locked() -> Result<()> { Installed 2 packages in [TIME] + iniconfig==2.0.0 + project==0.1.0 (from file://[TEMP_DIR]/) - "###); + "); Ok(()) } @@ -2332,14 +2332,14 @@ fn run_frozen() -> Result<()> { )?; // Running with `--frozen` should error, if no lockfile is present. - uv_snapshot!(context.filters(), context.run().arg("--frozen").arg("--").arg("python").arg("--version"), @r###" + uv_snapshot!(context.filters(), context.run().arg("--frozen").arg("--").arg("python").arg("--version"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: Unable to find lockfile at `uv.lock`, but `--frozen` was provided. To create a lockfile, run `uv lock` or `uv sync` without the flag. - "###); + "); context.lock().assert().success(); @@ -2359,7 +2359,7 @@ fn run_frozen() -> Result<()> { )?; // Running with `--frozen` should install the stale lockfile. - uv_snapshot!(context.filters(), context.run().arg("--frozen").arg("--").arg("python").arg("--version"), @r###" + uv_snapshot!(context.filters(), context.run().arg("--frozen").arg("--").arg("python").arg("--version"), @" success: true exit_code: 0 ----- stdout ----- @@ -2372,7 +2372,7 @@ fn run_frozen() -> Result<()> { + idna==3.6 + project==0.1.0 (from file://[TEMP_DIR]/) + sniffio==1.3.1 - "###); + "); Ok(()) } @@ -2397,38 +2397,38 @@ fn run_no_sync() -> Result<()> { )?; // Running with `--no-sync` should succeed error, even if the lockfile isn't present. - uv_snapshot!(context.filters(), context.run().arg("--no-sync").arg("--").arg("python").arg("--version"), @r###" + uv_snapshot!(context.filters(), context.run().arg("--no-sync").arg("--").arg("python").arg("--version"), @" success: true exit_code: 0 ----- stdout ----- Python 3.12.[X] ----- stderr ----- - "###); + "); context.lock().assert().success(); // Running with `--no-sync` should not install any requirements. - uv_snapshot!(context.filters(), context.run().arg("--no-sync").arg("--").arg("python").arg("--version"), @r###" + uv_snapshot!(context.filters(), context.run().arg("--no-sync").arg("--").arg("python").arg("--version"), @" success: true exit_code: 0 ----- stdout ----- Python 3.12.[X] ----- stderr ----- - "###); + "); context.sync().assert().success(); // But it should have access to the installed packages. - uv_snapshot!(context.filters(), context.run().arg("--no-sync").arg("--").arg("python").arg("-c").arg("import anyio; print(anyio.__name__)"), @r###" + uv_snapshot!(context.filters(), context.run().arg("--no-sync").arg("--").arg("python").arg("-c").arg("import anyio; print(anyio.__name__)"), @" success: true exit_code: 0 ----- stdout ----- anyio ----- stderr ----- - "###); + "); Ok(()) } @@ -2456,38 +2456,38 @@ fn run_no_sync_env_var() -> Result<()> { )?; // Running with `UV_NO_SYNC=1` should succeed, even if the lockfile isn't present. - uv_snapshot!(context.filters(), context.run().env(EnvVars::UV_NO_SYNC, "1").arg("--").arg("python").arg("--version"), @r###" + uv_snapshot!(context.filters(), context.run().env(EnvVars::UV_NO_SYNC, "1").arg("--").arg("python").arg("--version"), @" success: true exit_code: 0 ----- stdout ----- Python 3.12.[X] ----- stderr ----- - "###); + "); context.lock().assert().success(); // Running with `UV_NO_SYNC=1` should not install any requirements. - uv_snapshot!(context.filters(), context.run().env(EnvVars::UV_NO_SYNC, "1").arg("--").arg("python").arg("--version"), @r###" + uv_snapshot!(context.filters(), context.run().env(EnvVars::UV_NO_SYNC, "1").arg("--").arg("python").arg("--version"), @" success: true exit_code: 0 ----- stdout ----- Python 3.12.[X] ----- stderr ----- - "###); + "); context.sync().assert().success(); // But it should have access to the installed packages. - uv_snapshot!(context.filters(), context.run().env(EnvVars::UV_NO_SYNC, "1").arg("--").arg("python").arg("-c").arg("import anyio; print(anyio.__name__)"), @r###" + uv_snapshot!(context.filters(), context.run().env(EnvVars::UV_NO_SYNC, "1").arg("--").arg("python").arg("-c").arg("import anyio; print(anyio.__name__)"), @" success: true exit_code: 0 ----- stdout ----- anyio ----- stderr ----- - "###); + "); Ok(()) } @@ -2521,7 +2521,7 @@ fn run_empty_requirements_txt() -> Result<()> { requirements_txt.touch()?; // The project environment is synced on the first invocation. - uv_snapshot!(context.filters(), context.run().arg("--with-requirements").arg(requirements_txt.as_os_str()).arg("main.py"), @r###" + uv_snapshot!(context.filters(), context.run().arg("--with-requirements").arg(requirements_txt.as_os_str()).arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -2535,10 +2535,10 @@ fn run_empty_requirements_txt() -> Result<()> { + idna==3.6 + sniffio==1.3.1 warning: Requirements file `requirements.txt` does not contain any dependencies - "###); + "); // Then reused in subsequent invocations - uv_snapshot!(context.filters(), context.run().arg("--with-requirements").arg(requirements_txt.as_os_str()).arg("main.py"), @r###" + uv_snapshot!(context.filters(), context.run().arg("--with-requirements").arg(requirements_txt.as_os_str()).arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -2547,7 +2547,7 @@ fn run_empty_requirements_txt() -> Result<()> { Resolved 6 packages in [TIME] Audited 4 packages in [TIME] warning: Requirements file `requirements.txt` does not contain any dependencies - "###); + "); Ok(()) } @@ -2580,7 +2580,7 @@ fn run_requirements_txt() -> Result<()> { let requirements_txt = context.temp_dir.child("requirements.txt"); requirements_txt.write_str("iniconfig")?; - uv_snapshot!(context.filters(), context.run().arg("--with-requirements").arg(requirements_txt.as_os_str()).arg("main.py"), @r###" + uv_snapshot!(context.filters(), context.run().arg("--with-requirements").arg(requirements_txt.as_os_str()).arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -2597,12 +2597,12 @@ fn run_requirements_txt() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + iniconfig==2.0.0 - "###); + "); // Requesting a satisfied requirement should use the base environment. requirements_txt.write_str("sniffio")?; - uv_snapshot!(context.filters(), context.run().arg("--with-requirements").arg(requirements_txt.as_os_str()).arg("main.py"), @r###" + uv_snapshot!(context.filters(), context.run().arg("--with-requirements").arg(requirements_txt.as_os_str()).arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -2610,12 +2610,12 @@ fn run_requirements_txt() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] Audited 4 packages in [TIME] - "###); + "); // Unless the user requests a different version. requirements_txt.write_str("sniffio<1.3.1")?; - uv_snapshot!(context.filters(), context.run().arg("--with-requirements").arg(requirements_txt.as_os_str()).arg("main.py"), @r###" + uv_snapshot!(context.filters(), context.run().arg("--with-requirements").arg(requirements_txt.as_os_str()).arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -2627,7 +2627,7 @@ fn run_requirements_txt() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + sniffio==1.3.0 - "###); + "); // Or includes an unsatisfied requirement via `--with`. requirements_txt.write_str("sniffio")?; @@ -2637,7 +2637,7 @@ fn run_requirements_txt() -> Result<()> { .arg(requirements_txt.as_os_str()) .arg("--with") .arg("iniconfig") - .arg("main.py"), @r###" + .arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -2649,7 +2649,7 @@ fn run_requirements_txt() -> Result<()> { Installed 2 packages in [TIME] + iniconfig==2.0.0 + sniffio==1.3.1 - "###); + "); // Allow `-` for stdin. uv_snapshot!(context.filters(), context.run() @@ -2658,7 +2658,7 @@ fn run_requirements_txt() -> Result<()> { .arg("--with") .arg("iniconfig") .arg("main.py") - .stdin(std::fs::File::open(&requirements_txt)?), @r###" + .stdin(std::fs::File::open(&requirements_txt)?), @" success: true exit_code: 0 ----- stdout ----- @@ -2667,7 +2667,7 @@ fn run_requirements_txt() -> Result<()> { Resolved 6 packages in [TIME] Audited 4 packages in [TIME] Resolved 2 packages in [TIME] - "###); + "); // But not in combination with reading the script from stdin uv_snapshot!(context.filters(), context.run() @@ -2675,28 +2675,28 @@ fn run_requirements_txt() -> Result<()> { .arg("-") // The script to run .arg("-") - .stdin(std::fs::File::open(&requirements_txt)?), @r###" + .stdin(std::fs::File::open(&requirements_txt)?), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: Cannot read both requirements file and script from stdin - "###); + "); uv_snapshot!(context.filters(), context.run() .arg("--with-requirements") .arg("-") .arg("--script") .arg("-") - .stdin(std::fs::File::open(&requirements_txt)?), @r###" + .stdin(std::fs::File::open(&requirements_txt)?), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: Cannot read both requirements file and script from stdin - "###); + "); Ok(()) } @@ -2734,7 +2734,7 @@ fn run_requirements_txt_arguments() -> Result<()> { " })?; - uv_snapshot!(context.filters(), context.run().arg("--with-requirements").arg(requirements_txt.as_os_str()).arg("main.py"), @r###" + uv_snapshot!(context.filters(), context.run().arg("--with-requirements").arg(requirements_txt.as_os_str()).arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -2750,7 +2750,7 @@ fn run_requirements_txt_arguments() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + idna==3.6 - "###); + "); Ok(()) } @@ -2788,7 +2788,7 @@ fn run_editable() -> Result<()> { })?; // We treat arguments before the command as uv arguments - uv_snapshot!(context.filters(), context.run().arg("--with").arg("iniconfig").arg("main.py"), @r###" + uv_snapshot!(context.filters(), context.run().arg("--with").arg("iniconfig").arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -2803,7 +2803,7 @@ fn run_editable() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + iniconfig==2.0.0 - "###); + "); Ok(()) } @@ -2861,7 +2861,7 @@ fn run_from_directory() -> Result<()> { // Use `--project`, which resolves configuration relative to the provided directory, but paths // relative to the current working directory. - uv_snapshot!(filters.clone(), context.run().arg("--project").arg("project").arg("main"), @r###" + uv_snapshot!(filters.clone(), context.run().arg("--project").arg("project").arg("main"), @" success: true exit_code: 0 ----- stdout ----- @@ -2875,10 +2875,10 @@ fn run_from_directory() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + foo==1.0.0 (from file://[TEMP_DIR]/project) - "###); + "); fs_err::remove_dir_all(context.temp_dir.join("project").join(".venv"))?; - uv_snapshot!(filters.clone(), context.run().arg("--project").arg("project").arg("./project/main.py"), @r###" + uv_snapshot!(filters.clone(), context.run().arg("--project").arg("project").arg("./project/main.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -2890,11 +2890,11 @@ fn run_from_directory() -> Result<()> { Resolved 1 package in [TIME] Installed 1 package in [TIME] + foo==1.0.0 (from file://[TEMP_DIR]/project) - "###); + "); // Use `--directory`, which switches to the provided directory entirely. fs_err::remove_dir_all(context.temp_dir.join("project").join(".venv"))?; - uv_snapshot!(filters.clone(), context.run().arg("--directory").arg("project").arg("main"), @r###" + uv_snapshot!(filters.clone(), context.run().arg("--directory").arg("project").arg("main"), @" success: true exit_code: 0 ----- stdout ----- @@ -2907,10 +2907,10 @@ fn run_from_directory() -> Result<()> { Resolved 1 package in [TIME] Installed 1 package in [TIME] + foo==1.0.0 (from file://[TEMP_DIR]/project) - "###); + "); fs_err::remove_dir_all(context.temp_dir.join("project").join(".venv"))?; - uv_snapshot!(filters.clone(), context.run().arg("--directory").arg("project").arg("./main.py"), @r###" + uv_snapshot!(filters.clone(), context.run().arg("--directory").arg("project").arg("./main.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -2922,10 +2922,10 @@ fn run_from_directory() -> Result<()> { Resolved 1 package in [TIME] Installed 1 package in [TIME] + foo==1.0.0 (from file://[TEMP_DIR]/project) - "###); + "); fs_err::remove_dir_all(context.temp_dir.join("project").join(".venv"))?; - uv_snapshot!(filters.clone(), context.run().arg("--directory").arg("project").arg("./project/main.py"), @r###" + uv_snapshot!(filters.clone(), context.run().arg("--directory").arg("project").arg("./project/main.py"), @" success: false exit_code: 2 ----- stdout ----- @@ -2939,7 +2939,7 @@ fn run_from_directory() -> Result<()> { + foo==1.0.0 (from file://[TEMP_DIR]/project) error: Failed to spawn: `./project/main.py` Caused by: [OS ERROR 2] - "###); + "); // Even if we write a `.python-version` file in the current directory, we should prefer the // one in the project directory in both cases. @@ -2953,7 +2953,7 @@ fn run_from_directory() -> Result<()> { .write_str("3.10")?; fs_err::remove_dir_all(context.temp_dir.join("project").join(".venv"))?; - uv_snapshot!(filters.clone(), context.run().arg("--project").arg("project").arg("main"), @r###" + uv_snapshot!(filters.clone(), context.run().arg("--project").arg("project").arg("main"), @" success: true exit_code: 0 ----- stdout ----- @@ -2966,10 +2966,10 @@ fn run_from_directory() -> Result<()> { Resolved 1 package in [TIME] Installed 1 package in [TIME] + foo==1.0.0 (from file://[TEMP_DIR]/project) - "###); + "); fs_err::remove_dir_all(context.temp_dir.join("project").join(".venv"))?; - uv_snapshot!(filters.clone(), context.run().arg("--directory").arg("project").arg("main"), @r###" + uv_snapshot!(filters.clone(), context.run().arg("--directory").arg("project").arg("main"), @" success: true exit_code: 0 ----- stdout ----- @@ -2982,7 +2982,7 @@ fn run_from_directory() -> Result<()> { Resolved 1 package in [TIME] Installed 1 package in [TIME] + foo==1.0.0 (from file://[TEMP_DIR]/project) - "###); + "); Ok(()) } @@ -3013,7 +3013,7 @@ fn run_without_output() -> Result<()> { })?; // On the first run, we only show the summary line for each environment. - uv_snapshot!(context.filters(), context.run().env_remove(EnvVars::UV_SHOW_RESOLUTION).arg("--with").arg("iniconfig").arg("main.py"), @r###" + uv_snapshot!(context.filters(), context.run().env_remove(EnvVars::UV_SHOW_RESOLUTION).arg("--with").arg("iniconfig").arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -3021,16 +3021,16 @@ fn run_without_output() -> Result<()> { ----- stderr ----- Installed 4 packages in [TIME] Installed 1 package in [TIME] - "###); + "); // Subsequent runs are quiet. - uv_snapshot!(context.filters(), context.run().env_remove(EnvVars::UV_SHOW_RESOLUTION).arg("--with").arg("iniconfig").arg("main.py"), @r###" + uv_snapshot!(context.filters(), context.run().env_remove(EnvVars::UV_SHOW_RESOLUTION).arg("--with").arg("iniconfig").arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- - "###); + "); Ok(()) } @@ -3068,7 +3068,7 @@ fn run_isolated_python_version() -> Result<()> { " })?; - uv_snapshot!(context.filters(), context.run().arg("main.py"), @r###" + uv_snapshot!(context.filters(), context.run().arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -3086,9 +3086,9 @@ fn run_isolated_python_version() -> Result<()> { + idna==3.6 + sniffio==1.3.1 + typing-extensions==4.10.0 - "###); + "); - uv_snapshot!(context.filters(), context.run().arg("--isolated").arg("main.py"), @r###" + uv_snapshot!(context.filters(), context.run().arg("--isolated").arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -3103,7 +3103,7 @@ fn run_isolated_python_version() -> Result<()> { + idna==3.6 + sniffio==1.3.1 + typing-extensions==4.10.0 - "###); + "); // Set the `.python-version` to `3.12`. context @@ -3111,7 +3111,7 @@ fn run_isolated_python_version() -> Result<()> { .child(PYTHON_VERSION_FILENAME) .write_str("3.12")?; - uv_snapshot!(context.filters(), context.run().arg("--isolated").arg("main.py"), @r###" + uv_snapshot!(context.filters(), context.run().arg("--isolated").arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -3124,7 +3124,7 @@ fn run_isolated_python_version() -> Result<()> { + foo==1.0.0 (from file://[TEMP_DIR]/) + idna==3.6 + sniffio==1.3.1 - "###); + "); Ok(()) } @@ -3158,7 +3158,7 @@ fn run_no_project() -> Result<()> { init.touch()?; // `run` should run in the context of the project. - uv_snapshot!(context.filters(), context.run().arg("python").arg("-c").arg("import sys; print(sys.executable)"), @r" + uv_snapshot!(context.filters(), context.run().arg("python").arg("-c").arg("import sys; print(sys.executable)"), @" success: true exit_code: 0 ----- stdout ----- @@ -3176,7 +3176,7 @@ fn run_no_project() -> Result<()> { // `run --no-project` should not (but it should still run in the same environment, as it would // if there were no project at all). - uv_snapshot!(context.filters(), context.run().arg("--no-project").arg("python").arg("-c").arg("import sys; print(sys.executable)"), @r" + uv_snapshot!(context.filters(), context.run().arg("--no-project").arg("python").arg("-c").arg("import sys; print(sys.executable)"), @" success: true exit_code: 0 ----- stdout ----- @@ -3186,7 +3186,7 @@ fn run_no_project() -> Result<()> { "); // `run --no-project --isolated` should run in an entirely isolated environment. - uv_snapshot!(context.filters(), context.run().arg("--no-project").arg("--isolated").arg("python").arg("-c").arg("import sys; print(sys.executable)"), @r" + uv_snapshot!(context.filters(), context.run().arg("--no-project").arg("--isolated").arg("python").arg("-c").arg("import sys; print(sys.executable)"), @" success: true exit_code: 0 ----- stdout ----- @@ -3197,7 +3197,7 @@ fn run_no_project() -> Result<()> { // `run --no-project` should not (but it should still run in the same environment, as it would // if there were no project at all). - uv_snapshot!(context.filters(), context.run().arg("--no-project").arg("python").arg("-c").arg("import sys; print(sys.executable)"), @r" + uv_snapshot!(context.filters(), context.run().arg("--no-project").arg("python").arg("-c").arg("import sys; print(sys.executable)"), @" success: true exit_code: 0 ----- stdout ----- @@ -3207,7 +3207,7 @@ fn run_no_project() -> Result<()> { "); // `run --no-project --locked` should fail. - uv_snapshot!(context.filters(), context.run().arg("--no-project").arg("--locked").arg("python").arg("-c").arg("import sys; print(sys.executable)"), @r" + uv_snapshot!(context.filters(), context.run().arg("--no-project").arg("--locked").arg("python").arg("-c").arg("import sys; print(sys.executable)"), @" success: true exit_code: 0 ----- stdout ----- @@ -3232,14 +3232,14 @@ fn run_stdin() -> Result<()> { let mut command = context.run(); let command_with_args = command.stdin(std::fs::File::open(test_script)?).arg("-"); - uv_snapshot!(context.filters(), command_with_args, @r###" + uv_snapshot!(context.filters(), command_with_args, @" success: true exit_code: 0 ----- stdout ----- Hello, world! ----- stderr ----- - "###); + "); Ok(()) } @@ -3254,14 +3254,14 @@ fn run_package() -> Result<()> { "# })?; - uv_snapshot!(context.filters(), context.run().arg("."), @r###" + uv_snapshot!(context.filters(), context.run().arg("."), @" success: true exit_code: 0 ----- stdout ----- Hello, world! ----- stderr ----- - "###); + "); Ok(()) } @@ -3293,14 +3293,14 @@ fn run_zipapp() -> Result<()> { assert!(status.success()); // Run the zipapp. - uv_snapshot!(context.filters(), context.run().arg(zipapp.as_ref()), @r###" + uv_snapshot!(context.filters(), context.run().arg(zipapp.as_ref()), @" success: true exit_code: 0 ----- stdout ----- Hello, world! ----- stderr ----- - "###); + "); Ok(()) } @@ -3309,14 +3309,14 @@ fn run_zipapp() -> Result<()> { fn run_stdin_args() { let context = TestContext::new("3.12"); - uv_snapshot!(context.filters(), context.run().arg("python").arg("-c").arg("import sys; print(sys.argv)").arg("foo").arg("bar"), @r###" + uv_snapshot!(context.filters(), context.run().arg("python").arg("-c").arg("import sys; print(sys.argv)").arg("foo").arg("bar"), @" success: true exit_code: 0 ----- stdout ----- ['-c', 'foo', 'bar'] ----- stderr ----- - "###); + "); } /// Run a module equivalent to `python -m foo`. @@ -3324,16 +3324,16 @@ fn run_stdin_args() { fn run_module() { let context = TestContext::new("3.12"); - uv_snapshot!(context.filters(), context.run().arg("-m").arg("__hello__"), @r#" + uv_snapshot!(context.filters(), context.run().arg("-m").arg("__hello__"), @" success: true exit_code: 0 ----- stdout ----- Hello world! ----- stderr ----- - "#); + "); - uv_snapshot!(context.filters(), context.run().arg("-m").arg("http.server").arg("-h"), @r#" + uv_snapshot!(context.filters(), context.run().arg("-m").arg("http.server").arg("-h"), @" success: true exit_code: 0 ----- stdout ----- @@ -3353,21 +3353,21 @@ fn run_module() { conform to this HTTP version (default: HTTP/1.0) ----- stderr ----- - "#); + "); } #[test] fn run_module_stdin() { let context = TestContext::new("3.12"); - uv_snapshot!(context.filters(), context.run().arg("-m").arg("-"), @r###" + uv_snapshot!(context.filters(), context.run().arg("-m").arg("-"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: Cannot run a Python module from stdin - "###); + "); } /// Test for how run reacts to a pyproject.toml without a `[project]` @@ -3389,7 +3389,7 @@ fn virtual_empty() -> Result<()> { init.touch()?; // `run` should work fine - uv_snapshot!(context.filters(), context.run().arg("python").arg("-c").arg("import sys; print(sys.executable)"), @r" + uv_snapshot!(context.filters(), context.run().arg("python").arg("-c").arg("import sys; print(sys.executable)"), @" success: true exit_code: 0 ----- stdout ----- @@ -3402,14 +3402,14 @@ fn virtual_empty() -> Result<()> { "); // `run --no-project` should also work fine - uv_snapshot!(context.filters(), context.run().arg("--no-project").arg("python").arg("-c").arg("import sys; print(sys.executable)"), @r###" + uv_snapshot!(context.filters(), context.run().arg("--no-project").arg("python").arg("-c").arg("import sys; print(sys.executable)"), @" success: true exit_code: 0 ----- stdout ----- [VENV]/[BIN]/[PYTHON] ----- stderr ----- - "###); + "); Ok(()) } @@ -3445,7 +3445,7 @@ fn run_isolated_incompatible_python() -> Result<()> { })?; // We should reject Python 3.9... - uv_snapshot!(context.filters(), context.run().arg("main.py"), @r" + uv_snapshot!(context.filters(), context.run().arg("main.py"), @" success: false exit_code: 2 ----- stdout ----- @@ -3457,7 +3457,7 @@ fn run_isolated_incompatible_python() -> Result<()> { "); // ...even if `--isolated` is provided. - uv_snapshot!(context.filters(), context.run().arg("--isolated").arg("main.py"), @r" + uv_snapshot!(context.filters(), context.run().arg("--isolated").arg("main.py"), @" success: false exit_code: 2 ----- stdout ----- @@ -3499,7 +3499,7 @@ fn run_isolated_does_not_modify_lock() -> Result<()> { // Run with --isolated uv_snapshot!(context.filters(), context.run() .arg("--isolated") - .arg("main.py"), @r" + .arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -3522,7 +3522,7 @@ fn run_isolated_does_not_modify_lock() -> Result<()> { .assert(predicate::path::missing()); // Create initial lock with default resolution - uv_snapshot!(context.filters(), context.run().arg("main.py"), @r" + uv_snapshot!(context.filters(), context.run().arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -3546,7 +3546,7 @@ fn run_isolated_does_not_modify_lock() -> Result<()> { .arg("--isolated") .arg("--resolution") .arg("lowest-direct") - .arg("main.py"), @r" + .arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -3603,7 +3603,7 @@ fn run_isolated_with_frozen() -> Result<()> { uv_snapshot!(context.filters(), context.run() .arg("--resolution") .arg("lowest-direct") - .arg("main.py"), @r" + .arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -3624,7 +3624,7 @@ fn run_isolated_with_frozen() -> Result<()> { uv_snapshot!(context.filters(), context.run() .arg("--isolated") .arg("--frozen") - .arg("main.py"), @r" + .arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -3653,14 +3653,14 @@ fn run_compiled_python_file() -> Result<()> { })?; // Run a non-PEP 723 script. - uv_snapshot!(context.filters(), context.run().arg("main.py"), @r###" + uv_snapshot!(context.filters(), context.run().arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- Hello, world! ----- stderr ----- - "###); + "); let compile_output = context .run() @@ -3677,14 +3677,14 @@ fn run_compiled_python_file() -> Result<()> { // Run the compiled non-PEP 723 script. let compiled_non_script = context.temp_dir.child("__pycache__/main.cpython-312.pyc"); - uv_snapshot!(context.filters(), context.run().arg(compiled_non_script.path()), @r###" + uv_snapshot!(context.filters(), context.run().arg(compiled_non_script.path()), @" success: true exit_code: 0 ----- stdout ----- Hello, world! ----- stderr ----- - "###); + "); // If the script contains a PEP 723 tag, we should install its requirements. let test_script = context.temp_dir.child("script.py"); @@ -3699,7 +3699,7 @@ fn run_compiled_python_file() -> Result<()> { "# })?; - uv_snapshot!(context.filters(), context.run().arg("script.py"), @r###" + uv_snapshot!(context.filters(), context.run().arg("script.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -3709,7 +3709,7 @@ fn run_compiled_python_file() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + iniconfig==2.0.0 - "###); + "); // Compile the PEP 723 script. let compile_output = context @@ -3727,7 +3727,7 @@ fn run_compiled_python_file() -> Result<()> { // Run the compiled PEP 723 script. This fails, since we can't read the script tag. let compiled_script = context.temp_dir.child("__pycache__/script.cpython-312.pyc"); - uv_snapshot!(context.filters(), context.run().arg(compiled_script.path()), @r###" + uv_snapshot!(context.filters(), context.run().arg(compiled_script.path()), @r#" success: false exit_code: 1 ----- stdout ----- @@ -3737,7 +3737,7 @@ fn run_compiled_python_file() -> Result<()> { File "[TEMP_DIR]/script.py", line 7, in import iniconfig ModuleNotFoundError: No module named 'iniconfig' - "###); + "#); Ok(()) } @@ -3782,7 +3782,7 @@ fn run_invalid_project_table() -> Result<()> { "# })?; - uv_snapshot!(context.filters(), context.run().arg("main.py"), @r###" + uv_snapshot!(context.filters(), context.run().arg("main.py"), @" success: false exit_code: 2 ----- stdout ----- @@ -3794,7 +3794,7 @@ fn run_invalid_project_table() -> Result<()> { 1 | [project.urls] | ^^^^^^^ `pyproject.toml` is using the `[project]` table, but the required `project.name` field is not set - "###); + "); Ok(()) } @@ -3826,7 +3826,7 @@ fn run_script_without_build_system() -> Result<()> { // TODO(lucab): this should match `entry` and warn // - uv_snapshot!(context.filters(), context.run().arg("entry"), @r###" + uv_snapshot!(context.filters(), context.run().arg("entry"), @" success: false exit_code: 2 ----- stdout ----- @@ -3836,7 +3836,7 @@ fn run_script_without_build_system() -> Result<()> { Audited in [TIME] error: Failed to spawn: `entry` Caused by: No such file or directory (os error 2) - "###); + "); Ok(()) } @@ -3869,7 +3869,7 @@ fn run_script_module_conflict() -> Result<()> { "# })?; - uv_snapshot!(context.filters(), context.run().arg("foo"), @r###" + uv_snapshot!(context.filters(), context.run().arg("foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -3880,7 +3880,7 @@ fn run_script_module_conflict() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + foo==0.1.0 (from file://[TEMP_DIR]/) - "###); + "); // Creating `__main__` should not change the behavior, the entrypoint should take precedence let main = context.temp_dir.child("src/foo/__main__.py"); @@ -3889,7 +3889,7 @@ fn run_script_module_conflict() -> Result<()> { "# })?; - uv_snapshot!(context.filters(), context.run().arg("foo"), @r###" + uv_snapshot!(context.filters(), context.run().arg("foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -3898,10 +3898,10 @@ fn run_script_module_conflict() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] Audited 1 package in [TIME] - "###); + "); // Even if the working directory is `src` - uv_snapshot!(context.filters(), context.run().arg("--directory").arg("src").arg("foo"), @r###" + uv_snapshot!(context.filters(), context.run().arg("--directory").arg("src").arg("foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -3910,10 +3910,10 @@ fn run_script_module_conflict() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] Audited 1 package in [TIME] - "###); + "); // Unless the user opts-in to module running with `-m` - uv_snapshot!(context.filters(), context.run().arg("-m").arg("foo"), @r###" + uv_snapshot!(context.filters(), context.run().arg("-m").arg("foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -3922,7 +3922,7 @@ fn run_script_module_conflict() -> Result<()> { ----- stderr ----- Resolved 1 package in [TIME] Audited 1 package in [TIME] - "###); + "); Ok(()) } @@ -3944,7 +3944,7 @@ fn run_script_explicit() -> Result<()> { "# })?; - uv_snapshot!(context.filters(), context.run().arg("--script").arg("script"), @r###" + uv_snapshot!(context.filters(), context.run().arg("--script").arg("script"), @" success: true exit_code: 0 ----- stdout ----- @@ -3955,7 +3955,7 @@ fn run_script_explicit() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + iniconfig==2.0.0 - "###); + "); Ok(()) } @@ -3977,7 +3977,7 @@ fn run_script_explicit_stdin() -> Result<()> { "# })?; - uv_snapshot!(context.filters(), context.run().arg("--script").arg("-").stdin(std::fs::File::open(test_script)?), @r###" + uv_snapshot!(context.filters(), context.run().arg("--script").arg("-").stdin(std::fs::File::open(test_script)?), @" success: true exit_code: 0 ----- stdout ----- @@ -3988,7 +3988,7 @@ fn run_script_explicit_stdin() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + iniconfig==2.0.0 - "###); + "); Ok(()) } @@ -4012,14 +4012,14 @@ fn run_script_explicit_directory() -> Result<()> { fs_err::create_dir(context.temp_dir.child("script"))?; - uv_snapshot!(context.filters(), context.run().arg("--script").arg("script"), @r###" + uv_snapshot!(context.filters(), context.run().arg("--script").arg("script"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: failed to read from file `script`: Is a directory (os error 21) - "###); + "); Ok(()) } @@ -4109,14 +4109,14 @@ fn run_gui_script_explicit_unix() -> Result<()> { print(f"Using executable: {executable}", file=sys.stderr) "#})?; - uv_snapshot!(context.filters(), context.run().arg("--gui-script").arg("script"), @r###" + uv_snapshot!(context.filters(), context.run().arg("--gui-script").arg("script"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Using executable: python - "###); + "); Ok(()) } @@ -4146,7 +4146,7 @@ fn run_linked_environment_path() -> Result<()> { // Running `uv sync` should use the environment at `target`` uv_snapshot!(context.filters(), context.sync() - .env(EnvVars::UV_PROJECT_ENVIRONMENT, "target"), @r" + .env(EnvVars::UV_PROJECT_ENVIRONMENT, "target"), @" success: true exit_code: 0 ----- stdout ----- @@ -4167,7 +4167,7 @@ fn run_linked_environment_path() -> Result<()> { uv_snapshot!(context.filters(), context.run() .env_remove(EnvVars::VIRTUAL_ENV) // Ignore the test context's active virtual environment .env(EnvVars::UV_PROJECT_ENVIRONMENT, "target") - .arg("python").arg("-c").arg("import sys; print(sys.prefix); print(sys.executable)"), @r" + .arg("python").arg("-c").arg("import sys; print(sys.prefix); print(sys.executable)"), @" success: true exit_code: 0 ----- stdout ----- @@ -4185,7 +4185,7 @@ fn run_linked_environment_path() -> Result<()> { filters => context.filters(), }, { assert_snapshot!( - black_entrypoint, @r##" + black_entrypoint, @r#" #![TEMP_DIR]/target/[BIN]/[PYTHON] # -*- coding: utf-8 -*- import sys @@ -4196,7 +4196,7 @@ fn run_linked_environment_path() -> Result<()> { elif sys.argv[0].endswith(".exe"): sys.argv[0] = sys.argv[0][:-4] sys.exit(patched_main()) - "## + "# ); }); @@ -4223,7 +4223,7 @@ fn run_active_project_environment() -> Result<()> { // Running `uv run` with `VIRTUAL_ENV` should warn uv_snapshot!(context.filters(), context.run() .arg("python").arg("--version") - .env(EnvVars::VIRTUAL_ENV, "foo"), @r###" + .env(EnvVars::VIRTUAL_ENV, "foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -4237,13 +4237,13 @@ fn run_active_project_environment() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + iniconfig==2.0.0 - "###); + "); // Using `--no-active` should silence the warning uv_snapshot!(context.filters(), context.run() .arg("--no-active") .arg("python").arg("--version") - .env(EnvVars::VIRTUAL_ENV, "foo"), @r###" + .env(EnvVars::VIRTUAL_ENV, "foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -4252,7 +4252,7 @@ fn run_active_project_environment() -> Result<()> { ----- stderr ----- Resolved 2 packages in [TIME] Audited 1 package in [TIME] - "###); + "); context .temp_dir @@ -4268,7 +4268,7 @@ fn run_active_project_environment() -> Result<()> { uv_snapshot!(context.filters(), context.run() .arg("--active") .arg("python").arg("--version") - .env(EnvVars::VIRTUAL_ENV, "foo"), @r###" + .env(EnvVars::VIRTUAL_ENV, "foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -4280,7 +4280,7 @@ fn run_active_project_environment() -> Result<()> { Resolved 2 packages in [TIME] Installed 1 package in [TIME] + iniconfig==2.0.0 - "###); + "); context .temp_dir @@ -4292,7 +4292,7 @@ fn run_active_project_environment() -> Result<()> { .arg("--active") .arg("-p").arg("3.12") .arg("python").arg("--version") - .env(EnvVars::VIRTUAL_ENV, "foo"), @r###" + .env(EnvVars::VIRTUAL_ENV, "foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -4305,7 +4305,7 @@ fn run_active_project_environment() -> Result<()> { Resolved 2 packages in [TIME] Installed 1 package in [TIME] + iniconfig==2.0.0 - "###); + "); Ok(()) } @@ -4335,7 +4335,7 @@ fn run_active_script_environment() -> Result<()> { uv_snapshot!(context.filters(), context.run() .arg("--script") .arg("main.py") - .env(EnvVars::VIRTUAL_ENV, "foo"), @r###" + .env(EnvVars::VIRTUAL_ENV, "foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -4346,21 +4346,21 @@ fn run_active_script_environment() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + iniconfig==2.0.0 - "###); + "); // Using `--no-active` should also _not_ warn. uv_snapshot!(context.filters(), context.run() .arg("--no-active") .arg("--script") .arg("main.py") - .env(EnvVars::VIRTUAL_ENV, "foo"), @r###" + .env(EnvVars::VIRTUAL_ENV, "foo"), @" success: true exit_code: 0 ----- stdout ----- Hello, world! ----- stderr ----- - "###); + "); context .temp_dir @@ -4372,7 +4372,7 @@ fn run_active_script_environment() -> Result<()> { .arg("--active") .arg("--script") .arg("main.py") - .env(EnvVars::VIRTUAL_ENV, "foo"), @r###" + .env(EnvVars::VIRTUAL_ENV, "foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -4382,7 +4382,7 @@ fn run_active_script_environment() -> Result<()> { Resolved 1 package in [TIME] Installed 1 package in [TIME] + iniconfig==2.0.0 - "###); + "); context .temp_dir @@ -4395,7 +4395,7 @@ fn run_active_script_environment() -> Result<()> { .arg("-p").arg("3.12") .arg("--script") .arg("main.py") - .env(EnvVars::VIRTUAL_ENV, "foo"), @r###" + .env(EnvVars::VIRTUAL_ENV, "foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -4405,7 +4405,7 @@ fn run_active_script_environment() -> Result<()> { Resolved 1 package in [TIME] Installed 1 package in [TIME] + iniconfig==2.0.0 - "###); + "); Ok(()) } @@ -4428,7 +4428,7 @@ fn run_gui_script_explicit_stdin_unix() -> Result<()> { "# })?; - uv_snapshot!(context.filters(), context.run().arg("--gui-script").arg("-").stdin(std::fs::File::open(test_script)?), @r###" + uv_snapshot!(context.filters(), context.run().arg("--gui-script").arg("-").stdin(std::fs::File::open(test_script)?), @" success: true exit_code: 0 ----- stdout ----- @@ -4439,7 +4439,7 @@ fn run_gui_script_explicit_stdin_unix() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + iniconfig==2.0.0 - "###); + "); Ok(()) } @@ -4452,7 +4452,7 @@ fn run_remote_pep723_script() { r"(?m)^Downloaded remote script to:.*\.py$", "Downloaded remote script to: [TEMP_PATH].py", )); - uv_snapshot!(filters, context.run().arg("https://raw.githubusercontent.com/astral-sh/uv/df45b9ac2584824309ff29a6a09421055ad730f6/scripts/uv-run-remote-script-test.py").arg(EnvVars::CI), @r###" + uv_snapshot!(filters, context.run().arg("https://raw.githubusercontent.com/astral-sh/uv/df45b9ac2584824309ff29a6a09421055ad730f6/scripts/uv-run-remote-script-test.py").arg(EnvVars::CI), @" success: true exit_code: 0 ----- stdout ----- @@ -4466,7 +4466,7 @@ fn run_remote_pep723_script() { + mdurl==0.1.2 + pygments==2.17.2 + rich==13.7.1 - "###); + "); } #[cfg(unix)] // A URL could be a valid filepath on Unix but not on Windows @@ -4486,14 +4486,14 @@ fn run_url_like_with_local_file_priority() -> Result<()> { "# })?; - uv_snapshot!(context.filters(), context.run().arg(url), @r###" + uv_snapshot!(context.filters(), context.run().arg(url), @" success: true exit_code: 0 ----- stdout ----- Hello, world! ----- stderr ----- - "###); + "); Ok(()) } @@ -4515,7 +4515,7 @@ fn run_stdin_with_pep723() -> Result<()> { "# })?; - uv_snapshot!(context.filters(), context.run().stdin(std::fs::File::open(test_script)?).arg("-"), @r###" + uv_snapshot!(context.filters(), context.run().stdin(std::fs::File::open(test_script)?).arg("-"), @" success: true exit_code: 0 ----- stdout ----- @@ -4526,7 +4526,7 @@ fn run_stdin_with_pep723() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + iniconfig==2.0.0 - "###); + "); Ok(()) } @@ -4552,7 +4552,7 @@ fn run_with_env() -> Result<()> { " })?; - uv_snapshot!(context.filters(), context.run().arg("test.py"), @r###" + uv_snapshot!(context.filters(), context.run().arg("test.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -4562,9 +4562,9 @@ fn run_with_env() -> Result<()> { None ----- stderr ----- - "###); + "); - uv_snapshot!(context.filters(), context.run().arg("--env-file").arg(".env").arg("test.py"), @r###" + uv_snapshot!(context.filters(), context.run().arg("--env-file").arg(".env").arg("test.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -4574,7 +4574,7 @@ fn run_with_env() -> Result<()> { C3PO ----- stderr ----- - "###); + "); Ok(()) } @@ -4600,7 +4600,7 @@ fn run_with_env_file() -> Result<()> { " })?; - uv_snapshot!(context.filters(), context.run().arg("--env-file").arg(".file").arg("test.py"), @r###" + uv_snapshot!(context.filters(), context.run().arg("--env-file").arg(".file").arg("test.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -4610,7 +4610,7 @@ fn run_with_env_file() -> Result<()> { C3PO ----- stderr ----- - "###); + "); Ok(()) } @@ -4640,7 +4640,7 @@ fn run_with_multiple_env_files() -> Result<()> { " })?; - uv_snapshot!(context.filters(), context.run().arg("--env-file").arg(".env1").arg("--env-file").arg(".env2").arg("test.py"), @r###" + uv_snapshot!(context.filters(), context.run().arg("--env-file").arg(".env1").arg("--env-file").arg(".env2").arg("test.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -4649,9 +4649,9 @@ fn run_with_multiple_env_files() -> Result<()> { C3PO ----- stderr ----- - "###); + "); - uv_snapshot!(context.filters(), context.run().arg("test.py").env(EnvVars::UV_ENV_FILE, ".env1 .env2"), @r###" + uv_snapshot!(context.filters(), context.run().arg("test.py").env(EnvVars::UV_ENV_FILE, ".env1 .env2"), @" success: true exit_code: 0 ----- stdout ----- @@ -4660,7 +4660,7 @@ fn run_with_multiple_env_files() -> Result<()> { C3PO ----- stderr ----- - "###); + "); Ok(()) } @@ -4680,14 +4680,14 @@ fn run_with_env_omitted() -> Result<()> { " })?; - uv_snapshot!(context.filters(), context.run().arg("--env-file").arg(".env").arg("--no-env-file").arg("test.py"), @r###" + uv_snapshot!(context.filters(), context.run().arg("--env-file").arg(".env").arg("--no-env-file").arg("test.py"), @" success: true exit_code: 0 ----- stdout ----- None ----- stderr ----- - "###); + "); Ok(()) } @@ -4707,7 +4707,7 @@ fn run_with_malformed_env() -> Result<()> { " })?; - uv_snapshot!(context.filters(), context.run().arg("--env-file").arg(".env").arg("test.py"), @r###" + uv_snapshot!(context.filters(), context.run().arg("--env-file").arg(".env").arg("test.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -4715,7 +4715,7 @@ fn run_with_malformed_env() -> Result<()> { ----- stderr ----- warning: Failed to parse environment file `.env` at position 4: THE_^EMPIRE_VARIABLE=darth_vader - "###); + "); Ok(()) } @@ -4736,14 +4736,14 @@ fn run_with_not_existing_env_file() -> Result<()> { "error: Failed to read environment file `.env.development`: [ERR]", )); - uv_snapshot!(filters, context.run().arg("--env-file").arg(".env.development").arg("test.py"), @r###" + uv_snapshot!(filters, context.run().arg("--env-file").arg(".env.development").arg("test.py"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: No environment file found at: `.env.development` - "###); + "); Ok(()) } @@ -4779,7 +4779,7 @@ fn run_with_extra_conflict() -> Result<()> { .arg("foo") .arg("python") .arg("-c") - .arg("import iniconfig"), @r###" + .arg("import iniconfig"), @" success: true exit_code: 0 ----- stdout ----- @@ -4789,7 +4789,7 @@ fn run_with_extra_conflict() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + iniconfig==2.0.0 - "###); + "); Ok(()) } @@ -4825,7 +4825,7 @@ fn run_with_group_conflict() -> Result<()> { .arg("foo") .arg("python") .arg("-c") - .arg("import iniconfig"), @r###" + .arg("import iniconfig"), @" success: true exit_code: 0 ----- stdout ----- @@ -4835,7 +4835,7 @@ fn run_with_group_conflict() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + iniconfig==2.0.0 - "###); + "); Ok(()) } @@ -4863,7 +4863,7 @@ fn run_default_groups() -> Result<()> { context.lock().assert().success(); // Only the main dependencies and `dev` group should be installed. - uv_snapshot!(context.filters(), context.run().arg("python").arg("-c").arg("import typing_extensions"), @r" + uv_snapshot!(context.filters(), context.run().arg("python").arg("-c").arg("import typing_extensions"), @" success: true exit_code: 0 ----- stdout ----- @@ -4899,7 +4899,7 @@ fn run_default_groups() -> Result<()> { .arg("--exact") .arg("python") .arg("-c") - .arg("import typing_extensions"), @r" + .arg("import typing_extensions"), @" success: true exit_code: 0 ----- stdout ----- @@ -4919,7 +4919,7 @@ fn run_default_groups() -> Result<()> { .arg("foo") .arg("python") .arg("-c") - .arg("import typing_extensions"), @r" + .arg("import typing_extensions"), @" success: true exit_code: 0 ----- stdout ----- @@ -4939,7 +4939,7 @@ fn run_default_groups() -> Result<()> { .arg("bar") .arg("python") .arg("-c") - .arg("import iniconfig"), @r" + .arg("import iniconfig"), @" success: true exit_code: 0 ----- stdout ----- @@ -4960,7 +4960,7 @@ fn run_default_groups() -> Result<()> { .arg("--all-groups") .arg("python") .arg("-c") - .arg("import iniconfig"), @r" + .arg("import iniconfig"), @" success: true exit_code: 0 ----- stdout ----- @@ -4977,7 +4977,7 @@ fn run_default_groups() -> Result<()> { .arg("bar") .arg("python") .arg("-c") - .arg("import iniconfig"), @r" + .arg("import iniconfig"), @" success: true exit_code: 0 ----- stdout ----- @@ -4996,7 +4996,7 @@ fn run_default_groups() -> Result<()> { .arg("--all-groups") .arg("python") .arg("-c") - .arg("import iniconfig"), @r" + .arg("import iniconfig"), @" success: true exit_code: 0 ----- stdout ----- @@ -5016,7 +5016,7 @@ fn run_default_groups() -> Result<()> { .arg("--no-default-groups") .arg("python") .arg("-c") - .arg("import typing_extensions"), @r" + .arg("import typing_extensions"), @" success: true exit_code: 0 ----- stdout ----- @@ -5034,7 +5034,7 @@ fn run_default_groups() -> Result<()> { .arg("--all-groups") .arg("python") .arg("-c") - .arg("import iniconfig"), @r" + .arg("import iniconfig"), @" success: true exit_code: 0 ----- stdout ----- @@ -5059,7 +5059,7 @@ fn run_default_groups() -> Result<()> { .arg("bar") .arg("python") .arg("-c") - .arg("import typing_extensions"), @r" + .arg("import typing_extensions"), @" success: true exit_code: 0 ----- stdout ----- @@ -5103,7 +5103,7 @@ fn run_groups_requires_python() -> Result<()> { // With --no-default-groups only the main requires-python should be consulted uv_snapshot!(context.filters(), context.run() .arg("--no-default-groups") - .arg("python").arg("-c").arg("import typing_extensions"), @r" + .arg("python").arg("-c").arg("import typing_extensions"), @" success: true exit_code: 0 ----- stdout ----- @@ -5120,7 +5120,7 @@ fn run_groups_requires_python() -> Result<()> { // The main requires-python and the default group's requires-python should be consulted // (This should trigger a version bump) uv_snapshot!(context.filters(), context.run() - .arg("python").arg("-c").arg("import typing_extensions"), @r" + .arg("python").arg("-c").arg("import typing_extensions"), @" success: true exit_code: 0 ----- stdout ----- @@ -5140,7 +5140,7 @@ fn run_groups_requires_python() -> Result<()> { // (This should trigger a version bump) uv_snapshot!(context.filters(), context.run() .arg("--group").arg("bar") - .arg("python").arg("-c").arg("import typing_extensions"), @r" + .arg("python").arg("-c").arg("import typing_extensions"), @" success: true exit_code: 0 ----- stdout ----- @@ -5175,7 +5175,7 @@ fn run_groups_requires_python() -> Result<()> { // Going back to just "dev" we shouldn't churn the venv needlessly uv_snapshot!(context.filters(), context.run() - .arg("python").arg("-c").arg("import typing_extensions"), @r" + .arg("python").arg("-c").arg("import typing_extensions"), @" success: true exit_code: 0 ----- stdout ----- @@ -5188,7 +5188,7 @@ fn run_groups_requires_python() -> Result<()> { // Explicitly requesting an in-range python can downgrade uv_snapshot!(context.filters(), context.run() .arg("-p").arg("3.12") - .arg("python").arg("-c").arg("import typing_extensions"), @r" + .arg("python").arg("-c").arg("import typing_extensions"), @" success: true exit_code: 0 ----- stdout ----- @@ -5206,7 +5206,7 @@ fn run_groups_requires_python() -> Result<()> { // Explicitly requesting an out-of-range python fails uv_snapshot!(context.filters(), context.run() .arg("-p").arg("3.11") - .arg("python").arg("-c").arg("import typing_extensions"), @r" + .arg("python").arg("-c").arg("import typing_extensions"), @" success: false exit_code: 2 ----- stdout ----- @@ -5219,7 +5219,7 @@ fn run_groups_requires_python() -> Result<()> { // Enabling foo we can't find an interpreter uv_snapshot!(context.filters(), context.run() .arg("--group").arg("foo") - .arg("python").arg("-c").arg("import typing_extensions"), @r" + .arg("python").arg("-c").arg("import typing_extensions"), @" success: false exit_code: 2 ----- stdout ----- @@ -5262,7 +5262,7 @@ fn run_groups_include_requires_python() -> Result<()> { // With --no-default-groups only the main requires-python should be consulted uv_snapshot!(context.filters(), context.run() .arg("--no-default-groups") - .arg("python").arg("-c").arg("import typing_extensions"), @r" + .arg("python").arg("-c").arg("import typing_extensions"), @" success: true exit_code: 0 ----- stdout ----- @@ -5279,7 +5279,7 @@ fn run_groups_include_requires_python() -> Result<()> { // The main requires-python and the default group's requires-python should be consulted // (This should trigger a version bump) uv_snapshot!(context.filters(), context.run() - .arg("python").arg("-c").arg("import typing_extensions"), @r" + .arg("python").arg("-c").arg("import typing_extensions"), @" success: true exit_code: 0 ----- stdout ----- @@ -5302,7 +5302,7 @@ fn run_groups_include_requires_python() -> Result<()> { // (This should trigger a conflict) uv_snapshot!(context.filters(), context.run() .arg("--group").arg("bar") - .arg("python").arg("-c").arg("import typing_extensions"), @r" + .arg("python").arg("-c").arg("import typing_extensions"), @" success: false exit_code: 2 ----- stdout ----- @@ -5317,7 +5317,7 @@ fn run_groups_include_requires_python() -> Result<()> { // Explicitly requesting an out-of-range python fails uv_snapshot!(context.filters(), context.run() .arg("-p").arg("3.13") - .arg("python").arg("-c").arg("import typing_extensions"), @r" + .arg("python").arg("-c").arg("import typing_extensions"), @" success: false exit_code: 2 ----- stdout ----- @@ -5362,7 +5362,7 @@ fn run_repeated() -> Result<()> { // Import `iniconfig` in the context of the project. uv_snapshot!( context.filters(), - context.run().arg("--with").arg("typing-extensions").arg("python").arg("-c").arg("import typing_extensions; import iniconfig"), @r###" + context.run().arg("--with").arg("typing-extensions").arg("python").arg("-c").arg("import typing_extensions; import iniconfig"), @" success: true exit_code: 0 ----- stdout ----- @@ -5378,12 +5378,12 @@ fn run_repeated() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + typing-extensions==4.10.0 - "###); + "); // Re-running shouldn't require reinstalling `typing-extensions`, since the environment is cached. uv_snapshot!( context.filters(), - context.run().arg("--with").arg("typing-extensions").arg("python").arg("-c").arg("import typing_extensions; import iniconfig"), @r###" + context.run().arg("--with").arg("typing-extensions").arg("python").arg("-c").arg("import typing_extensions; import iniconfig"), @" success: true exit_code: 0 ----- stdout ----- @@ -5392,7 +5392,7 @@ fn run_repeated() -> Result<()> { Resolved 2 packages in [TIME] Audited 1 package in [TIME] Resolved 1 package in [TIME] - "###); + "); // Import `iniconfig` in the context of a `tool run` command, which should fail. uv_snapshot!( @@ -5432,7 +5432,7 @@ fn run_without_overlay() -> Result<()> { // Import `iniconfig` in the context of the project. uv_snapshot!( context.filters(), - context.run().arg("--with").arg("typing-extensions").arg("python").arg("-c").arg("import typing_extensions; import iniconfig"), @r###" + context.run().arg("--with").arg("typing-extensions").arg("python").arg("-c").arg("import typing_extensions; import iniconfig"), @" success: true exit_code: 0 ----- stdout ----- @@ -5448,7 +5448,7 @@ fn run_without_overlay() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + typing-extensions==4.10.0 - "###); + "); // Import `iniconfig` in the context of a `tool run` command, which should fail. uv_snapshot!( @@ -5470,7 +5470,7 @@ fn run_without_overlay() -> Result<()> { // Re-running in the context of the project should reset the overlay. uv_snapshot!( context.filters(), - context.run().arg("--with").arg("typing-extensions").arg("python").arg("-c").arg("import typing_extensions; import iniconfig"), @r###" + context.run().arg("--with").arg("typing-extensions").arg("python").arg("-c").arg("import typing_extensions; import iniconfig"), @" success: true exit_code: 0 ----- stdout ----- @@ -5479,7 +5479,7 @@ fn run_without_overlay() -> Result<()> { Resolved 2 packages in [TIME] Audited 1 package in [TIME] Resolved 1 package in [TIME] - "###); + "); Ok(()) } @@ -5509,7 +5509,7 @@ fn detect_infinite_recursion() -> Result<()> { // Set the max recursion depth to a lower amount to speed up testing. cmd.env(EnvVars::UV_RUN_MAX_RECURSION_DEPTH, "5"); - uv_snapshot!(context.filters(), cmd, @r###" + uv_snapshot!(context.filters(), cmd, @" success: false exit_code: 2 ----- stdout ----- @@ -5518,7 +5518,7 @@ fn detect_infinite_recursion() -> Result<()> { error: `uv run` was recursively invoked 6 times which exceeds the limit of 5. hint: If you are running a script with `uv run` in the shebang, you may need to include the `--script` flag. - "###); + "); Ok(()) } @@ -5530,14 +5530,14 @@ fn run_uv_variable() { // Display the `UV` variable uv_snapshot!( context.filters(), - context.run().arg("python").arg("-c").arg("import os; print(os.environ['UV'])"), @r###" + context.run().arg("python").arg("-c").arg("import os; print(os.environ['UV'])"), @" success: true exit_code: 0 ----- stdout ----- [UV] ----- stderr ----- - "###); + "); } /// Test legacy scripts . @@ -5795,14 +5795,14 @@ fn run_pep723_script_with_constraints_lock() -> Result<()> { })?; // Explicitly lock the script. - uv_snapshot!(context.filters(), context.lock().arg("--script").arg("main.py"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--script").arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 1 package in [TIME] - "###); + "); let lock = context.read("main.py.lock"); @@ -5845,7 +5845,7 @@ fn run_pep723_script_with_constraints_lock() -> Result<()> { "# })?; - uv_snapshot!(context.filters(), context.run().arg("--with").arg(".").arg("main.py"), @r" + uv_snapshot!(context.filters(), context.run().arg("--with").arg(".").arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -5901,7 +5901,7 @@ fn run_pep723_script_with_constraints() -> Result<()> { "# })?; - uv_snapshot!(context.filters(), context.run().arg("--with").arg(".").arg("main.py"), @r" + uv_snapshot!(context.filters(), context.run().arg("--with").arg(".").arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -5945,7 +5945,7 @@ fn run_no_sync_incompatible_python() -> Result<()> { "# })?; - uv_snapshot!(context.filters(), context.run().arg("main.py"), @r" + uv_snapshot!(context.filters(), context.run().arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -5960,7 +5960,7 @@ fn run_no_sync_incompatible_python() -> Result<()> { + iniconfig==2.0.0 "); - uv_snapshot!(context.filters(), context.run().arg("--no-sync").arg("--python").arg("3.9").arg("main.py"), @r" + uv_snapshot!(context.filters(), context.run().arg("--no-sync").arg("--python").arg("3.9").arg("main.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -5980,7 +5980,7 @@ fn run_python_preference_no_project() { context.venv().assert().success(); - uv_snapshot!(context.filters(), context.run().arg("python").arg("--version"), @r" + uv_snapshot!(context.filters(), context.run().arg("python").arg("--version"), @" success: true exit_code: 0 ----- stdout ----- @@ -5989,7 +5989,7 @@ fn run_python_preference_no_project() { ----- stderr ----- "); - uv_snapshot!(context.filters(), context.run().arg("--managed-python").arg("python").arg("--version"), @r" + uv_snapshot!(context.filters(), context.run().arg("--managed-python").arg("python").arg("--version"), @" success: true exit_code: 0 ----- stdout ----- @@ -5999,7 +5999,7 @@ fn run_python_preference_no_project() { "); // `VIRTUAL_ENV` is set here, so we'll ignore the flag - uv_snapshot!(context.filters(), context.run().arg("--no-managed-python").arg("python").arg("--version"), @r" + uv_snapshot!(context.filters(), context.run().arg("--no-managed-python").arg("python").arg("--version"), @" success: true exit_code: 0 ----- stdout ----- @@ -6009,7 +6009,7 @@ fn run_python_preference_no_project() { "); // If we remove the `VIRTUAL_ENV` variable, we should get the unmanaged Python - uv_snapshot!(context.filters(), context.run().arg("--no-managed-python").arg("python").arg("--version").env_remove(EnvVars::VIRTUAL_ENV), @r" + uv_snapshot!(context.filters(), context.run().arg("--no-managed-python").arg("python").arg("--version").env_remove(EnvVars::VIRTUAL_ENV), @" success: true exit_code: 0 ----- stdout ----- @@ -6053,7 +6053,7 @@ fn isolate_child_environment() -> Result<()> { })?; // Sync the parent package. - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -6122,7 +6122,7 @@ fn run_only_group_and_extra_conflict() -> Result<()> { )?; // Using --only-group and --extra together should error. - uv_snapshot!(context.filters(), context.run().arg("--only-group").arg("dev").arg("--extra").arg("test").arg("python").arg("-c").arg("print('hello')"), @r###" + uv_snapshot!(context.filters(), context.run().arg("--only-group").arg("dev").arg("--extra").arg("test").arg("python").arg("-c").arg("print('hello')"), @" success: false exit_code: 2 ----- stdout ----- @@ -6133,10 +6133,10 @@ fn run_only_group_and_extra_conflict() -> Result<()> { Usage: uv run --cache-dir [CACHE_DIR] --only-group --exclude-newer For more information, try '--help'. - "###); + "); // Using --only-group and --all-extras together should also error. - uv_snapshot!(context.filters(), context.run().arg("--only-group").arg("dev").arg("--all-extras").arg("python").arg("-c").arg("print('hello')"), @r###" + uv_snapshot!(context.filters(), context.run().arg("--only-group").arg("dev").arg("--all-extras").arg("python").arg("-c").arg("print('hello')"), @" success: false exit_code: 2 ----- stdout ----- @@ -6147,7 +6147,7 @@ fn run_only_group_and_extra_conflict() -> Result<()> { Usage: uv run --cache-dir [CACHE_DIR] --only-group --exclude-newer For more information, try '--help'. - "###); + "); Ok(()) } @@ -6197,7 +6197,7 @@ fn run_target_workspace_discovery() -> Result<()> { "#); // With the preview feature, the workspace is discovered from the target's directory. - uv_snapshot!(context.filters(), context.run().arg("--preview-features").arg("target-workspace-discovery").arg("project/script.py").env_remove(EnvVars::VIRTUAL_ENV), @r" + uv_snapshot!(context.filters(), context.run().arg("--preview-features").arg("target-workspace-discovery").arg("project/script.py").env_remove(EnvVars::VIRTUAL_ENV), @" success: true exit_code: 0 ----- stdout ----- diff --git a/crates/uv/tests/it/show_settings.rs b/crates/uv/tests/it/show_settings.rs index c25fa435b..dc304fc43 100644 --- a/crates/uv/tests/it/show_settings.rs +++ b/crates/uv/tests/it/show_settings.rs @@ -4434,7 +4434,7 @@ fn invalid_conflicts() -> anyhow::Result<()> { "#})?; // The file should be rejected for violating the schema. - uv_snapshot!(context.filters(), add_shared_args(context.lock(), context.temp_dir.path()), @r###" + uv_snapshot!(context.filters(), add_shared_args(context.lock(), context.temp_dir.path()), @" success: false exit_code: 2 ----- stdout ----- @@ -4446,7 +4446,7 @@ fn invalid_conflicts() -> anyhow::Result<()> { 7 | conflicts = [ | ^ Each set of conflicts must have at least two entries, but found only one - "### + " ); // Now test the empty case. @@ -4461,7 +4461,7 @@ fn invalid_conflicts() -> anyhow::Result<()> { "#})?; // The file should be rejected for violating the schema. - uv_snapshot!(context.filters(), add_shared_args(context.lock(), context.temp_dir.path()), @r###" + uv_snapshot!(context.filters(), add_shared_args(context.lock(), context.temp_dir.path()), @" success: false exit_code: 2 ----- stdout ----- @@ -4473,7 +4473,7 @@ fn invalid_conflicts() -> anyhow::Result<()> { 7 | conflicts = [[]] | ^^^^ Each set of conflicts must have at least two entries, but found none - "### + " ); Ok(()) @@ -4499,14 +4499,14 @@ fn valid_conflicts() -> anyhow::Result<()> { ] "#})?; uv_snapshot!(context.filters(), add_shared_args(context.lock(), context.temp_dir.path()) - .env(EnvVars::XDG_CONFIG_HOME, xdg.path()), @r###" + .env(EnvVars::XDG_CONFIG_HOME, xdg.path()), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 1 package in [TIME] - "### + " ); Ok(()) @@ -4759,7 +4759,7 @@ fn resolve_config_file() -> anyhow::Result<()> { .arg("--show-settings") .arg("--config-file") .arg(config.path()) - .arg("requirements.in"), @r" + .arg("requirements.in"), @" success: false exit_code: 2 ----- stdout ----- diff --git a/crates/uv/tests/it/sync.rs b/crates/uv/tests/it/sync.rs index 586a2b964..a8a45f437 100644 --- a/crates/uv/tests/it/sync.rs +++ b/crates/uv/tests/it/sync.rs @@ -27,7 +27,7 @@ fn sync() -> Result<()> { )?; // Running `uv sync` should generate a lockfile. - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -60,14 +60,14 @@ fn locked() -> Result<()> { )?; // Running with `--locked` should error, if no lockfile is present. - uv_snapshot!(context.filters(), context.sync().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--locked"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: Unable to find lockfile at `uv.lock`, but `--locked` was provided. To create a lockfile, run `uv lock` or `uv sync` without the flag. - "###); + "); // Lock the initial requirements. context.lock().assert().success(); @@ -86,7 +86,7 @@ fn locked() -> Result<()> { )?; // Running with `--locked` should error. - uv_snapshot!(context.filters(), context.sync().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--locked"), @" success: false exit_code: 1 ----- stdout ----- @@ -94,7 +94,7 @@ fn locked() -> Result<()> { ----- stderr ----- Resolved 2 packages in [TIME] The lockfile at `uv.lock` needs to be updated, but `--locked` was provided. To update the lockfile, run `uv lock`. - "###); + "); let updated = context.read("uv.lock"); @@ -120,14 +120,14 @@ fn frozen() -> Result<()> { )?; // Running with `--frozen` should error, if no lockfile is present. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: Unable to find lockfile at `uv.lock`, but `--frozen` was provided. To create a lockfile, run `uv lock` or `uv sync` without the flag. - "###); + "); context.lock().assert().success(); @@ -143,7 +143,7 @@ fn frozen() -> Result<()> { )?; // Running with `--frozen` should install the stale lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -172,7 +172,7 @@ fn empty() -> Result<()> { )?; // Running `uv sync` should generate an empty lockfile. - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -186,7 +186,7 @@ fn empty() -> Result<()> { assert!(context.temp_dir.child("uv.lock").exists()); // Running `uv sync` again should succeed. - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -252,7 +252,7 @@ fn package() -> Result<()> { let init = src.child("__init__.py"); init.touch()?; - uv_snapshot!(context.filters(), context.sync().arg("--package").arg("child"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--package").arg("child"), @" success: true exit_code: 0 ----- stdout ----- @@ -340,7 +340,7 @@ fn multiple_packages() -> Result<()> { // Sync `foo` and `bar`. uv_snapshot!(context.filters(), context.sync() .arg("--package").arg("foo") - .arg("--package").arg("bar"), @r" + .arg("--package").arg("bar"), @" success: true exit_code: 0 ----- stdout ----- @@ -361,7 +361,7 @@ fn multiple_packages() -> Result<()> { uv_snapshot!(context.filters(), context.sync() .arg("--package").arg("foo") .arg("--package").arg("bar") - .arg("--package").arg("baz"), @r" + .arg("--package").arg("baz"), @" success: true exit_code: 0 ----- stdout ----- @@ -540,7 +540,7 @@ fn sync_json() -> Result<()> { uv_snapshot!(context.filters(), context.sync() .arg("--locked") - .arg("--output-format").arg("json"), @r" + .arg("--output-format").arg("json"), @" success: false exit_code: 1 ----- stdout ----- @@ -720,7 +720,7 @@ fn mixed_requires_python() -> Result<()> { )?; // Running `uv sync` should succeed, locking for Python 3.12. - uv_snapshot!(context.filters(), context.sync().arg("-p").arg("3.12"), @r" + uv_snapshot!(context.filters(), context.sync().arg("-p").arg("3.12"), @" success: true exit_code: 0 ----- stdout ----- @@ -738,7 +738,7 @@ fn mixed_requires_python() -> Result<()> { "); // Running `uv sync` again should fail. - uv_snapshot!(context.filters(), context.sync().arg("-p").arg("3.9"), @r" + uv_snapshot!(context.filters(), context.sync().arg("-p").arg("3.9"), @" success: false exit_code: 2 ----- stdout ----- @@ -784,7 +784,7 @@ fn group_requires_python_useful_defaults() -> Result<()> { // that the dependency-group containing sphinx will never successfully install, // even though it's not enabled! uv_snapshot!(context.filters(), context.sync() - .arg("--no-dev"), @r" + .arg("--no-dev"), @" success: false exit_code: 1 ----- stdout ----- @@ -801,7 +801,7 @@ fn group_requires_python_useful_defaults() -> Result<()> { "); // Running `uv sync` should always fail, as now sphinx is involved - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: false exit_code: 1 ----- stdout ----- @@ -835,7 +835,7 @@ fn group_requires_python_useful_defaults() -> Result<()> { // Running `uv sync --no-dev` should succeed, still using the Python 3.8. uv_snapshot!(context.filters(), context.sync() - .arg("--no-dev"), @r" + .arg("--no-dev"), @" success: true exit_code: 0 ----- stdout ----- @@ -852,7 +852,7 @@ fn group_requires_python_useful_defaults() -> Result<()> { "); // Running `uv sync` should succeed, bumping to Python 3.9 as sphinx is now involved. - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -928,7 +928,7 @@ fn group_requires_python_useful_non_defaults() -> Result<()> { // ...but once we pick the 3.8 interpreter the lock freaks out because it sees // that the dependency-group containing sphinx will never successfully install, // even though it's not enabled, or even a default! - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: false exit_code: 1 ----- stdout ----- @@ -946,7 +946,7 @@ fn group_requires_python_useful_non_defaults() -> Result<()> { // Running `uv sync --group mygroup` should definitely fail, as now sphinx is involved uv_snapshot!(context.filters(), context.sync() - .arg("--group").arg("mygroup"), @r" + .arg("--group").arg("mygroup"), @" success: false exit_code: 1 ----- stdout ----- @@ -979,7 +979,7 @@ fn group_requires_python_useful_non_defaults() -> Result<()> { )?; // Running `uv sync` should succeed, locking for the previous picked Python 3.8. - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -998,7 +998,7 @@ fn group_requires_python_useful_non_defaults() -> Result<()> { // Running `uv sync --group mygroup` should pass, bumping the interpreter to 3.9, // as the group requires-python saves us uv_snapshot!(context.filters(), context.sync() - .arg("--group").arg("mygroup"), @r" + .arg("--group").arg("mygroup"), @" success: true exit_code: 0 ----- stdout ----- @@ -1058,7 +1058,7 @@ fn check() -> Result<()> { )?; // Running `uv sync --check` should fail. - uv_snapshot!(context.filters(), context.sync().arg("--check"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--check"), @" success: false exit_code: 1 ----- stdout ----- @@ -1071,10 +1071,10 @@ fn check() -> Result<()> { Would install 1 package + iniconfig==2.0.0 The environment is outdated; run `uv sync` to update the environment - "###); + "); // Sync the environment. - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -1089,7 +1089,7 @@ fn check() -> Result<()> { assert!(context.temp_dir.child("uv.lock").exists()); // Running `uv sync --check` should pass now that the environment is up to date. - uv_snapshot!(context.filters(), context.sync().arg("--check"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--check"), @" success: true exit_code: 0 ----- stdout ----- @@ -1148,7 +1148,7 @@ fn sync_legacy_non_project_dev_dependencies() -> Result<()> { .touch()?; // Syncing with `--no-dev` should omit all dependencies except `iniconfig`. - uv_snapshot!(context.filters(), context.sync().arg("--no-dev"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--no-dev"), @" success: true exit_code: 0 ----- stdout ----- @@ -1163,7 +1163,7 @@ fn sync_legacy_non_project_dev_dependencies() -> Result<()> { // Syncing without `--no-dev` should include `anyio`, `requests`, `pysocks`, and their // dependencies, but not `typing-extensions`. - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -1228,7 +1228,7 @@ fn sync_legacy_non_project_frozen() -> Result<()> { context.lock().assert().success(); - uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--package").arg("foo"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--package").arg("foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -1239,7 +1239,7 @@ fn sync_legacy_non_project_frozen() -> Result<()> { + iniconfig==2.0.0 "); - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -1301,7 +1301,7 @@ fn sync_legacy_non_project_group() -> Result<()> { .child("__init__.py") .touch()?; - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -1314,7 +1314,7 @@ fn sync_legacy_non_project_group() -> Result<()> { + iniconfig==2.0.0 "); - uv_snapshot!(context.filters(), context.sync().arg("--group").arg("foo"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--group").arg("foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -1328,7 +1328,7 @@ fn sync_legacy_non_project_group() -> Result<()> { + sniffio==1.3.1 "); - uv_snapshot!(context.filters(), context.sync().arg("--only-group").arg("bar"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--only-group").arg("bar"), @" success: true exit_code: 0 ----- stdout ----- @@ -1346,7 +1346,7 @@ fn sync_legacy_non_project_group() -> Result<()> { + typing-extensions==4.10.0 "); - uv_snapshot!(context.filters(), context.sync().arg("--group").arg("baz"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--group").arg("baz"), @" success: true exit_code: 0 ----- stdout ----- @@ -1358,7 +1358,7 @@ fn sync_legacy_non_project_group() -> Result<()> { + iniconfig==2.0.0 "); - uv_snapshot!(context.filters(), context.sync().arg("--group").arg("bop"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--group").arg("bop"), @" success: false exit_code: 2 ----- stdout ----- @@ -1391,7 +1391,7 @@ fn sync_legacy_non_project_frozen_modification() -> Result<()> { context.lock().assert().success(); - uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--group").arg("async"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--group").arg("async"), @" success: true exit_code: 0 ----- stdout ----- @@ -1416,7 +1416,7 @@ fn sync_legacy_non_project_frozen_modification() -> Result<()> { )?; // This should succeed. - uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--group").arg("async"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--group").arg("async"), @" success: true exit_code: 0 ----- stdout ----- @@ -1453,7 +1453,7 @@ fn sync_build_isolation() -> Result<()> { .failure(); // Install `setuptools` (for the root project) plus `hatchling` (for `source-distribution`). - uv_snapshot!(context.filters(), context.pip_install().arg("wheel").arg("setuptools").arg("hatchling"), @r###" + uv_snapshot!(context.filters(), context.pip_install().arg("wheel").arg("setuptools").arg("hatchling"), @" success: true exit_code: 0 ----- stdout ----- @@ -1469,10 +1469,10 @@ fn sync_build_isolation() -> Result<()> { + setuptools==69.2.0 + trove-classifiers==2024.3.3 + wheel==0.43.0 - "###); + "); // Running `uv sync` should succeed. - uv_snapshot!(context.filters(), context.sync().arg("--no-build-isolation"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--no-build-isolation"), @" success: true exit_code: 0 ----- stdout ----- @@ -1545,7 +1545,7 @@ fn sync_build_isolation_package() -> Result<()> { "#); // Install `hatchling` for `source-distribution`. - uv_snapshot!(context.filters(), context.pip_install().arg("hatchling"), @r###" + uv_snapshot!(context.filters(), context.pip_install().arg("hatchling"), @" success: true exit_code: 0 ----- stdout ----- @@ -1559,10 +1559,10 @@ fn sync_build_isolation_package() -> Result<()> { + pathspec==0.12.1 + pluggy==1.4.0 + trove-classifiers==2024.3.3 - "###); + "); // Running `uv sync` should succeed. - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -1650,7 +1650,7 @@ fn sync_build_isolation_package_order() -> Result<()> { )?; // Running `uv sync` should succeed; `hatchling` should be installed first. - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -1687,7 +1687,7 @@ fn sync_build_isolation_package_order() -> Result<()> { // Running `uv sync` should uninstall `hatchling`, then build `source-distribution`, then uninstall // the existing `source-distribution`, and finally install the new one. - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -1724,7 +1724,7 @@ fn sync_build_isolation_package_order() -> Result<()> { )?; // Running `uv sync` should install everything in a single phase, since the build is cached. - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -1804,7 +1804,7 @@ fn sync_build_isolation_extra() -> Result<()> { // Running `uv sync` with `--all-extras` should succeed, because we install the build dependencies // first. - uv_snapshot!(context.filters(), context.sync().arg("--all-extras"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--all-extras"), @" success: true exit_code: 0 ----- stdout ----- @@ -1830,7 +1830,7 @@ fn sync_build_isolation_extra() -> Result<()> { fs_err::remove_dir_all(&context.cache_dir)?; // Install the build dependencies. - uv_snapshot!(context.filters(), context.sync().arg("--extra").arg("build"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--extra").arg("build"), @" success: true exit_code: 0 ----- stdout ----- @@ -1848,7 +1848,7 @@ fn sync_build_isolation_extra() -> Result<()> { "); // Running `uv sync` for the `compile` extra should succeed, and remove the build dependencies. - uv_snapshot!(context.filters(), context.sync().arg("--extra").arg("compile"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--extra").arg("compile"), @" success: true exit_code: 0 ----- stdout ----- @@ -1919,7 +1919,7 @@ fn sync_extra_build_dependencies() -> Result<()> { context.venv().arg("--clear").assert().success(); // Running `uv sync` should fail due to missing build-dependencies - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: false exit_code: 1 ----- stdout ----- @@ -1953,7 +1953,7 @@ fn sync_extra_build_dependencies() -> Result<()> { "#})?; context.venv().arg("--clear").assert().success(); - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -1967,7 +1967,7 @@ fn sync_extra_build_dependencies() -> Result<()> { "); context.venv().arg("--clear").assert().success(); - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -1996,7 +1996,7 @@ fn sync_extra_build_dependencies() -> Result<()> { "#})?; context.venv().arg("--clear").assert().success(); - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: false exit_code: 1 ----- stdout ----- @@ -2065,7 +2065,7 @@ fn sync_extra_build_dependencies() -> Result<()> { // Confirm that `bad_child` fails if anyio is provided context.venv().arg("--clear").assert().success(); - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: false exit_code: 1 ----- stdout ----- @@ -2101,7 +2101,7 @@ fn sync_extra_build_dependencies() -> Result<()> { "#})?; context.venv().arg("--clear").assert().success(); - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -2162,7 +2162,7 @@ fn sync_extra_build_dependencies_setuptools_legacy() -> Result<()> { "#})?; // Running `uv sync` should fail due to missing build-dependencies - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: false exit_code: 1 ----- stdout ----- @@ -2194,7 +2194,7 @@ fn sync_extra_build_dependencies_setuptools_legacy() -> Result<()> { "#})?; context.venv().arg("--clear").assert().success(); - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -2267,7 +2267,7 @@ fn sync_extra_build_dependencies_setuptools() -> Result<()> { "#})?; // Running `uv sync` should fail due to missing build-dependencies - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: false exit_code: 1 ----- stdout ----- @@ -2301,7 +2301,7 @@ fn sync_extra_build_dependencies_setuptools() -> Result<()> { "#})?; context.venv().arg("--clear").assert().success(); - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -2376,7 +2376,7 @@ fn sync_extra_build_dependencies_sources() -> Result<()> { })?; // Running `uv sync` should succeed, as `anyio` is provided as a source - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -2458,7 +2458,7 @@ fn sync_extra_build_dependencies_index() -> Result<()> { "#})?; // Ensure our build backend is checking the version correctly - uv_snapshot!(context.filters(), context.sync().env(EnvVars::EXPECTED_ANYIO_VERSION, "3.0"), @r" + uv_snapshot!(context.filters(), context.sync().env(EnvVars::EXPECTED_ANYIO_VERSION, "3.0"), @" success: false exit_code: 1 ----- stdout ----- @@ -2477,7 +2477,7 @@ fn sync_extra_build_dependencies_index() -> Result<()> { "); // Ensure that we're resolving to `4.3.0`, the "latest" on PyPI. - uv_snapshot!(context.filters(), context.sync().env(EnvVars::EXPECTED_ANYIO_VERSION, "4.3"), @r" + uv_snapshot!(context.filters(), context.sync().env(EnvVars::EXPECTED_ANYIO_VERSION, "4.3"), @" success: true exit_code: 0 ----- stdout ----- @@ -2512,7 +2512,7 @@ fn sync_extra_build_dependencies_index() -> Result<()> { // The child should be rebuilt with `3.5` on reinstall, the "latest" on Test PyPI. uv_snapshot!(context.filters(), context.sync() - .arg("--reinstall-package").arg("child").env(EnvVars::EXPECTED_ANYIO_VERSION, "4.3"), @r" + .arg("--reinstall-package").arg("child").env(EnvVars::EXPECTED_ANYIO_VERSION, "4.3"), @" success: false exit_code: 1 ----- stdout ----- @@ -2532,7 +2532,7 @@ fn sync_extra_build_dependencies_index() -> Result<()> { "); uv_snapshot!(context.filters(), context.sync() - .arg("--reinstall-package").arg("child").env(EnvVars::EXPECTED_ANYIO_VERSION, "3.5"), @r" + .arg("--reinstall-package").arg("child").env(EnvVars::EXPECTED_ANYIO_VERSION, "3.5"), @" success: true exit_code: 0 ----- stdout ----- @@ -2610,7 +2610,7 @@ fn sync_extra_build_dependencies_sources_from_child() -> Result<()> { })?; // Running `uv sync` should fail due to the unapplied source - uv_snapshot!(context.filters(), context.sync().arg("--reinstall").arg("--refresh"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--reinstall").arg("--refresh"), @" success: false exit_code: 1 ----- stdout ----- @@ -2718,7 +2718,7 @@ fn sync_build_dependencies_module_error_hints() -> Result<()> { "#})?; context.venv().arg("--clear").assert().success(); - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -2786,7 +2786,7 @@ fn sync_build_dependencies_module_error_hints() -> Result<()> { "#})?; context.venv().arg("--clear").assert().success(); - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -2849,7 +2849,7 @@ fn sync_reset_state() -> Result<()> { init.touch()?; // Running `uv sync` should succeed. - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -2903,7 +2903,7 @@ fn sync_relative_wheel() -> Result<()> { context.temp_dir.join("wheels/ok-1.0.0-py3-none-any.whl"), )?; - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -2956,7 +2956,7 @@ fn sync_relative_wheel() -> Result<()> { ); // Check that we can re-read the lockfile. - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -2988,7 +2988,7 @@ fn sync_environment() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.sync(), @r###" + uv_snapshot!(context.filters(), context.sync(), @" success: false exit_code: 2 ----- stdout ----- @@ -2996,7 +2996,7 @@ fn sync_environment() -> Result<()> { ----- stderr ----- Resolved 2 packages in [TIME] error: The current Python platform is not compatible with the lockfile's supported environments: `python_full_version < '3.11'` - "###); + "); assert!(context.temp_dir.child("uv.lock").exists()); @@ -3023,7 +3023,7 @@ fn sync_dev() -> Result<()> { context.lock().assert().success(); - uv_snapshot!(context.filters(), context.sync().arg("--only-dev"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--only-dev"), @" success: true exit_code: 0 ----- stdout ----- @@ -3038,7 +3038,7 @@ fn sync_dev() -> Result<()> { + sniffio==1.3.1 "); - uv_snapshot!(context.filters(), context.sync().arg("--no-dev"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--no-dev"), @" success: true exit_code: 0 ----- stdout ----- @@ -3055,7 +3055,7 @@ fn sync_dev() -> Result<()> { + typing-extensions==4.10.0 "); - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -3070,7 +3070,7 @@ fn sync_dev() -> Result<()> { "); // Using `--no-default-groups` should remove dev dependencies - uv_snapshot!(context.filters(), context.sync().arg("--no-default-groups"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--no-default-groups"), @" success: true exit_code: 0 ----- stdout ----- @@ -3111,7 +3111,7 @@ fn sync_group() -> Result<()> { context.lock().assert().success(); - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -3124,7 +3124,7 @@ fn sync_group() -> Result<()> { + typing-extensions==4.10.0 "); - uv_snapshot!(context.filters(), context.sync().arg("--group").arg("foo"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--group").arg("foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -3138,7 +3138,7 @@ fn sync_group() -> Result<()> { + sniffio==1.3.1 "); - uv_snapshot!(context.filters(), context.sync().arg("--only-group").arg("bar"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--only-group").arg("bar"), @" success: true exit_code: 0 ----- stdout ----- @@ -3158,7 +3158,7 @@ fn sync_group() -> Result<()> { + urllib3==2.2.1 "); - uv_snapshot!(context.filters(), context.sync().arg("--group").arg("foo").arg("--group").arg("bar"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--group").arg("foo").arg("--group").arg("bar"), @" success: true exit_code: 0 ----- stdout ----- @@ -3172,7 +3172,7 @@ fn sync_group() -> Result<()> { + typing-extensions==4.10.0 "); - uv_snapshot!(context.filters(), context.sync().arg("--all-groups"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--all-groups"), @" success: true exit_code: 0 ----- stdout ----- @@ -3182,7 +3182,7 @@ fn sync_group() -> Result<()> { Audited 9 packages in [TIME] "); - uv_snapshot!(context.filters(), context.sync().arg("--all-groups").arg("--no-group").arg("bar"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--all-groups").arg("--no-group").arg("bar"), @" success: true exit_code: 0 ----- stdout ----- @@ -3196,7 +3196,7 @@ fn sync_group() -> Result<()> { - urllib3==2.2.1 "); - uv_snapshot!(context.filters(), context.sync().arg("--all-groups").arg("--no-dev"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--all-groups").arg("--no-dev"), @" success: true exit_code: 0 ----- stdout ----- @@ -3212,7 +3212,7 @@ fn sync_group() -> Result<()> { + urllib3==2.2.1 "); - uv_snapshot!(context.filters(), context.sync().arg("--dev"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--dev"), @" success: true exit_code: 0 ----- stdout ----- @@ -3231,7 +3231,7 @@ fn sync_group() -> Result<()> { - urllib3==2.2.1 "); - uv_snapshot!(context.filters(), context.sync().arg("--dev").arg("--no-group").arg("dev"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--dev").arg("--no-group").arg("dev"), @" success: true exit_code: 0 ----- stdout ----- @@ -3242,7 +3242,7 @@ fn sync_group() -> Result<()> { - iniconfig==2.0.0 "); - uv_snapshot!(context.filters(), context.sync().arg("--group").arg("dev").arg("--no-dev"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--group").arg("dev").arg("--no-dev"), @" success: true exit_code: 0 ----- stdout ----- @@ -3252,7 +3252,7 @@ fn sync_group() -> Result<()> { Audited 1 package in [TIME] "); - uv_snapshot!(context.filters(), context.sync().arg("--all-groups"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--all-groups"), @" success: true exit_code: 0 ----- stdout ----- @@ -3271,7 +3271,7 @@ fn sync_group() -> Result<()> { "); // Using `--no-default-groups` should exclude all groups - uv_snapshot!(context.filters(), context.sync().arg("--no-default-groups"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--no-default-groups"), @" success: true exit_code: 0 ----- stdout ----- @@ -3289,7 +3289,7 @@ fn sync_group() -> Result<()> { - urllib3==2.2.1 "); - uv_snapshot!(context.filters(), context.sync().arg("--all-groups"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--all-groups"), @" success: true exit_code: 0 ----- stdout ----- @@ -3309,7 +3309,7 @@ fn sync_group() -> Result<()> { // Using `--no-default-groups` with `--group foo` and `--group bar` should include those groups, // excluding the remaining `dev` group. - uv_snapshot!(context.filters(), context.sync().arg("--no-default-groups").arg("--group").arg("foo").arg("--group").arg("bar"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--no-default-groups").arg("--group").arg("foo").arg("--group").arg("bar"), @" success: true exit_code: 0 ----- stdout ----- @@ -3344,7 +3344,7 @@ fn sync_include_group() -> Result<()> { context.lock().assert().success(); - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -3356,7 +3356,7 @@ fn sync_include_group() -> Result<()> { + typing-extensions==4.10.0 "); - uv_snapshot!(context.filters(), context.sync().arg("--group").arg("foo"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--group").arg("foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -3371,7 +3371,7 @@ fn sync_include_group() -> Result<()> { + sniffio==1.3.1 "); - uv_snapshot!(context.filters(), context.sync().arg("--only-group").arg("bar"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--only-group").arg("bar"), @" success: true exit_code: 0 ----- stdout ----- @@ -3385,7 +3385,7 @@ fn sync_include_group() -> Result<()> { - typing-extensions==4.10.0 "); - uv_snapshot!(context.filters(), context.sync().arg("--group").arg("foo").arg("--group").arg("bar"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--group").arg("foo").arg("--group").arg("bar"), @" success: true exit_code: 0 ----- stdout ----- @@ -3399,7 +3399,7 @@ fn sync_include_group() -> Result<()> { + typing-extensions==4.10.0 "); - uv_snapshot!(context.filters(), context.sync().arg("--only-group").arg("foo"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--only-group").arg("foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -3410,7 +3410,7 @@ fn sync_include_group() -> Result<()> { - typing-extensions==4.10.0 "); - uv_snapshot!(context.filters(), context.sync().arg("--all-groups"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--all-groups"), @" success: true exit_code: 0 ----- stdout ----- @@ -3421,7 +3421,7 @@ fn sync_include_group() -> Result<()> { + typing-extensions==4.10.0 "); - uv_snapshot!(context.filters(), context.sync().arg("--no-default-groups"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--no-default-groups"), @" success: true exit_code: 0 ----- stdout ----- @@ -3435,7 +3435,7 @@ fn sync_include_group() -> Result<()> { - sniffio==1.3.1 "); - uv_snapshot!(context.filters(), context.sync().arg("--all-groups"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--all-groups"), @" success: true exit_code: 0 ----- stdout ----- @@ -3449,7 +3449,7 @@ fn sync_include_group() -> Result<()> { + sniffio==1.3.1 "); - uv_snapshot!(context.filters(), context.sync().arg("--no-default-groups").arg("--group").arg("foo"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--no-default-groups").arg("--group").arg("foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -3483,7 +3483,7 @@ fn sync_exclude_group() -> Result<()> { context.lock().assert().success(); - uv_snapshot!(context.filters(), context.sync().arg("--group").arg("foo"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--group").arg("foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -3499,7 +3499,7 @@ fn sync_exclude_group() -> Result<()> { + typing-extensions==4.10.0 "); - uv_snapshot!(context.filters(), context.sync().arg("--group").arg("foo").arg("--no-group").arg("foo"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--group").arg("foo").arg("--no-group").arg("foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -3513,7 +3513,7 @@ fn sync_exclude_group() -> Result<()> { - sniffio==1.3.1 "); - uv_snapshot!(context.filters(), context.sync().arg("--only-group").arg("bar"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--only-group").arg("bar"), @" success: true exit_code: 0 ----- stdout ----- @@ -3526,7 +3526,7 @@ fn sync_exclude_group() -> Result<()> { - typing-extensions==4.10.0 "); - uv_snapshot!(context.filters(), context.sync().arg("--only-group").arg("bar").arg("--no-group").arg("bar"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--only-group").arg("bar").arg("--no-group").arg("bar"), @" success: true exit_code: 0 ----- stdout ----- @@ -3566,7 +3566,7 @@ fn sync_exclude_group_with_environment_variable() -> Result<()> { uv_snapshot!(context.filters(), context.sync() .arg("--group").arg("foo") .arg("--group").arg("bar") - .env(EnvVars::UV_NO_GROUP, "bar"), @r" + .env(EnvVars::UV_NO_GROUP, "bar"), @" success: true exit_code: 0 ----- stdout ----- @@ -3586,7 +3586,7 @@ fn sync_exclude_group_with_environment_variable() -> Result<()> { .arg("--group").arg("foo") .arg("--group").arg("bar") .arg("--group").arg("baz") - .env(EnvVars::UV_NO_GROUP, "bar baz"), @r" + .env(EnvVars::UV_NO_GROUP, "bar baz"), @" success: true exit_code: 0 ----- stdout ----- @@ -3603,7 +3603,7 @@ fn sync_exclude_group_with_environment_variable() -> Result<()> { .arg("--group").arg("bar") .arg("--group").arg("baz") .arg("--no-group").arg("bar") - .env(EnvVars::UV_NO_GROUP, "baz"), @r" + .env(EnvVars::UV_NO_GROUP, "baz"), @" success: true exit_code: 0 ----- stdout ----- @@ -3641,7 +3641,7 @@ fn sync_dev_group() -> Result<()> { context.lock().assert().success(); - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -3683,7 +3683,7 @@ fn sync_non_existent_group() -> Result<()> { context.lock().assert().success(); // Requesting a non-existent group should fail. - uv_snapshot!(context.filters(), context.sync().arg("--group").arg("baz"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--group").arg("baz"), @" success: false exit_code: 2 ----- stdout ----- @@ -3693,7 +3693,7 @@ fn sync_non_existent_group() -> Result<()> { error: Group `baz` is not defined in the project's `dependency-groups` table "); - uv_snapshot!(context.filters(), context.sync().arg("--no-group").arg("baz"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--no-group").arg("baz"), @" success: false exit_code: 2 ----- stdout ----- @@ -3704,7 +3704,7 @@ fn sync_non_existent_group() -> Result<()> { "); // Requesting an empty group should succeed. - uv_snapshot!(context.filters(), context.sync().arg("--group").arg("foo"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--group").arg("foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -3718,7 +3718,7 @@ fn sync_non_existent_group() -> Result<()> { // Requesting with `--frozen` should respect the groups in the lockfile, rather than the // `pyproject.toml`. - uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--group").arg("bar"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--group").arg("bar"), @" success: true exit_code: 0 ----- stdout ----- @@ -3747,7 +3747,7 @@ fn sync_non_existent_group() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--group").arg("bar"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--group").arg("bar"), @" success: true exit_code: 0 ----- stdout ----- @@ -3756,7 +3756,7 @@ fn sync_non_existent_group() -> Result<()> { Audited 6 packages in [TIME] "); - uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--group").arg("baz"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--group").arg("baz"), @" success: false exit_code: 2 ----- stdout ----- @@ -3796,7 +3796,7 @@ fn sync_corner_groups() -> Result<()> { // (This one could be made to work with overloading) uv_snapshot!(context.filters(), context.sync() .arg("--no-dev") - .arg("--only-dev"), @r" + .arg("--only-dev"), @" success: false exit_code: 2 ----- stdout ----- @@ -3812,7 +3812,7 @@ fn sync_corner_groups() -> Result<()> { // --dev and --only-group should error if they don't match uv_snapshot!(context.filters(), context.sync() .arg("--dev") - .arg("--only-group").arg("bar"), @r" + .arg("--only-group").arg("bar"), @" success: false exit_code: 2 ----- stdout ----- @@ -3829,7 +3829,7 @@ fn sync_corner_groups() -> Result<()> { // (This one could be made to work the same as --dev --only-dev) uv_snapshot!(context.filters(), context.sync() .arg("--dev") - .arg("--only-group").arg("dev"), @r" + .arg("--only-group").arg("dev"), @" success: false exit_code: 2 ----- stdout ----- @@ -3846,7 +3846,7 @@ fn sync_corner_groups() -> Result<()> { // (This one could be made to work the same as --dev --only-dev) uv_snapshot!(context.filters(), context.sync() .arg("--only-dev") - .arg("--group").arg("bar"), @r" + .arg("--group").arg("bar"), @" success: false exit_code: 2 ----- stdout ----- @@ -3863,7 +3863,7 @@ fn sync_corner_groups() -> Result<()> { // (This one could be made to work the same as --dev --only-dev) uv_snapshot!(context.filters(), context.sync() .arg("--only-dev") - .arg("--group").arg("dev"), @r" + .arg("--group").arg("dev"), @" success: false exit_code: 2 ----- stdout ----- @@ -3879,7 +3879,7 @@ fn sync_corner_groups() -> Result<()> { // --all-groups and --only-dev should error uv_snapshot!(context.filters(), context.sync() .arg("--all-groups") - .arg("--only-dev"), @r" + .arg("--only-dev"), @" success: false exit_code: 2 ----- stdout ----- @@ -3895,7 +3895,7 @@ fn sync_corner_groups() -> Result<()> { // --all-groups and --only-group should error uv_snapshot!(context.filters(), context.sync() .arg("--all-groups") - .arg("--only-group").arg("bar"), @r" + .arg("--only-group").arg("bar"), @" success: false exit_code: 2 ----- stdout ----- @@ -3911,7 +3911,7 @@ fn sync_corner_groups() -> Result<()> { // --group and --only-group should error if they name disjoint things uv_snapshot!(context.filters(), context.sync() .arg("--group").arg("foo") - .arg("--only-group").arg("bar"), @r" + .arg("--only-group").arg("bar"), @" success: false exit_code: 2 ----- stdout ----- @@ -3928,7 +3928,7 @@ fn sync_corner_groups() -> Result<()> { // (This one would be fair to allow, but... is it worth it?) uv_snapshot!(context.filters(), context.sync() .arg("--group").arg("foo") - .arg("--only-group").arg("foo"), @r" + .arg("--only-group").arg("foo"), @" success: false exit_code: 2 ----- stdout ----- @@ -3944,7 +3944,7 @@ fn sync_corner_groups() -> Result<()> { // --all-groups and --no-default-groups is redundant but should be --all-groups uv_snapshot!(context.filters(), context.sync() .arg("--all-groups") - .arg("--no-default-groups"), @r" + .arg("--no-default-groups"), @" success: true exit_code: 0 ----- stdout ----- @@ -3966,7 +3966,7 @@ fn sync_corner_groups() -> Result<()> { // --dev --only-dev should saturate as --only-dev uv_snapshot!(context.filters(), context.sync() .arg("--dev") - .arg("--only-dev"), @r" + .arg("--only-dev"), @" success: true exit_code: 0 ----- stdout ----- @@ -4008,14 +4008,14 @@ fn sync_non_existent_default_group() -> Result<()> { context.lock().assert().success(); - uv_snapshot!(context.filters(), context.sync(), @r###" + uv_snapshot!(context.filters(), context.sync(), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: Default group `bar` (from `tool.uv.default-groups`) is not defined in the project's `dependency-groups` table - "###); + "); Ok(()) } @@ -4043,7 +4043,7 @@ fn sync_default_groups() -> Result<()> { context.lock().assert().success(); // The `dev` group should be synced by default. - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -4075,7 +4075,7 @@ fn sync_default_groups() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -4105,7 +4105,7 @@ fn sync_default_groups() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -4138,7 +4138,7 @@ fn sync_default_groups() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.sync().arg("--no-group").arg("foo"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--no-group").arg("foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -4152,7 +4152,7 @@ fn sync_default_groups() -> Result<()> { "); // Using `--group` should include the defaults - uv_snapshot!(context.filters(), context.sync().arg("--group").arg("dev"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--group").arg("dev"), @" success: true exit_code: 0 ----- stdout ----- @@ -4167,7 +4167,7 @@ fn sync_default_groups() -> Result<()> { "); // Using `--all-groups` should include the defaults - uv_snapshot!(context.filters(), context.sync().arg("--all-groups"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--all-groups"), @" success: true exit_code: 0 ----- stdout ----- @@ -4183,7 +4183,7 @@ fn sync_default_groups() -> Result<()> { "); // Using `--only-group` should exclude the defaults - uv_snapshot!(context.filters(), context.sync().arg("--only-group").arg("dev"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--only-group").arg("dev"), @" success: true exit_code: 0 ----- stdout ----- @@ -4201,7 +4201,7 @@ fn sync_default_groups() -> Result<()> { - urllib3==2.2.1 "); - uv_snapshot!(context.filters(), context.sync().arg("--all-groups"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--all-groups"), @" success: true exit_code: 0 ----- stdout ----- @@ -4220,7 +4220,7 @@ fn sync_default_groups() -> Result<()> { "); // Using `--no-default-groups` should exclude all groups - uv_snapshot!(context.filters(), context.sync().arg("--no-default-groups"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--no-default-groups"), @" success: true exit_code: 0 ----- stdout ----- @@ -4238,7 +4238,7 @@ fn sync_default_groups() -> Result<()> { - urllib3==2.2.1 "); - uv_snapshot!(context.filters(), context.sync().arg("--all-groups"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--all-groups"), @" success: true exit_code: 0 ----- stdout ----- @@ -4258,7 +4258,7 @@ fn sync_default_groups() -> Result<()> { // Using `--no-default-groups` with `--group foo` and `--group bar` should include those groups, // excluding the remaining `dev` group. - uv_snapshot!(context.filters(), context.sync().arg("--no-default-groups").arg("--group").arg("foo").arg("--group").arg("bar"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--no-default-groups").arg("--group").arg("foo").arg("--group").arg("bar"), @" success: true exit_code: 0 ----- stdout ----- @@ -4299,7 +4299,7 @@ fn sync_default_groups_all() -> Result<()> { context.lock().assert().success(); // groups = "all" should behave like --all-groups in contexts where defaults exist - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -4320,7 +4320,7 @@ fn sync_default_groups_all() -> Result<()> { "); // Using `--no-default-groups` should still work - uv_snapshot!(context.filters(), context.sync().arg("--no-default-groups"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--no-default-groups"), @" success: true exit_code: 0 ----- stdout ----- @@ -4339,7 +4339,7 @@ fn sync_default_groups_all() -> Result<()> { "); // Using `--all-groups` should be redundant and work fine - uv_snapshot!(context.filters(), context.sync().arg("--all-groups"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--all-groups"), @" success: true exit_code: 0 ----- stdout ----- @@ -4358,7 +4358,7 @@ fn sync_default_groups_all() -> Result<()> { "); // Using `--no-dev` should exclude just the dev group - uv_snapshot!(context.filters(), context.sync().arg("--no-dev"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--no-dev"), @" success: true exit_code: 0 ----- stdout ----- @@ -4370,7 +4370,7 @@ fn sync_default_groups_all() -> Result<()> { "); // Using `--group` should be redundant and still work fine - uv_snapshot!(context.filters(), context.sync().arg("--group").arg("foo"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--group").arg("foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -4382,7 +4382,7 @@ fn sync_default_groups_all() -> Result<()> { "); // Using `--only-group` should still disable defaults - uv_snapshot!(context.filters(), context.sync().arg("--only-group").arg("foo"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--only-group").arg("foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -4467,7 +4467,7 @@ fn sync_disable_default_groups_with_environment_variable() -> Result<()> { context.lock().assert().success(); - uv_snapshot!(context.filters(), context.sync().arg("--all-groups"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--all-groups"), @" success: true exit_code: 0 ----- stdout ----- @@ -4488,7 +4488,7 @@ fn sync_disable_default_groups_with_environment_variable() -> Result<()> { "); // Using `UV_NO_DEFAULT_GROUPS` should exclude all groups. - uv_snapshot!(context.filters(), context.sync().env(EnvVars::UV_NO_DEFAULT_GROUPS, "true"), @r" + uv_snapshot!(context.filters(), context.sync().env(EnvVars::UV_NO_DEFAULT_GROUPS, "true"), @" success: true exit_code: 0 ----- stdout ----- @@ -4506,7 +4506,7 @@ fn sync_disable_default_groups_with_environment_variable() -> Result<()> { - urllib3==2.2.1 "); - uv_snapshot!(context.filters(), context.sync().arg("--all-groups"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--all-groups"), @" success: true exit_code: 0 ----- stdout ----- @@ -4529,7 +4529,7 @@ fn sync_disable_default_groups_with_environment_variable() -> Result<()> { uv_snapshot!(context.filters(), context.sync() .arg("--group").arg("foo") .arg("--group").arg("bar") - .env(EnvVars::UV_NO_DEFAULT_GROUPS, "true"), @r" + .env(EnvVars::UV_NO_DEFAULT_GROUPS, "true"), @" success: true exit_code: 0 ----- stdout ----- @@ -4568,7 +4568,7 @@ fn sync_disable_default_groups_all_with_environment_variable() -> Result<()> { context.lock().assert().success(); - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -4589,7 +4589,7 @@ fn sync_disable_default_groups_all_with_environment_variable() -> Result<()> { "); // Using `UV_NO_DEFAULT_GROUPS` should exclude all groups. - uv_snapshot!(context.filters(), context.sync().env(EnvVars::UV_NO_DEFAULT_GROUPS, "true"), @r" + uv_snapshot!(context.filters(), context.sync().env(EnvVars::UV_NO_DEFAULT_GROUPS, "true"), @" success: true exit_code: 0 ----- stdout ----- @@ -4658,7 +4658,7 @@ fn sync_group_member() -> Result<()> { // Generate a lockfile. context.lock().assert().success(); - uv_snapshot!(context.filters(), context.sync().arg("--only-group").arg("foo"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--only-group").arg("foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -4715,14 +4715,14 @@ fn sync_group_legacy_non_project_member() -> Result<()> { )?; // Generate a lockfile. - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 3 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -4781,7 +4781,7 @@ fn sync_group_legacy_non_project_member() -> Result<()> { ); }); - uv_snapshot!(context.filters(), context.sync().arg("--only-group").arg("foo"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--only-group").arg("foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -4826,14 +4826,14 @@ fn sync_group_self() -> Result<()> { )?; // Generate a lockfile. - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -4915,7 +4915,7 @@ fn sync_group_self() -> Result<()> { ); }); - uv_snapshot!(context.filters(), context.sync().arg("--only-group").arg("foo"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--only-group").arg("foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -4929,7 +4929,7 @@ fn sync_group_self() -> Result<()> { + typing-extensions==4.10.0 "); - uv_snapshot!(context.filters(), context.sync().arg("--only-group").arg("bar"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--only-group").arg("bar"), @" success: true exit_code: 0 ----- stdout ----- @@ -4966,7 +4966,7 @@ fn sync_non_existent_extra() -> Result<()> { context.lock().assert().success(); // Requesting a non-existent extra should fail. - uv_snapshot!(context.filters(), context.sync().arg("--extra").arg("baz"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--extra").arg("baz"), @" success: false exit_code: 2 ----- stdout ----- @@ -4977,7 +4977,7 @@ fn sync_non_existent_extra() -> Result<()> { "); // Excluding a non-existing extra when requesting all extras should fail. - uv_snapshot!(context.filters(), context.sync().arg("--all-extras").arg("--no-extra").arg("baz"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--all-extras").arg("--no-extra").arg("baz"), @" success: false exit_code: 2 ----- stdout ----- @@ -5007,7 +5007,7 @@ fn sync_non_existent_extra_no_optional_dependencies() -> Result<()> { context.lock().assert().success(); // Requesting a non-existent extra should fail. - uv_snapshot!(context.filters(), context.sync().arg("--extra").arg("baz"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--extra").arg("baz"), @" success: false exit_code: 2 ----- stdout ----- @@ -5018,7 +5018,7 @@ fn sync_non_existent_extra_no_optional_dependencies() -> Result<()> { "); // Excluding a non-existing extra when requesting all extras should fail. - uv_snapshot!(context.filters(), context.sync().arg("--all-extras").arg("--no-extra").arg("baz"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--all-extras").arg("--no-extra").arg("baz"), @" success: false exit_code: 2 ----- stdout ----- @@ -5079,7 +5079,7 @@ fn sync_ignore_extras_check_when_no_provides_extras() -> Result<()> { "#})?; // Requesting a non-existent extra should not fail, as no validation should be performed. - uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--extra").arg("baz"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--extra").arg("baz"), @" success: true exit_code: 0 ----- stdout ----- @@ -5157,7 +5157,7 @@ fn sync_workspace_members_with_transitive_dependencies() -> Result<()> { // Syncing should build the two transitive dependencies pkg-a and pkg-b, // but not pkg-c, which is not a dependency. - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -5174,7 +5174,7 @@ fn sync_workspace_members_with_transitive_dependencies() -> Result<()> { "); // The lockfile should be valid. - uv_snapshot!(context.filters(), context.lock().arg("--check"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--check"), @" success: true exit_code: 0 ----- stdout ----- @@ -5229,7 +5229,7 @@ fn sync_non_existent_extra_workspace_member() -> Result<()> { context.lock().assert().success(); // Requesting an extra that only exists in the child should fail. - uv_snapshot!(context.filters(), context.sync().arg("--extra").arg("async"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--extra").arg("async"), @" success: false exit_code: 2 ----- stdout ----- @@ -5240,7 +5240,7 @@ fn sync_non_existent_extra_workspace_member() -> Result<()> { "); // Unless we sync from the child directory. - uv_snapshot!(context.filters(), context.sync().arg("--package").arg("child").arg("--extra").arg("async"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--package").arg("child").arg("--extra").arg("async"), @" success: true exit_code: 0 ----- stdout ----- @@ -5303,7 +5303,7 @@ fn sync_non_existent_extra_non_project_workspace() -> Result<()> { // Requesting an extra that only exists in the child should succeed, since we sync all members // by default. - uv_snapshot!(context.filters(), context.sync().arg("--extra").arg("async"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--extra").arg("async"), @" success: true exit_code: 0 ----- stdout ----- @@ -5318,7 +5318,7 @@ fn sync_non_existent_extra_non_project_workspace() -> Result<()> { "); // Syncing from the child should also succeed. - uv_snapshot!(context.filters(), context.sync().arg("--package").arg("child").arg("--extra").arg("async"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--package").arg("child").arg("--extra").arg("async"), @" success: true exit_code: 0 ----- stdout ----- @@ -5329,7 +5329,7 @@ fn sync_non_existent_extra_non_project_workspace() -> Result<()> { "); // Syncing from an unrelated child should fail. - uv_snapshot!(context.filters(), context.sync().arg("--package").arg("other").arg("--extra").arg("async"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--package").arg("other").arg("--extra").arg("async"), @" success: false exit_code: 2 ----- stdout ----- @@ -5405,7 +5405,7 @@ fn no_install_project() -> Result<()> { context.lock().assert().success(); // Running with `--no-install-project` should install `anyio`, but not `project`. - uv_snapshot!(context.filters(), context.sync().arg("--no-install-project"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--no-install-project"), @" success: true exit_code: 0 ----- stdout ----- @@ -5422,14 +5422,14 @@ fn no_install_project() -> Result<()> { // However, we do require the `pyproject.toml`. fs_err::remove_file(pyproject_toml)?; - uv_snapshot!(context.filters(), context.sync().arg("--no-install-project"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--no-install-project"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: No `pyproject.toml` found in current directory or any parent directory - "###); + "); Ok(()) } @@ -5487,7 +5487,7 @@ fn no_install_workspace() -> Result<()> { // Running with `--no-install-workspace` should install `anyio` and `iniconfig`, but not // `project` or `child`. - uv_snapshot!(context.filters(), context.sync().arg("--no-install-workspace"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--no-install-workspace"), @" success: true exit_code: 0 ----- stdout ----- @@ -5508,7 +5508,7 @@ fn no_install_workspace() -> Result<()> { // We don't require the `pyproject.toml` for non-root members, if `--frozen` is provided. fs_err::remove_file(child.join("pyproject.toml"))?; - uv_snapshot!(context.filters(), context.sync().arg("--no-install-workspace").arg("--frozen"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--no-install-workspace").arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -5524,7 +5524,7 @@ fn no_install_workspace() -> Result<()> { "); // Even if `--package` is used. - uv_snapshot!(context.filters(), context.sync().arg("--package").arg("child").arg("--no-install-workspace").arg("--frozen"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--package").arg("child").arg("--no-install-workspace").arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -5537,7 +5537,7 @@ fn no_install_workspace() -> Result<()> { "); // Unless the package doesn't exist. - uv_snapshot!(context.filters(), context.sync().arg("--package").arg("fake").arg("--no-install-workspace").arg("--frozen"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--package").arg("fake").arg("--no-install-workspace").arg("--frozen"), @" success: false exit_code: 2 ----- stdout ----- @@ -5547,7 +5547,7 @@ fn no_install_workspace() -> Result<()> { "); // Even if `--all-packages` is used. - uv_snapshot!(context.filters(), context.sync().arg("--all-packages").arg("--no-install-workspace").arg("--frozen"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--all-packages").arg("--no-install-workspace").arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -5562,14 +5562,14 @@ fn no_install_workspace() -> Result<()> { // But we do require the root `pyproject.toml`. fs_err::remove_file(context.temp_dir.join("pyproject.toml"))?; - uv_snapshot!(context.filters(), context.sync().arg("--no-install-workspace").arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--no-install-workspace").arg("--frozen"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: No `pyproject.toml` found in current directory or any parent directory - "###); + "); Ok(()) } @@ -5641,7 +5641,7 @@ fn no_install_local() -> Result<()> { )?; context.lock().assert().success(); - uv_snapshot!(context.filters(), context.sync().arg("--no-install-local"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--no-install-local"), @" success: true exit_code: 0 ----- stdout ----- @@ -5682,7 +5682,7 @@ fn no_install_package() -> Result<()> { context.lock().assert().success(); // Running with `--no-install-package anyio` should skip anyio but include everything else - uv_snapshot!(context.filters(), context.sync().arg("--no-install-package").arg("anyio"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--no-install-package").arg("anyio"), @" success: true exit_code: 0 ----- stdout ----- @@ -5698,7 +5698,7 @@ fn no_install_package() -> Result<()> { // Running with `--no-install-package project` should skip the project itself (not as a special // case, that's just the name of the project) - uv_snapshot!(context.filters(), context.sync().arg("--no-install-package").arg("project"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--no-install-package").arg("project"), @" success: true exit_code: 0 ----- stdout ----- @@ -5739,7 +5739,7 @@ fn no_install_project_no_build() -> Result<()> { context.lock().assert().success(); // `--no-build` should raise an error, since we try to install the project. - uv_snapshot!(context.filters(), context.sync().arg("--no-build"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--no-build"), @" success: false exit_code: 2 ----- stdout ----- @@ -5751,7 +5751,7 @@ fn no_install_project_no_build() -> Result<()> { // But it's fine to combine `--no-install-project` with `--no-build`. We shouldn't error, since // we aren't building the project. - uv_snapshot!(context.filters(), context.sync().arg("--no-install-project").arg("--no-build").arg("--locked"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--no-install-project").arg("--no-build").arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- @@ -5820,7 +5820,7 @@ fn sync_extra_build_dependencies_script() -> Result<()> { .collect::>(); // Running `uv sync` should fail due to missing build-dependencies - uv_snapshot!(filters, context.sync().arg("--script").arg("script.py"), @r" + uv_snapshot!(filters, context.sync().arg("--script").arg("script.py"), @" success: false exit_code: 1 ----- stdout ----- @@ -5854,7 +5854,7 @@ fn sync_extra_build_dependencies_script() -> Result<()> { // Running `uv sync` should now succeed due to extra build-dependencies context.venv().arg("--clear").assert().success(); - uv_snapshot!(filters, context.sync().arg("--script").arg("script.py"), @r" + uv_snapshot!(filters, context.sync().arg("--script").arg("script.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -5933,7 +5933,7 @@ fn sync_extra_build_dependencies_script_sources() -> Result<()> { .collect::>(); // Running `uv sync` should succeed with the sources applied - uv_snapshot!(filters, context.sync().arg("--script").arg("script.py"), @r" + uv_snapshot!(filters, context.sync().arg("--script").arg("script.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -5971,7 +5971,7 @@ fn virtual_no_build() -> Result<()> { fs_err::remove_dir_all(&context.cache_dir)?; // `--no-build` should not raise an error, since we don't install virtual projects. - uv_snapshot!(context.filters(), context.sync().arg("--no-build"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--no-build"), @" success: true exit_code: 0 ----- stdout ----- @@ -5999,7 +5999,7 @@ fn virtual_empty() -> Result<()> { wow = "someconfig" "#})?; - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -6028,7 +6028,7 @@ fn virtual_dependency_group() -> Result<()> { "#})?; // default groups - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -6043,7 +6043,7 @@ fn virtual_dependency_group() -> Result<()> { // explicit --group uv_snapshot!(context.filters(), context.sync() - .arg("--group").arg("bar"), @r" + .arg("--group").arg("bar"), @" success: true exit_code: 0 ----- stdout ----- @@ -6058,7 +6058,7 @@ fn virtual_dependency_group() -> Result<()> { // explicit --only-group uv_snapshot!(context.filters(), context.sync() - .arg("--only-group").arg("foo"), @r" + .arg("--only-group").arg("foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -6105,7 +6105,7 @@ fn virtual_no_build_dynamic_cached() -> Result<()> { // `--no-build` should not raise an error, since we don't build or install the project (given // that it's virtual and the metadata is cached). - uv_snapshot!(context.filters(), context.sync().arg("--no-build"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--no-build"), @" success: true exit_code: 0 ----- stdout ----- @@ -6152,7 +6152,7 @@ fn virtual_no_build_dynamic_no_cache() -> Result<()> { fs_err::remove_dir_all(&context.cache_dir)?; // `--no-build` should raise an error, since we need to build the project. - uv_snapshot!(context.filters(), context.sync().arg("--no-build"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--no-build"), @" success: false exit_code: 2 ----- stdout ----- @@ -6186,7 +6186,7 @@ fn convert_to_virtual() -> Result<()> { )?; // Running `uv sync` should install the project itself. - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -6248,7 +6248,7 @@ fn convert_to_virtual() -> Result<()> { )?; // Running `uv sync` should remove the project itself. - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -6316,7 +6316,7 @@ fn convert_to_package() -> Result<()> { )?; // Running `uv sync` should not install the project itself. - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -6381,7 +6381,7 @@ fn convert_to_package() -> Result<()> { )?; // Running `uv sync` should install the project itself. - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -6451,7 +6451,7 @@ fn sync_custom_environment_path() -> Result<()> { )?; // Running `uv sync` should create `.venv` by default - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -6471,7 +6471,7 @@ fn sync_custom_environment_path() -> Result<()> { .assert(predicate::path::is_dir()); // Running `uv sync` should create `foo` in the project directory when customized - uv_snapshot!(context.filters(), context.sync().env(EnvVars::UV_PROJECT_ENVIRONMENT, "foo"), @r" + uv_snapshot!(context.filters(), context.sync().env(EnvVars::UV_PROJECT_ENVIRONMENT, "foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -6496,7 +6496,7 @@ fn sync_custom_environment_path() -> Result<()> { .assert(predicate::path::is_dir()); // An absolute path can be provided - uv_snapshot!(context.filters(), context.sync().env(EnvVars::UV_PROJECT_ENVIRONMENT, "foobar/.venv"), @r" + uv_snapshot!(context.filters(), context.sync().env(EnvVars::UV_PROJECT_ENVIRONMENT, "foobar/.venv"), @" success: true exit_code: 0 ----- stdout ----- @@ -6521,7 +6521,7 @@ fn sync_custom_environment_path() -> Result<()> { .assert(predicate::path::is_dir()); // An absolute path can be provided - uv_snapshot!(context.filters(), context.sync().env(EnvVars::UV_PROJECT_ENVIRONMENT, context.temp_dir.join("bar")), @r" + uv_snapshot!(context.filters(), context.sync().env(EnvVars::UV_PROJECT_ENVIRONMENT, context.temp_dir.join("bar")), @" success: true exit_code: 0 ----- stdout ----- @@ -6542,7 +6542,7 @@ fn sync_custom_environment_path() -> Result<()> { // And, it can be outside the project let tempdir = tempdir_in(TestContext::test_bucket_dir())?; context = context.with_filtered_path(tempdir.path(), "OTHER_TEMPDIR"); - uv_snapshot!(context.filters(), context.sync().env(EnvVars::UV_PROJECT_ENVIRONMENT, tempdir.path().join(".venv")), @r" + uv_snapshot!(context.filters(), context.sync().env(EnvVars::UV_PROJECT_ENVIRONMENT, tempdir.path().join(".venv")), @" success: true exit_code: 0 ----- stdout ----- @@ -6563,18 +6563,18 @@ fn sync_custom_environment_path() -> Result<()> { fs_err::remove_dir_all(context.temp_dir.join("foo"))?; fs_err::create_dir(context.temp_dir.join("foo"))?; fs_err::write(context.temp_dir.join("foo").join("file"), b"")?; - uv_snapshot!(context.filters(), context.sync().env(EnvVars::UV_PROJECT_ENVIRONMENT, "foo"), @r###" + uv_snapshot!(context.filters(), context.sync().env(EnvVars::UV_PROJECT_ENVIRONMENT, "foo"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: Project virtual environment directory `[TEMP_DIR]/foo` cannot be used because it is not a valid Python environment (no Python executable was found) - "###); + "); // But if it's just an incompatible virtual environment... fs_err::remove_dir_all(context.temp_dir.join("foo"))?; - uv_snapshot!(context.filters(), context.venv().arg("foo").arg("--python").arg("3.11"), @r" + uv_snapshot!(context.filters(), context.venv().arg("foo").arg("--python").arg("3.11"), @" success: true exit_code: 0 ----- stdout ----- @@ -6590,7 +6590,7 @@ fn sync_custom_environment_path() -> Result<()> { fs_err::write(context.temp_dir.join("foo").join("file"), b"")?; // We can delete and use it - uv_snapshot!(context.filters(), context.sync().env(EnvVars::UV_PROJECT_ENVIRONMENT, "foo"), @r" + uv_snapshot!(context.filters(), context.sync().env(EnvVars::UV_PROJECT_ENVIRONMENT, "foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -6625,7 +6625,7 @@ fn sync_active_project_environment() -> Result<()> { )?; // Running `uv sync` with `VIRTUAL_ENV` should warn - uv_snapshot!(context.filters(), context.sync().env(EnvVars::VIRTUAL_ENV, "foo"), @r###" + uv_snapshot!(context.filters(), context.sync().env(EnvVars::VIRTUAL_ENV, "foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -6638,7 +6638,7 @@ fn sync_active_project_environment() -> Result<()> { Prepared 1 package in [TIME] Installed 1 package in [TIME] + iniconfig==2.0.0 - "###); + "); context .temp_dir @@ -6651,7 +6651,7 @@ fn sync_active_project_environment() -> Result<()> { .assert(predicate::path::missing()); // Using `--active` should create the environment - uv_snapshot!(context.filters(), context.sync().env(EnvVars::VIRTUAL_ENV, "foo").arg("--active"), @r" + uv_snapshot!(context.filters(), context.sync().env(EnvVars::VIRTUAL_ENV, "foo").arg("--active"), @" success: true exit_code: 0 ----- stdout ----- @@ -6670,7 +6670,7 @@ fn sync_active_project_environment() -> Result<()> { .assert(predicate::path::is_dir()); // A subsequent sync will re-use the environment - uv_snapshot!(context.filters(), context.sync().env(EnvVars::VIRTUAL_ENV, "foo").arg("--active"), @r" + uv_snapshot!(context.filters(), context.sync().env(EnvVars::VIRTUAL_ENV, "foo").arg("--active"), @" success: true exit_code: 0 ----- stdout ----- @@ -6684,7 +6684,7 @@ fn sync_active_project_environment() -> Result<()> { uv_snapshot!(context.filters(), context.sync() .arg("--active") .env(EnvVars::VIRTUAL_ENV, "foo") - .env(EnvVars::UV_PROJECT_ENVIRONMENT, "foo"), @r" + .env(EnvVars::UV_PROJECT_ENVIRONMENT, "foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -6698,7 +6698,7 @@ fn sync_active_project_environment() -> Result<()> { uv_snapshot!(context.filters(), context.sync() .arg("--active") .env(EnvVars::VIRTUAL_ENV, "foo") - .env(EnvVars::UV_PROJECT_ENVIRONMENT, "bar"), @r" + .env(EnvVars::UV_PROJECT_ENVIRONMENT, "bar"), @" success: true exit_code: 0 ----- stdout ----- @@ -6715,7 +6715,7 @@ fn sync_active_project_environment() -> Result<()> { // Requesting another Python version will invalidate the environment uv_snapshot!(context.filters(), context.sync() - .env(EnvVars::VIRTUAL_ENV, "foo").arg("--active").arg("-p").arg("3.12"), @r" + .env(EnvVars::VIRTUAL_ENV, "foo").arg("--active").arg("-p").arg("3.12"), @" success: true exit_code: 0 ----- stdout ----- @@ -6752,7 +6752,7 @@ fn sync_active_script_environment() -> Result<()> { })?; // Running `uv sync --script` with `VIRTUAL_ENV` should warn - uv_snapshot!(context.filters(), context.sync().arg("--script").arg("script.py").env(EnvVars::VIRTUAL_ENV, "foo"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--script").arg("script.py").env(EnvVars::VIRTUAL_ENV, "foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -6774,7 +6774,7 @@ fn sync_active_script_environment() -> Result<()> { .assert(predicate::path::missing()); // Using `--active` should create the environment - uv_snapshot!(context.filters(), context.sync().arg("--script").arg("script.py").env(EnvVars::VIRTUAL_ENV, "foo").arg("--active"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--script").arg("script.py").env(EnvVars::VIRTUAL_ENV, "foo").arg("--active"), @" success: true exit_code: 0 ----- stdout ----- @@ -6794,7 +6794,7 @@ fn sync_active_script_environment() -> Result<()> { .assert(predicate::path::is_dir()); // A subsequent sync will re-use the environment - uv_snapshot!(context.filters(), context.sync().arg("--script").arg("script.py").env(EnvVars::VIRTUAL_ENV, "foo").arg("--active"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--script").arg("script.py").env(EnvVars::VIRTUAL_ENV, "foo").arg("--active"), @" success: true exit_code: 0 ----- stdout ----- @@ -6812,7 +6812,7 @@ fn sync_active_script_environment() -> Result<()> { .env(EnvVars::VIRTUAL_ENV, "foo") .arg("--active") .arg("-p") - .arg("3.12"), @r" + .arg("3.12"), @" success: true exit_code: 0 ----- stdout ----- @@ -6973,7 +6973,7 @@ fn sync_active_script_environment_json() -> Result<()> { .assert(predicate::path::is_dir()); // A subsequent sync will re-use the environment - uv_snapshot!(context.filters(), context.sync().arg("--script").arg("script.py").env(EnvVars::VIRTUAL_ENV, "foo").arg("--active"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--script").arg("script.py").env(EnvVars::VIRTUAL_ENV, "foo").arg("--active"), @" success: true exit_code: 0 ----- stdout ----- @@ -7066,7 +7066,7 @@ fn sync_workspace_custom_environment_path() -> Result<()> { context.init().arg("child").assert().success(); // Running `uv sync` should create `.venv` in the workspace root - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -7084,7 +7084,7 @@ fn sync_workspace_custom_environment_path() -> Result<()> { .assert(predicate::path::is_dir()); // Similarly, `uv sync` from the child project uses `.venv` in the workspace root - uv_snapshot!(context.filters(), context.sync().current_dir(context.temp_dir.join("child")), @r" + uv_snapshot!(context.filters(), context.sync().current_dir(context.temp_dir.join("child")), @" success: true exit_code: 0 ----- stdout ----- @@ -7107,7 +7107,7 @@ fn sync_workspace_custom_environment_path() -> Result<()> { .assert(predicate::path::missing()); // Running `uv sync` should create `foo` in the workspace root when customized - uv_snapshot!(context.filters(), context.sync().env(EnvVars::UV_PROJECT_ENVIRONMENT, "foo"), @r" + uv_snapshot!(context.filters(), context.sync().env(EnvVars::UV_PROJECT_ENVIRONMENT, "foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -7132,7 +7132,7 @@ fn sync_workspace_custom_environment_path() -> Result<()> { .assert(predicate::path::is_dir()); // Similarly, `uv sync` from the child project uses `foo` relative to the workspace root - uv_snapshot!(context.filters(), context.sync().env(EnvVars::UV_PROJECT_ENVIRONMENT, "foo").current_dir(context.temp_dir.join("child")), @r" + uv_snapshot!(context.filters(), context.sync().env(EnvVars::UV_PROJECT_ENVIRONMENT, "foo").current_dir(context.temp_dir.join("child")), @" success: true exit_code: 0 ----- stdout ----- @@ -7155,7 +7155,7 @@ fn sync_workspace_custom_environment_path() -> Result<()> { .assert(predicate::path::missing()); // And, `uv sync --package child` uses `foo` relative to the workspace root - uv_snapshot!(context.filters(), context.sync().arg("--package").arg("child").env(EnvVars::UV_PROJECT_ENVIRONMENT, "foo"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--package").arg("child").env(EnvVars::UV_PROJECT_ENVIRONMENT, "foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -7198,7 +7198,7 @@ fn sync_empty_virtual_environment() -> Result<()> { )?; // Running `uv sync` should work - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -7232,7 +7232,7 @@ fn sync_legacy_non_project_warning() -> Result<()> { )?; // We should not warn if it matches the project environment - uv_snapshot!(context.filters(), context.sync().env(EnvVars::VIRTUAL_ENV, context.temp_dir.join(".venv")), @r" + uv_snapshot!(context.filters(), context.sync().env(EnvVars::VIRTUAL_ENV, context.temp_dir.join(".venv")), @" success: true exit_code: 0 ----- stdout ----- @@ -7245,7 +7245,7 @@ fn sync_legacy_non_project_warning() -> Result<()> { "); // Including if it's a relative path that matches - uv_snapshot!(context.filters(), context.sync().env(EnvVars::VIRTUAL_ENV, ".venv"), @r" + uv_snapshot!(context.filters(), context.sync().env(EnvVars::VIRTUAL_ENV, ".venv"), @" success: true exit_code: 0 ----- stdout ----- @@ -7263,7 +7263,7 @@ fn sync_legacy_non_project_warning() -> Result<()> { let link = context.temp_dir.join("link"); symlink(context.temp_dir.join(".venv"), &link)?; - uv_snapshot!(context.filters(), context.sync().env(EnvVars::VIRTUAL_ENV, link), @r" + uv_snapshot!(context.filters(), context.sync().env(EnvVars::VIRTUAL_ENV, link), @" success: true exit_code: 0 ----- stdout ----- @@ -7275,7 +7275,7 @@ fn sync_legacy_non_project_warning() -> Result<()> { } // But we should warn if it's a different path - uv_snapshot!(context.filters(), context.sync().env(EnvVars::VIRTUAL_ENV, "foo"), @r" + uv_snapshot!(context.filters(), context.sync().env(EnvVars::VIRTUAL_ENV, "foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -7287,7 +7287,7 @@ fn sync_legacy_non_project_warning() -> Result<()> { "); // Including absolute paths - uv_snapshot!(context.filters(), context.sync().env(EnvVars::VIRTUAL_ENV, context.temp_dir.join("foo")), @r" + uv_snapshot!(context.filters(), context.sync().env(EnvVars::VIRTUAL_ENV, context.temp_dir.join("foo")), @" success: true exit_code: 0 ----- stdout ----- @@ -7299,7 +7299,7 @@ fn sync_legacy_non_project_warning() -> Result<()> { "); // We should not warn if the project environment has been customized and matches - uv_snapshot!(context.filters(), context.sync().env(EnvVars::VIRTUAL_ENV, "foo").env(EnvVars::UV_PROJECT_ENVIRONMENT, "foo"), @r" + uv_snapshot!(context.filters(), context.sync().env(EnvVars::VIRTUAL_ENV, "foo").env(EnvVars::UV_PROJECT_ENVIRONMENT, "foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -7313,7 +7313,7 @@ fn sync_legacy_non_project_warning() -> Result<()> { "); // But we should warn if they don't match still - uv_snapshot!(context.filters(), context.sync().env(EnvVars::VIRTUAL_ENV, "foo").env(EnvVars::UV_PROJECT_ENVIRONMENT, "bar"), @r" + uv_snapshot!(context.filters(), context.sync().env(EnvVars::VIRTUAL_ENV, "foo").env(EnvVars::UV_PROJECT_ENVIRONMENT, "bar"), @" success: true exit_code: 0 ----- stdout ----- @@ -7332,7 +7332,7 @@ fn sync_legacy_non_project_warning() -> Result<()> { // And `VIRTUAL_ENV` is resolved relative to the project root so with relative paths we should // warn from a child too - uv_snapshot!(context.filters(), context.sync().env(EnvVars::VIRTUAL_ENV, "foo").env(EnvVars::UV_PROJECT_ENVIRONMENT, "foo").current_dir(&child), @r" + uv_snapshot!(context.filters(), context.sync().env(EnvVars::VIRTUAL_ENV, "foo").env(EnvVars::UV_PROJECT_ENVIRONMENT, "foo").current_dir(&child), @" success: true exit_code: 0 ----- stdout ----- @@ -7344,7 +7344,7 @@ fn sync_legacy_non_project_warning() -> Result<()> { "); // But, a matching absolute path shouldn't warn - uv_snapshot!(context.filters(), context.sync().env(EnvVars::VIRTUAL_ENV, context.temp_dir.join("foo")).env(EnvVars::UV_PROJECT_ENVIRONMENT, "foo").current_dir(&child), @r" + uv_snapshot!(context.filters(), context.sync().env(EnvVars::VIRTUAL_ENV, context.temp_dir.join("foo")).env(EnvVars::UV_PROJECT_ENVIRONMENT, "foo").current_dir(&child), @" success: true exit_code: 0 ----- stdout ----- @@ -7372,7 +7372,7 @@ fn sync_update_project() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -7401,7 +7401,7 @@ fn sync_update_project() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -7432,7 +7432,7 @@ fn sync_environment_prompt() -> Result<()> { )?; // Running `uv sync` should create `.venv` - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -7471,7 +7471,7 @@ fn no_binary() -> Result<()> { context.lock().assert().success(); - uv_snapshot!(context.filters(), context.sync().arg("--no-binary-package").arg("iniconfig"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--no-binary-package").arg("iniconfig"), @" success: true exit_code: 0 ----- stdout ----- @@ -7485,7 +7485,7 @@ fn no_binary() -> Result<()> { assert!(context.temp_dir.child("uv.lock").exists()); - uv_snapshot!(context.filters(), context.sync().arg("--reinstall").arg("--no-binary"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--reinstall").arg("--no-binary"), @" success: true exit_code: 0 ----- stdout ----- @@ -7498,7 +7498,7 @@ fn no_binary() -> Result<()> { ~ iniconfig==2.0.0 "); - uv_snapshot!(context.filters(), context.sync().arg("--reinstall").env(EnvVars::UV_NO_BINARY_PACKAGE, "iniconfig"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--reinstall").env(EnvVars::UV_NO_BINARY_PACKAGE, "iniconfig"), @" success: true exit_code: 0 ----- stdout ----- @@ -7511,7 +7511,7 @@ fn no_binary() -> Result<()> { ~ iniconfig==2.0.0 "); - uv_snapshot!(context.filters(), context.sync().arg("--reinstall").env(EnvVars::UV_NO_BINARY, "1"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--reinstall").env(EnvVars::UV_NO_BINARY, "1"), @" success: true exit_code: 0 ----- stdout ----- @@ -7524,7 +7524,7 @@ fn no_binary() -> Result<()> { ~ iniconfig==2.0.0 "); - uv_snapshot!(context.filters(), context.sync().arg("--reinstall").env(EnvVars::UV_NO_BINARY, "iniconfig"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--reinstall").env(EnvVars::UV_NO_BINARY, "iniconfig"), @" success: false exit_code: 2 ----- stdout ----- @@ -7533,7 +7533,7 @@ fn no_binary() -> Result<()> { error: invalid value 'iniconfig' for '--no-binary': value was not a boolean For more information, try '--help'. - "###); + "); Ok(()) } @@ -7555,7 +7555,7 @@ fn no_binary_error() -> Result<()> { context.lock().assert().success(); - uv_snapshot!(context.filters(), context.sync().arg("--no-binary-package").arg("odrive"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--no-binary-package").arg("odrive"), @" success: false exit_code: 2 ----- stdout ----- @@ -7587,7 +7587,7 @@ fn no_build() -> Result<()> { context.lock().assert().success(); - uv_snapshot!(context.filters(), context.sync().arg("--no-build-package").arg("iniconfig"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--no-build-package").arg("iniconfig"), @" success: true exit_code: 0 ----- stdout ----- @@ -7601,7 +7601,7 @@ fn no_build() -> Result<()> { assert!(context.temp_dir.child("uv.lock").exists()); - uv_snapshot!(context.filters(), context.sync().arg("--reinstall").env(EnvVars::UV_NO_BUILD_PACKAGE, "iniconfig"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--reinstall").env(EnvVars::UV_NO_BUILD_PACKAGE, "iniconfig"), @" success: true exit_code: 0 ----- stdout ----- @@ -7634,7 +7634,7 @@ fn no_build_error() -> Result<()> { context.lock().assert().success(); - uv_snapshot!(context.filters(), context.sync().arg("--no-build-package").arg("django-allauth"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--no-build-package").arg("django-allauth"), @" success: false exit_code: 2 ----- stdout ----- @@ -7644,7 +7644,7 @@ fn no_build_error() -> Result<()> { error: Distribution `django-allauth==0.51.0 @ registry+https://pypi.org/simple` can't be installed because it is marked as `--no-build` but has no binary distribution "); - uv_snapshot!(context.filters(), context.sync().arg("--no-build"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--no-build"), @" success: false exit_code: 2 ----- stdout ----- @@ -7654,7 +7654,7 @@ fn no_build_error() -> Result<()> { error: Distribution `django-allauth==0.51.0 @ registry+https://pypi.org/simple` can't be installed because it is marked as `--no-build` but has no binary distribution "); - uv_snapshot!(context.filters(), context.sync().arg("--reinstall").env(EnvVars::UV_NO_BUILD, "1"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--reinstall").env(EnvVars::UV_NO_BUILD, "1"), @" success: false exit_code: 2 ----- stdout ----- @@ -7664,7 +7664,7 @@ fn no_build_error() -> Result<()> { error: Distribution `django-allauth==0.51.0 @ registry+https://pypi.org/simple` can't be installed because it is marked as `--no-build` but has no binary distribution "); - uv_snapshot!(context.filters(), context.sync().arg("--reinstall").env(EnvVars::UV_NO_BUILD_PACKAGE, "django-allauth"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--reinstall").env(EnvVars::UV_NO_BUILD_PACKAGE, "django-allauth"), @" success: false exit_code: 2 ----- stdout ----- @@ -7674,7 +7674,7 @@ fn no_build_error() -> Result<()> { error: Distribution `django-allauth==0.51.0 @ registry+https://pypi.org/simple` can't be installed because it is marked as `--no-build` but has no binary distribution "); - uv_snapshot!(context.filters(), context.sync().arg("--reinstall").env(EnvVars::UV_NO_BUILD, "django-allauth"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--reinstall").env(EnvVars::UV_NO_BUILD, "django-allauth"), @" success: false exit_code: 2 ----- stdout ----- @@ -7683,7 +7683,7 @@ fn no_build_error() -> Result<()> { error: invalid value 'django-allauth' for '--no-build': value was not a boolean For more information, try '--help'. - "###); + "); assert!(context.temp_dir.child("uv.lock").exists()); @@ -7707,16 +7707,16 @@ fn sync_wheel_url_source_error() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 3 packages in [TIME] - "###); + "); - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: false exit_code: 2 ----- stdout ----- @@ -7758,16 +7758,16 @@ fn sync_wheel_path_source_error() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 3 packages in [TIME] - "###); + "); - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: false exit_code: 2 ----- stdout ----- @@ -7839,7 +7839,7 @@ fn sync_override_package() -> Result<()> { .touch()?; // Syncing the project should _not_ install `core`. - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -7871,7 +7871,7 @@ fn sync_override_package() -> Result<()> { )?; // Syncing the project _should_ install `core`. - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -7901,7 +7901,7 @@ fn sync_override_package() -> Result<()> { )?; // Syncing the project _should_ install `core`. - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -7934,7 +7934,7 @@ fn sync_override_package() -> Result<()> { )?; // Syncing the project should _not_ install `core`. - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -7986,7 +7986,7 @@ fn sync_override_package() -> Result<()> { )?; // Syncing the project should _not_ install `core`. - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -8019,7 +8019,7 @@ fn sync_override_package() -> Result<()> { )?; // Syncing the project _should_ install `core`. - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -8093,7 +8093,7 @@ fn transitive_dev() -> Result<()> { let init = src.child("__init__.py"); init.touch()?; - uv_snapshot!(context.filters(), context.sync().arg("--dev"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--dev"), @" success: true exit_code: 0 ----- stdout ----- @@ -8167,7 +8167,7 @@ fn sync_no_editable() -> Result<()> { let init = src.child("__init__.py"); init.touch()?; - uv_snapshot!(context.filters(), context.sync().arg("--no-editable"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--no-editable"), @" success: true exit_code: 0 ----- stdout ----- @@ -8180,7 +8180,7 @@ fn sync_no_editable() -> Result<()> { + root==0.1.0 (from file://[TEMP_DIR]/) "); - uv_snapshot!(context.filters(), context.sync().env(EnvVars::UV_NO_EDITABLE, "1"), @r" + uv_snapshot!(context.filters(), context.sync().env(EnvVars::UV_NO_EDITABLE, "1"), @" success: true exit_code: 0 ----- stdout ----- @@ -8194,13 +8194,13 @@ fn sync_no_editable() -> Result<()> { fs_err::remove_dir_all(&child)?; // Ensure that we can still import it. - uv_snapshot!(context.filters(), context.run().arg("--no-sync").arg("python").arg("-c").arg("import child"), @r###" + uv_snapshot!(context.filters(), context.run().arg("--no-sync").arg("python").arg("-c").arg("import child"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- - "###); + "); Ok(()) } @@ -8233,7 +8233,7 @@ fn sync_scripts_without_build_system() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -8282,7 +8282,7 @@ fn sync_scripts_project_not_packaged() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -8324,7 +8324,7 @@ fn sync_dynamic_extra() -> Result<()> { .child("requirements-dev.txt") .write_str("typing-extensions")?; - uv_snapshot!(context.filters(), context.sync().arg("--extra").arg("dev"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--extra").arg("dev"), @" success: true exit_code: 0 ----- stdout ----- @@ -8397,7 +8397,7 @@ fn sync_dynamic_extra() -> Result<()> { ); // Check that we can re-read the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--locked"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- @@ -8476,7 +8476,7 @@ fn build_system_requires_workspace() -> Result<()> { ", })?; - uv_snapshot!(context.filters(), context.sync().current_dir(context.temp_dir.child("project")), @r" + uv_snapshot!(context.filters(), context.sync().current_dir(context.temp_dir.child("project")), @" success: true exit_code: 0 ----- stdout ----- @@ -8556,7 +8556,7 @@ fn build_system_requires_path() -> Result<()> { ", })?; - uv_snapshot!(context.filters(), context.sync().current_dir(context.temp_dir.child("project")), @r" + uv_snapshot!(context.filters(), context.sync().current_dir(context.temp_dir.child("project")), @" success: true exit_code: 0 ----- stdout ----- @@ -8594,7 +8594,7 @@ fn sync_invalid_environment() -> Result<()> { // If the directory already exists and is not a virtual environment we should fail with an error fs_err::create_dir(context.temp_dir.join(".venv"))?; fs_err::write(context.temp_dir.join(".venv").join("file"), b"")?; - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: false exit_code: 2 ----- stdout ----- @@ -8605,7 +8605,7 @@ fn sync_invalid_environment() -> Result<()> { // But if it's just an incompatible virtual environment... fs_err::remove_dir_all(context.temp_dir.join(".venv"))?; - uv_snapshot!(context.filters(), context.venv().arg("--python").arg("3.11"), @r" + uv_snapshot!(context.filters(), context.venv().arg("--python").arg("3.11"), @" success: true exit_code: 0 ----- stdout ----- @@ -8621,7 +8621,7 @@ fn sync_invalid_environment() -> Result<()> { fs_err::write(context.temp_dir.join(".venv").join("file"), b"")?; // We can delete and use it - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -8643,7 +8643,7 @@ fn sync_invalid_environment() -> Result<()> { { fs_err::remove_file(bin.join("python"))?; fs_err::os::unix::fs::symlink(context.temp_dir.join("does-not-exist"), bin.join("python"))?; - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -8661,7 +8661,7 @@ fn sync_invalid_environment() -> Result<()> { // If the Python executable is missing entirely, we'll delete and use it fs_err::remove_dir_all(&bin)?; - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -8677,7 +8677,7 @@ fn sync_invalid_environment() -> Result<()> { // But if it's not a virtual environment... fs_err::remove_dir_all(context.temp_dir.join(".venv"))?; - uv_snapshot!(context.filters(), context.venv().arg("--python").arg("3.11"), @r" + uv_snapshot!(context.filters(), context.venv().arg("--python").arg("3.11"), @" success: true exit_code: 0 ----- stdout ----- @@ -8696,7 +8696,7 @@ fn sync_invalid_environment() -> Result<()> { fs_err::write(context.temp_dir.join(".venv").join("file"), b"")?; // We should never delete it - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: false exit_code: 2 ----- stdout ----- @@ -8708,7 +8708,7 @@ fn sync_invalid_environment() -> Result<()> { // Even if there's no Python executable fs_err::remove_dir_all(&bin)?; - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: false exit_code: 2 ----- stdout ----- @@ -8739,7 +8739,7 @@ fn sync_partial_environment_delete() -> Result<()> { let context = TestContext::new_with_versions(&["3.13", "3.12"]); context.init().arg("-p").arg("3.12").assert().success(); - uv_snapshot!(context.filters(), context.sync().arg("-p").arg("3.13"), @r" + uv_snapshot!(context.filters(), context.sync().arg("-p").arg("3.13"), @" success: true exit_code: 0 ----- stdout ----- @@ -8759,7 +8759,7 @@ fn sync_partial_environment_delete() -> Result<()> { let perms = std::fs::Permissions::from_mode(0o000); fs_err::set_permissions(&unreadable2, perms)?; - uv_snapshot!(context.filters(), context.sync().arg("-p").arg("3.12"), @r" + uv_snapshot!(context.filters(), context.sync().arg("-p").arg("3.12"), @" success: false exit_code: 2 ----- stdout ----- @@ -8769,7 +8769,7 @@ fn sync_partial_environment_delete() -> Result<()> { error: failed to remove directory `[VENV]/z2.txt`: Permission denied (os error 13) "); - uv_snapshot!(context.filters(), context.sync().arg("-p").arg("3.12"), @r" + uv_snapshot!(context.filters(), context.sync().arg("-p").arg("3.12"), @" success: false exit_code: 2 ----- stdout ----- @@ -8783,7 +8783,7 @@ fn sync_partial_environment_delete() -> Result<()> { fs_err::remove_dir(unreadable2)?; // We should be able to remove the venv now - uv_snapshot!(context.filters(), context.sync().arg("-p").arg("3.12"), @r" + uv_snapshot!(context.filters(), context.sync().arg("-p").arg("3.12"), @" success: true exit_code: 0 ----- stdout ----- @@ -8828,7 +8828,7 @@ fn sync_no_sources_missing_member() -> Result<()> { let init = src.child("__init__.py"); init.touch()?; - uv_snapshot!(context.filters(), context.sync().arg("--no-sources"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--no-sources"), @" success: true exit_code: 0 ----- stdout ----- @@ -8859,7 +8859,7 @@ fn sync_python_version() -> Result<()> { "#})?; // We should respect the project's required version, not the first on the path - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -8876,7 +8876,7 @@ fn sync_python_version() -> Result<()> { "); // Unless explicitly requested... - uv_snapshot!(context.filters(), context.sync().arg("--python").arg("3.10"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--python").arg("3.10"), @" success: false exit_code: 2 ----- stdout ----- @@ -8887,16 +8887,16 @@ fn sync_python_version() -> Result<()> { "); // But a pin should take precedence - uv_snapshot!(context.filters(), context.python_pin().arg("3.12"), @r###" + uv_snapshot!(context.filters(), context.python_pin().arg("3.12"), @" success: true exit_code: 0 ----- stdout ----- Pinned `.python-version` to `3.12` ----- stderr ----- - "###); + "); - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -8913,17 +8913,17 @@ fn sync_python_version() -> Result<()> { "); // Create a pin that's incompatible with the project - uv_snapshot!(context.filters(), context.python_pin().arg("3.10").arg("--no-workspace"), @r###" + uv_snapshot!(context.filters(), context.python_pin().arg("3.10").arg("--no-workspace"), @" success: true exit_code: 0 ----- stdout ----- Updated `.python-version` from `3.12` -> `3.10` ----- stderr ----- - "###); + "); // We should warn on subsequent uses, but respect the pinned version? - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: false exit_code: 2 ----- stdout ----- @@ -8949,7 +8949,7 @@ fn sync_python_version() -> Result<()> { "#}) .unwrap(); - uv_snapshot!(context.filters(), context.sync().current_dir(&child_dir), @r" + uv_snapshot!(context.filters(), context.sync().current_dir(&child_dir), @" success: true exit_code: 0 ----- stdout ----- @@ -8992,7 +8992,7 @@ fn sync_explicit() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -9008,7 +9008,7 @@ fn sync_explicit() -> Result<()> { fs_err::remove_dir_all(&context.venv)?; // The package should be drawn from the cache. - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -9081,7 +9081,7 @@ fn sync_all() -> Result<()> { context.lock().assert().success(); // Sync all workspace members. - uv_snapshot!(context.filters(), context.sync().arg("--all-packages"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--all-packages"), @" success: true exit_code: 0 ----- stdout ----- @@ -9162,7 +9162,7 @@ fn sync_all_extras() -> Result<()> { context.lock().assert().success(); // Sync an extra that exists in both the parent and child. - uv_snapshot!(context.filters(), context.sync().arg("--all-packages").arg("--extra").arg("types"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--all-packages").arg("--extra").arg("types"), @" success: true exit_code: 0 ----- stdout ----- @@ -9178,7 +9178,7 @@ fn sync_all_extras() -> Result<()> { "); // Sync an extra that only exists in the child. - uv_snapshot!(context.filters(), context.sync().arg("--all-packages").arg("--extra").arg("testing"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--all-packages").arg("--extra").arg("testing"), @" success: true exit_code: 0 ----- stdout ----- @@ -9194,7 +9194,7 @@ fn sync_all_extras() -> Result<()> { "); // Sync all extras. - uv_snapshot!(context.filters(), context.sync().arg("--all-packages").arg("--all-extras"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--all-packages").arg("--all-extras"), @" success: true exit_code: 0 ----- stdout ----- @@ -9210,7 +9210,7 @@ fn sync_all_extras() -> Result<()> { "); // Sync all extras excluding an extra that exists in both the parent and child. - uv_snapshot!(context.filters(), context.sync().arg("--all-packages").arg("--all-extras").arg("--no-extra").arg("types"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--all-packages").arg("--all-extras").arg("--no-extra").arg("types"), @" success: true exit_code: 0 ----- stdout ----- @@ -9222,7 +9222,7 @@ fn sync_all_extras() -> Result<()> { "); // Sync an extra that doesn't exist. - uv_snapshot!(context.filters(), context.sync().arg("--all-packages").arg("--extra").arg("foo"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--all-packages").arg("--extra").arg("foo"), @" success: false exit_code: 2 ----- stdout ----- @@ -9233,7 +9233,7 @@ fn sync_all_extras() -> Result<()> { "); // Sync all extras excluding an extra that doesn't exist. - uv_snapshot!(context.filters(), context.sync().arg("--all-packages").arg("--all-extras").arg("--no-extra").arg("foo"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--all-packages").arg("--all-extras").arg("--no-extra").arg("foo"), @" success: false exit_code: 2 ----- stdout ----- @@ -9317,7 +9317,7 @@ fn sync_all_extras_dynamic() -> Result<()> { context.lock().assert().success(); // Sync an extra that exists in the parent. - uv_snapshot!(context.filters(), context.sync().arg("--all-packages").arg("--extra").arg("types"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--all-packages").arg("--extra").arg("types"), @" success: true exit_code: 0 ----- stdout ----- @@ -9332,7 +9332,7 @@ fn sync_all_extras_dynamic() -> Result<()> { "); // Sync a dynamic extra that exists in the child. - uv_snapshot!(context.filters(), context.sync().arg("--all-packages").arg("--extra").arg("dev"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--all-packages").arg("--extra").arg("dev"), @" success: true exit_code: 0 ----- stdout ----- @@ -9347,7 +9347,7 @@ fn sync_all_extras_dynamic() -> Result<()> { "); // Sync a dynamic extra that doesn't exist in the child. - uv_snapshot!(context.filters(), context.sync().arg("--all-packages").arg("--extra").arg("foo"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--all-packages").arg("--extra").arg("foo"), @" success: false exit_code: 2 ----- stdout ----- @@ -9422,7 +9422,7 @@ fn sync_all_groups() -> Result<()> { context.lock().assert().success(); // Sync a group that exists in both the parent and child. - uv_snapshot!(context.filters(), context.sync().arg("--all-packages").arg("--group").arg("types"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--all-packages").arg("--group").arg("types"), @" success: true exit_code: 0 ----- stdout ----- @@ -9438,7 +9438,7 @@ fn sync_all_groups() -> Result<()> { "); // Sync a group that only exists in the child. - uv_snapshot!(context.filters(), context.sync().arg("--all-packages").arg("--group").arg("testing"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--all-packages").arg("--group").arg("testing"), @" success: true exit_code: 0 ----- stdout ----- @@ -9454,7 +9454,7 @@ fn sync_all_groups() -> Result<()> { "); // Sync a group that doesn't exist. - uv_snapshot!(context.filters(), context.sync().arg("--all-packages").arg("--group").arg("foo"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--all-packages").arg("--group").arg("foo"), @" success: false exit_code: 2 ----- stdout ----- @@ -9465,7 +9465,7 @@ fn sync_all_groups() -> Result<()> { "); // Sync an empty group. - uv_snapshot!(context.filters(), context.sync().arg("--group").arg("empty"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--group").arg("empty"), @" success: true exit_code: 0 ----- stdout ----- @@ -9526,7 +9526,7 @@ fn sync_multiple_sources_index_disjoint_extras() -> Result<()> { // Generate a lockfile. context.lock().assert().success(); - uv_snapshot!(context.filters(), context.sync().arg("--extra").arg("cu124"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--extra").arg("cu124"), @" success: true exit_code: 0 ----- stdout ----- @@ -9752,14 +9752,14 @@ fn sync_stale_egg_info() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -9821,7 +9821,7 @@ fn sync_stale_egg_info() -> Result<()> { } ); - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -9859,14 +9859,14 @@ fn sync_git_repeated_member_static_metadata() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 3 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -9916,7 +9916,7 @@ fn sync_git_repeated_member_static_metadata() -> Result<()> { } ); - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -9953,14 +9953,14 @@ fn sync_git_repeated_member_dynamic_metadata() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 5 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -10032,7 +10032,7 @@ fn sync_git_repeated_member_dynamic_metadata() -> Result<()> { } ); - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -10071,14 +10071,14 @@ fn sync_git_repeated_member_backwards_path() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 3 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -10128,7 +10128,7 @@ fn sync_git_repeated_member_backwards_path() -> Result<()> { } ); - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -10164,7 +10164,7 @@ fn mismatched_name_self_editable() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: false exit_code: 1 ----- stdout ----- @@ -10196,7 +10196,7 @@ fn mismatched_name_cached_wheel() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -10218,7 +10218,7 @@ fn mismatched_name_cached_wheel() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: false exit_code: 1 ----- stdout ----- @@ -10253,14 +10253,14 @@ fn sync_git_path_dependency() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 3 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -10306,7 +10306,7 @@ fn sync_git_path_dependency() -> Result<()> { } ); - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -10363,14 +10363,14 @@ fn sync_build_tag() -> Result<()> { context.temp_dir.join("links/").portable_display(), })?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); let lock = fs_err::read_to_string(context.temp_dir.child("uv.lock")).unwrap(); @@ -10411,17 +10411,17 @@ fn sync_build_tag() -> Result<()> { }); // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.lock().arg("--locked"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 2 packages in [TIME] - "###); + "); // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -10433,14 +10433,14 @@ fn sync_build_tag() -> Result<()> { "); // Ensure that we choose the highest build tag (5). - uv_snapshot!(context.filters(), context.run().arg("--no-sync").arg("python").arg("-c").arg("import build_tag; build_tag.main()"), @r###" + uv_snapshot!(context.filters(), context.run().arg("--no-sync").arg("python").arg("-c").arg("import build_tag; build_tag.main()"), @" success: true exit_code: 0 ----- stdout ----- 5 ----- stderr ----- - "###); + "); Ok(()) } @@ -10490,7 +10490,7 @@ fn url_hash_mismatch() -> Result<()> { "#})?; // Running `uv sync` should fail. - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: false exit_code: 1 ----- stdout ----- @@ -10563,7 +10563,7 @@ fn path_hash_mismatch() -> Result<()> { "#})?; // Running `uv sync` should fail. - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: false exit_code: 1 ----- stdout ----- @@ -10615,7 +10615,7 @@ fn find_links_relative_in_config_works_from_subdir() -> Result<()> { subdir.create_dir_all()?; // Run `uv sync --offline` from subdir. We expect it to find the local wheel in ../packages/. - uv_snapshot!(context.filters(), context.sync().current_dir(&subdir).arg("--offline"), @r" + uv_snapshot!(context.filters(), context.sync().current_dir(&subdir).arg("--offline"), @" success: true exit_code: 0 ----- stdout ----- @@ -10646,7 +10646,7 @@ fn sync_dry_run() -> Result<()> { )?; // Perform a `--dry-run`. - uv_snapshot!(context.filters(), context.sync().arg("--dry-run"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--dry-run"), @" success: true exit_code: 0 ----- stdout ----- @@ -10662,7 +10662,7 @@ fn sync_dry_run() -> Result<()> { "); // Perform a full sync. - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -10687,7 +10687,7 @@ fn sync_dry_run() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.sync().arg("--dry-run"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--dry-run"), @" success: true exit_code: 0 ----- stdout ----- @@ -10714,7 +10714,7 @@ fn sync_dry_run() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.sync().arg("--dry-run"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--dry-run"), @" success: true exit_code: 0 ----- stdout ----- @@ -10730,7 +10730,7 @@ fn sync_dry_run() -> Result<()> { "); // Perform a full sync. - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -10755,7 +10755,7 @@ fn sync_dry_run() -> Result<()> { stderr ); - uv_snapshot!(context.filters(), context.sync().arg("--dry-run"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--dry-run"), @" success: true exit_code: 0 ----- stdout ----- @@ -10803,7 +10803,7 @@ fn sync_dry_run_and_locked() -> Result<()> { )?; // Running with `--locked` and `--dry-run` should error. - uv_snapshot!(context.filters(), context.sync().arg("--locked").arg("--dry-run"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--locked").arg("--dry-run"), @" success: false exit_code: 1 ----- stdout ----- @@ -10855,7 +10855,7 @@ fn sync_dry_run_and_frozen() -> Result<()> { )?; // Running with `--frozen` with `--dry-run` should preview dependencies to be installed. - uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--dry-run"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen").arg("--dry-run"), @" success: true exit_code: 0 ----- stdout ----- @@ -10889,7 +10889,7 @@ fn sync_script() -> Result<()> { "# })?; - uv_snapshot!(context.filters(), context.sync().arg("--script").arg("script.py"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--script").arg("script.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -10921,7 +10921,7 @@ fn sync_script() -> Result<()> { "# })?; - uv_snapshot!(context.filters(), context.sync().arg("--script").arg("script.py"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--script").arg("script.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -10947,7 +10947,7 @@ fn sync_script() -> Result<()> { "# })?; - uv_snapshot!(context.filters(), context.sync().arg("--script").arg("script.py"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--script").arg("script.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -10972,7 +10972,7 @@ fn sync_script() -> Result<()> { "# })?; - uv_snapshot!(context.filters(), context.sync().arg("--script").arg("script.py"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--script").arg("script.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -10990,7 +10990,7 @@ fn sync_script() -> Result<()> { "); // `--locked` and `--frozen` should fail with helpful error messages. - uv_snapshot!(context.filters(), context.sync().arg("--script").arg("script.py").arg("--locked"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--script").arg("script.py").arg("--locked"), @" success: false exit_code: 2 ----- stdout ----- @@ -11000,7 +11000,7 @@ fn sync_script() -> Result<()> { error: `uv sync --locked` requires a script lockfile; run `uv lock --script script.py` to lock the script "); - uv_snapshot!(context.filters(), context.sync().arg("--script").arg("script.py").arg("--frozen"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--script").arg("script.py").arg("--frozen"), @" success: false exit_code: 2 ----- stdout ----- @@ -11031,14 +11031,14 @@ fn sync_locked_script() -> Result<()> { })?; // Lock the script. - uv_snapshot!(context.filters(), context.lock().arg("--script").arg("script.py"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--script").arg("script.py"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 3 packages in [TIME] - "###); + "); let lock = context.read("script.py.lock"); @@ -11091,7 +11091,7 @@ fn sync_locked_script() -> Result<()> { ); }); - uv_snapshot!(context.filters(), context.sync().arg("--script").arg("script.py"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--script").arg("script.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -11121,7 +11121,7 @@ fn sync_locked_script() -> Result<()> { })?; // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.sync().arg("--script").arg("script.py").arg("--locked"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--script").arg("script.py").arg("--locked"), @" success: false exit_code: 1 ----- stdout ----- @@ -11132,7 +11132,7 @@ fn sync_locked_script() -> Result<()> { The lockfile at `uv.lock` needs to be updated, but `--locked` was provided. To update the lockfile, run `uv lock`. "); - uv_snapshot!(context.filters(), context.sync().arg("--script").arg("script.py"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--script").arg("script.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -11223,7 +11223,7 @@ fn sync_locked_script() -> Result<()> { })?; // Re-run with `--locked`. - uv_snapshot!(context.filters(), context.sync().arg("--script").arg("script.py").arg("--locked"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--script").arg("script.py").arg("--locked"), @" success: false exit_code: 1 ----- stdout ----- @@ -11235,7 +11235,7 @@ fn sync_locked_script() -> Result<()> { The lockfile at `uv.lock` needs to be updated, but `--locked` was provided. To update the lockfile, run `uv lock`. "); - uv_snapshot!(context.filters(), context.sync().arg("--script").arg("script.py"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--script").arg("script.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -11280,7 +11280,7 @@ fn sync_script_with_compatible_build_constraints() -> Result<()> { "# })?; - uv_snapshot!(context.filters(), context.sync().arg("--script").arg("script.py"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--script").arg("script.py"), @" success: true exit_code: 0 ----- stdout ----- @@ -11324,7 +11324,7 @@ fn sync_script_with_incompatible_build_constraints() -> Result<()> { "# })?; - uv_snapshot!(context.filters(), context.sync().arg("--script").arg("script.py"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--script").arg("script.py"), @" success: false exit_code: 1 ----- stdout ----- @@ -11358,7 +11358,7 @@ fn unsupported_git_scheme() -> Result<()> { "#}, )?; - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: false exit_code: 1 ----- stdout ----- @@ -11408,7 +11408,7 @@ fn multiple_group_conflicts() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -11418,7 +11418,7 @@ fn multiple_group_conflicts() -> Result<()> { Audited in [TIME] "); - uv_snapshot!(context.filters(), context.sync().arg("--group").arg("baz"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--group").arg("baz"), @" success: true exit_code: 0 ----- stdout ----- @@ -11430,7 +11430,7 @@ fn multiple_group_conflicts() -> Result<()> { + iniconfig==2.0.0 "); - uv_snapshot!(context.filters(), context.sync().arg("--group").arg("foo").arg("--group").arg("baz"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--group").arg("foo").arg("--group").arg("baz"), @" success: true exit_code: 0 ----- stdout ----- @@ -11440,7 +11440,7 @@ fn multiple_group_conflicts() -> Result<()> { Audited 1 package in [TIME] "); - uv_snapshot!(context.filters(), context.sync().arg("--group").arg("bar").arg("--group").arg("baz"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--group").arg("bar").arg("--group").arg("baz"), @" success: true exit_code: 0 ----- stdout ----- @@ -11454,7 +11454,7 @@ fn multiple_group_conflicts() -> Result<()> { + iniconfig==1.1.1 "); - uv_snapshot!(context.filters(), context.sync().arg("--group").arg("foo").arg("--group").arg("bar"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--group").arg("foo").arg("--group").arg("bar"), @" success: false exit_code: 2 ----- stdout ----- @@ -11498,7 +11498,7 @@ fn transitive_group_conflicts_shallow() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -11507,7 +11507,7 @@ fn transitive_group_conflicts_shallow() -> Result<()> { Resolved 5 packages in [TIME] "); - uv_snapshot!(context.filters(), context.lock().arg("--check"), @r" + uv_snapshot!(context.filters(), context.lock().arg("--check"), @" success: true exit_code: 0 ----- stdout ----- @@ -11516,7 +11516,7 @@ fn transitive_group_conflicts_shallow() -> Result<()> { Resolved 5 packages in [TIME] "); - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -11530,7 +11530,7 @@ fn transitive_group_conflicts_shallow() -> Result<()> { + sniffio==1.3.1 "); - uv_snapshot!(context.filters(), context.sync().arg("--group").arg("dev"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--group").arg("dev"), @" success: true exit_code: 0 ----- stdout ----- @@ -11540,7 +11540,7 @@ fn transitive_group_conflicts_shallow() -> Result<()> { Audited 3 packages in [TIME] "); - uv_snapshot!(context.filters(), context.sync().arg("--group").arg("dev").arg("--group").arg("test"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--group").arg("dev").arg("--group").arg("test"), @" success: true exit_code: 0 ----- stdout ----- @@ -11550,7 +11550,7 @@ fn transitive_group_conflicts_shallow() -> Result<()> { Audited 3 packages in [TIME] "); - uv_snapshot!(context.filters(), context.sync().arg("--group").arg("test").arg("--group").arg("magic"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--group").arg("test").arg("--group").arg("magic"), @" success: false exit_code: 2 ----- stdout ----- @@ -11560,7 +11560,7 @@ fn transitive_group_conflicts_shallow() -> Result<()> { error: Groups `magic` and `test` are incompatible with the conflicts: {`example:magic`, `example:test`} "); - uv_snapshot!(context.filters(), context.sync().arg("--group").arg("dev").arg("--group").arg("magic"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--group").arg("dev").arg("--group").arg("magic"), @" success: false exit_code: 2 ----- stdout ----- @@ -11612,7 +11612,7 @@ fn transitive_group_conflicts_deep() -> Result<()> { ]"#, )?; - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -11627,7 +11627,7 @@ fn transitive_group_conflicts_deep() -> Result<()> { + sniffio==1.3.1 "); - uv_snapshot!(context.filters(), context.sync().arg("--group").arg("dev"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--group").arg("dev"), @" success: true exit_code: 0 ----- stdout ----- @@ -11637,7 +11637,7 @@ fn transitive_group_conflicts_deep() -> Result<()> { Audited 4 packages in [TIME] "); - uv_snapshot!(context.filters(), context.sync().arg("--group").arg("dev").arg("--group").arg("test"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--group").arg("dev").arg("--group").arg("test"), @" success: true exit_code: 0 ----- stdout ----- @@ -11647,7 +11647,7 @@ fn transitive_group_conflicts_deep() -> Result<()> { Audited 4 packages in [TIME] "); - uv_snapshot!(context.filters(), context.sync().arg("--group").arg("dev").arg("--group").arg("magic"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--group").arg("dev").arg("--group").arg("magic"), @" success: false exit_code: 2 ----- stdout ----- @@ -11657,7 +11657,7 @@ fn transitive_group_conflicts_deep() -> Result<()> { error: Groups `dev` and `magic` are incompatible with the conflicts: {`example:dev`, `example:magic`} "); - uv_snapshot!(context.filters(), context.sync().arg("--no-dev").arg("--group").arg("intermediate").arg("--group").arg("magic"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--no-dev").arg("--group").arg("intermediate").arg("--group").arg("magic"), @" success: false exit_code: 2 ----- stdout ----- @@ -11703,7 +11703,7 @@ fn transitive_group_conflicts_siblings() -> Result<()> { ]"#, )?; - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -11717,7 +11717,7 @@ fn transitive_group_conflicts_siblings() -> Result<()> { + sniffio==1.3.1 "); - uv_snapshot!(context.filters(), context.sync().arg("--group").arg("dev"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--group").arg("dev"), @" success: true exit_code: 0 ----- stdout ----- @@ -11727,7 +11727,7 @@ fn transitive_group_conflicts_siblings() -> Result<()> { Audited 3 packages in [TIME] "); - uv_snapshot!(context.filters(), context.sync().arg("--no-dev").arg("--group").arg("dev2"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--no-dev").arg("--group").arg("dev2"), @" success: true exit_code: 0 ----- stdout ----- @@ -11741,7 +11741,7 @@ fn transitive_group_conflicts_siblings() -> Result<()> { + anyio==3.7.1 "); - uv_snapshot!(context.filters(), context.sync().arg("--group").arg("dev2"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--group").arg("dev2"), @" success: false exit_code: 2 ----- stdout ----- @@ -11751,7 +11751,7 @@ fn transitive_group_conflicts_siblings() -> Result<()> { error: Groups `dev` (enabled by default) and `dev2` are incompatible with the conflicts: {`example:dev`, `example:dev2`} "); - uv_snapshot!(context.filters(), context.sync().arg("--group").arg("dev").arg("--group").arg("dev2"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--group").arg("dev").arg("--group").arg("dev2"), @" success: false exit_code: 2 ----- stdout ----- @@ -11798,7 +11798,7 @@ fn transitive_group_conflicts_cycle() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: false exit_code: 2 ----- stdout ----- @@ -11808,7 +11808,7 @@ fn transitive_group_conflicts_cycle() -> Result<()> { Caused by: Detected a cycle in `dependency-groups`: `dev` -> `test` -> `dev` "); - uv_snapshot!(context.filters(), context.sync().arg("--group").arg("dev"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--group").arg("dev"), @" success: false exit_code: 2 ----- stdout ----- @@ -11818,7 +11818,7 @@ fn transitive_group_conflicts_cycle() -> Result<()> { Caused by: Detected a cycle in `dependency-groups`: `dev` -> `test` -> `dev` "); - uv_snapshot!(context.filters(), context.sync().arg("--group").arg("dev").arg("--group").arg("test"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--group").arg("dev").arg("--group").arg("test"), @" success: false exit_code: 2 ----- stdout ----- @@ -11828,7 +11828,7 @@ fn transitive_group_conflicts_cycle() -> Result<()> { Caused by: Detected a cycle in `dependency-groups`: `dev` -> `test` -> `dev` "); - uv_snapshot!(context.filters(), context.sync().arg("--group").arg("test").arg("--group").arg("magic"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--group").arg("test").arg("--group").arg("magic"), @" success: false exit_code: 2 ----- stdout ----- @@ -11838,7 +11838,7 @@ fn transitive_group_conflicts_cycle() -> Result<()> { Caused by: Detected a cycle in `dependency-groups`: `dev` -> `test` -> `dev` "); - uv_snapshot!(context.filters(), context.sync().arg("--group").arg("dev").arg("--group").arg("magic"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--group").arg("dev").arg("--group").arg("magic"), @" success: false exit_code: 2 ----- stdout ----- @@ -11871,20 +11871,20 @@ fn prune_cache_url_subdirectory() -> Result<()> { "#})?; // Lock the project. - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 5 packages in [TIME] - "###); + "); // Prune the cache. context.prune().arg("--ci").assert().success(); // Install the project. - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -11920,7 +11920,7 @@ fn locked_version_coherence() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -11972,7 +11972,7 @@ fn locked_version_coherence() -> Result<()> { .write_str(&lock.replace(r#"version = "2.0.0""#, r#"version = "1.0.0""#))?; // An inconsistent lockfile should fail with `--locked` - uv_snapshot!(context.filters(), context.sync().arg("--locked"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--locked"), @" success: false exit_code: 2 ----- stdout ----- @@ -11983,7 +11983,7 @@ fn locked_version_coherence() -> Result<()> { "); // Without `--locked`, we could fail or recreate the lockfile, currently, we fail. - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: false exit_code: 2 ----- stdout ----- @@ -12019,7 +12019,7 @@ fn sync_build_constraints() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.sync().arg("--no-binary-package").arg("json-merge-patch"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--no-binary-package").arg("json-merge-patch"), @" success: true exit_code: 0 ----- stdout ----- @@ -12075,7 +12075,7 @@ fn sync_build_constraints() -> Result<()> { fs_err::remove_dir_all(&context.venv)?; // We should also be able to read from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--locked"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- @@ -12104,7 +12104,7 @@ fn sync_build_constraints() -> Result<()> { )?; // This should fail, given that the build constraints have changed. - uv_snapshot!(context.filters(), context.sync().arg("--locked"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--locked"), @" success: false exit_code: 1 ----- stdout ----- @@ -12115,7 +12115,7 @@ fn sync_build_constraints() -> Result<()> { "); // Changing the build constraints should lead to a re-resolve. - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -12173,7 +12173,7 @@ fn sync_when_virtual_environment_incompatible_with_interpreter() -> Result<()> { fs_err::write(&pyvenv_cfg, contents)?; // We should also be able to read from the lockfile. - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -12212,7 +12212,7 @@ fn sync_when_virtual_environment_incompatible_with_interpreter() -> Result<()> { fs_err::write(&pyvenv_cfg, contents)?; // We should also be able to read from the lockfile. - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -12252,14 +12252,14 @@ fn sync_upload_time() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 4 packages in [TIME] - "###); + "); let uv_lock = context.temp_dir.child("uv.lock"); uv_lock.write_str(r#" @@ -12314,7 +12314,7 @@ fn sync_upload_time() -> Result<()> { "#)?; // Install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -12328,7 +12328,7 @@ fn sync_upload_time() -> Result<()> { "); // Re-install from the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -12402,7 +12402,7 @@ fn repeated_dev_member_all_packages() -> Result<()> { let init = src.child("__init__.py"); init.touch()?; - uv_snapshot!(context.filters(), context.sync().arg("--all-packages"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--all-packages"), @" success: true exit_code: 0 ----- stdout ----- @@ -12416,7 +12416,7 @@ fn repeated_dev_member_all_packages() -> Result<()> { + second==0.1.0 (from file://[TEMP_DIR]/second) "); - uv_snapshot!(context.filters(), context.sync().arg("--all-packages"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--all-packages"), @" success: true exit_code: 0 ----- stdout ----- @@ -12452,7 +12452,7 @@ fn direct_url_dependency_metadata() -> Result<()> { "# )?; - uv_snapshot!(context.sync(), @r" + uv_snapshot!(context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -12486,7 +12486,7 @@ fn sync_required_environment_hint() -> Result<()> { packse_index_url() })?; - uv_snapshot!(context.filters(), context.lock().env_remove(EnvVars::UV_EXCLUDE_NEWER), @r" + uv_snapshot!(context.filters(), context.lock().env_remove(EnvVars::UV_EXCLUDE_NEWER), @" success: true exit_code: 0 ----- stdout ----- @@ -12534,7 +12534,7 @@ fn sync_url_with_query_parameters() -> Result<()> { "# )?; - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -12573,7 +12573,7 @@ dependencies = [ .sync() .env_remove(EnvVars::UV_EXCLUDE_NEWER) .arg("--exclude-newer") - .arg("2022-04-04T12:00:00Z"), @r" + .arg("2022-04-04T12:00:00Z"), @" success: true exit_code: 0 ----- stdout ----- @@ -12598,7 +12598,7 @@ dependencies = [ .arg("--exclude-newer") .arg("2022-04-04T12:00:00Z") .arg("--exclude-newer-package") - .arg("tqdm=2022-09-04T00:00:00Z"), @r" + .arg("tqdm=2022-09-04T00:00:00Z"), @" success: true exit_code: 0 ----- stdout ----- @@ -12642,7 +12642,7 @@ exclude-newer = "2022-04-04T12:00:00Z" // First sync with only the global exclude-newer from the config uv_snapshot!(context.filters(), context .sync() - .env_remove(EnvVars::UV_EXCLUDE_NEWER), @r" + .env_remove(EnvVars::UV_EXCLUDE_NEWER), @" success: true exit_code: 0 ----- stdout ----- @@ -12681,7 +12681,7 @@ exclude-newer-package = { tqdm = "2022-09-04T00:00:00Z" } // Sync again with the package-specific override uv_snapshot!(context.filters(), context .sync() - .env_remove(EnvVars::UV_EXCLUDE_NEWER), @r" + .env_remove(EnvVars::UV_EXCLUDE_NEWER), @" success: true exit_code: 0 ----- stdout ----- @@ -12718,7 +12718,7 @@ fn read_only() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -12738,7 +12738,7 @@ fn read_only() -> Result<()> { // Make the virtual environment read and execute (but not write). fs_err::set_permissions(&context.venv, std::fs::Permissions::from_mode(0o555))?; - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -12770,7 +12770,7 @@ fn sync_python_platform() -> Result<()> { context.lock().assert().success(); // Sync with a specific platform should filter packages - uv_snapshot!(context.filters(), context.sync().arg("--python-platform").arg("linux"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--python-platform").arg("linux"), @" success: true exit_code: 0 ----- stdout ----- @@ -12850,7 +12850,7 @@ fn conflicting_editable() -> Result<()> { .child("__init__.py") .touch()?; - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -12910,7 +12910,7 @@ fn conflicting_editable() -> Result<()> { ); }); - uv_snapshot!(context.filters(), context.sync().arg("--group").arg("foo"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--group").arg("foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -12931,7 +12931,7 @@ fn conflicting_editable() -> Result<()> { ----- stderr ----- "#); - uv_snapshot!(context.filters(), context.sync().arg("--group").arg("bar"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--group").arg("bar"), @" success: true exit_code: 0 ----- stdout ----- @@ -13016,7 +13016,7 @@ fn undeclared_editable() -> Result<()> { .child("__init__.py") .touch()?; - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -13076,7 +13076,7 @@ fn undeclared_editable() -> Result<()> { ); }); - uv_snapshot!(context.filters(), context.sync().arg("--group").arg("foo"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--group").arg("foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -13097,7 +13097,7 @@ fn undeclared_editable() -> Result<()> { ----- stderr ----- "#); - uv_snapshot!(context.filters(), context.sync().arg("--group").arg("bar"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--group").arg("bar"), @" success: true exit_code: 0 ----- stdout ----- @@ -13142,7 +13142,7 @@ fn sync_python_preference() -> Result<()> { // Mark 3.12 as a managed interpreter for the rest of the tests let context = context.with_versions_as_managed(&["3.12"]); - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -13153,7 +13153,7 @@ fn sync_python_preference() -> Result<()> { "); // We should invalidate the environment and switch to 3.11 - uv_snapshot!(context.filters(), context.sync().arg("--no-managed-python"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--no-managed-python"), @" success: true exit_code: 0 ----- stdout ----- @@ -13167,7 +13167,7 @@ fn sync_python_preference() -> Result<()> { "); // We will use the environment if it exists - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -13178,7 +13178,7 @@ fn sync_python_preference() -> Result<()> { "); // Unless the user requests a Python preference that is incompatible - uv_snapshot!(context.filters(), context.sync().arg("--managed-python"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--managed-python"), @" success: true exit_code: 0 ----- stdout ----- @@ -13192,7 +13192,7 @@ fn sync_python_preference() -> Result<()> { "); // If a interpreter cannot be found, we'll fail - uv_snapshot!(context.filters(), context.sync().arg("--managed-python").arg("-p").arg("3.11"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--managed-python").arg("-p").arg("3.11"), @" success: false exit_code: 2 ----- stdout ----- @@ -13218,7 +13218,7 @@ fn sync_python_preference() -> Result<()> { )?; // We'll respect a `python-preference` in the `pyproject.toml` file - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -13232,7 +13232,7 @@ fn sync_python_preference() -> Result<()> { "); // But it can be overridden via the CLI - uv_snapshot!(context.filters(), context.sync().arg("--managed-python"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--managed-python"), @" success: true exit_code: 0 ----- stdout ----- @@ -13246,7 +13246,7 @@ fn sync_python_preference() -> Result<()> { "); // `uv run` will invalidate the environment too - uv_snapshot!(context.filters(), context.run().arg("python").arg("--version"), @r" + uv_snapshot!(context.filters(), context.run().arg("python").arg("--version"), @" success: true exit_code: 0 ----- stdout ----- @@ -13280,7 +13280,7 @@ fn sync_python_missing_download_hint() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.sync().arg("-p").arg("3.100"), @r" + uv_snapshot!(context.filters(), context.sync().arg("-p").arg("3.100"), @" success: false exit_code: 2 ----- stdout ----- @@ -13335,7 +13335,7 @@ fn sync_config_settings_package() -> Result<()> { // Lock the project context.lock().assert().success(); - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -13374,7 +13374,7 @@ fn sync_config_settings_package() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -13415,7 +13415,7 @@ fn sync_config_settings_package() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -13468,7 +13468,7 @@ fn sync_does_not_remove_empty_virtual_environment_directory() -> Result<()> { // Note we do _not_ fail to create the virtual environment — we fail later when writing to the // project directory - uv_snapshot!(context.filters(), context.sync().current_dir(&project_dir), @r" + uv_snapshot!(context.filters(), context.sync().current_dir(&project_dir), @" success: false exit_code: 2 ----- stdout ----- @@ -13544,7 +13544,7 @@ fn sync_build_dependencies_respect_locked_versions() -> Result<()> { dependencies = ["anyio<4.1"] "#})?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -13566,7 +13566,7 @@ fn sync_build_dependencies_respect_locked_versions() -> Result<()> { "#})?; // Ensure our build backend is checking the version correctly - uv_snapshot!(context.filters(), context.sync().env(EnvVars::EXPECTED_ANYIO_VERSION, "3.0"), @r" + uv_snapshot!(context.filters(), context.sync().env(EnvVars::EXPECTED_ANYIO_VERSION, "3.0"), @" success: false exit_code: 1 ----- stdout ----- @@ -13600,7 +13600,7 @@ fn sync_build_dependencies_respect_locked_versions() -> Result<()> { "#})?; // The child should be built with anyio 4.0 - uv_snapshot!(context.filters(), context.sync().env(EnvVars::EXPECTED_ANYIO_VERSION, "4.0"), @r" + uv_snapshot!(context.filters(), context.sync().env(EnvVars::EXPECTED_ANYIO_VERSION, "4.0"), @" success: true exit_code: 0 ----- stdout ----- @@ -13633,7 +13633,7 @@ fn sync_build_dependencies_respect_locked_versions() -> Result<()> { // The child should be rebuilt with anyio 3.7, without `--reinstall` uv_snapshot!(context.filters(), context.sync() - .arg("--reinstall-package").arg("child").env(EnvVars::EXPECTED_ANYIO_VERSION, "4.0"), @r" + .arg("--reinstall-package").arg("child").env(EnvVars::EXPECTED_ANYIO_VERSION, "4.0"), @" success: false exit_code: 1 ----- stdout ----- @@ -13653,7 +13653,7 @@ fn sync_build_dependencies_respect_locked_versions() -> Result<()> { "); uv_snapshot!(context.filters(), context.sync() - .arg("--reinstall-package").arg("child").env(EnvVars::EXPECTED_ANYIO_VERSION, "3.7"), @r" + .arg("--reinstall-package").arg("child").env(EnvVars::EXPECTED_ANYIO_VERSION, "3.7"), @" success: true exit_code: 0 ----- stdout ----- @@ -13673,7 +13673,7 @@ fn sync_build_dependencies_respect_locked_versions() -> Result<()> { uv_snapshot!(context.filters(), context.sync() .arg("--preview-features").arg("extra-build-dependencies") .arg("--reinstall-package").arg("child") - .env(EnvVars::EXPECTED_ANYIO_VERSION, "3.7"), @r" + .env(EnvVars::EXPECTED_ANYIO_VERSION, "3.7"), @" success: true exit_code: 0 ----- stdout ----- @@ -13716,7 +13716,7 @@ fn sync_build_dependencies_respect_locked_versions() -> Result<()> { // This should fail uv_snapshot!(context.filters(), context.sync() - .arg("--reinstall-package").arg("child").env(EnvVars::EXPECTED_ANYIO_VERSION, "4.1"), @r" + .arg("--reinstall-package").arg("child").env(EnvVars::EXPECTED_ANYIO_VERSION, "4.1"), @" success: false exit_code: 1 ----- stdout ----- @@ -13746,7 +13746,7 @@ fn sync_build_dependencies_respect_locked_versions() -> Result<()> { child = [{ requirement = "anyio>4", match-runtime = true }] "#})?; - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: false exit_code: 2 ----- stdout ----- @@ -13807,7 +13807,7 @@ fn sync_extra_build_variables() -> Result<()> { "#})?; context.temp_dir.child("src/parent/__init__.py").touch()?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -13817,7 +13817,7 @@ fn sync_extra_build_variables() -> Result<()> { "); // Ensure our build backend is checking the version correctly. - uv_snapshot!(context.filters(), context.sync().env(EnvVars::EXPECTED_ANYIO_VERSION, "3.0"), @r" + uv_snapshot!(context.filters(), context.sync().env(EnvVars::EXPECTED_ANYIO_VERSION, "3.0"), @" success: false exit_code: 1 ----- stdout ----- @@ -13850,7 +13850,7 @@ fn sync_extra_build_variables() -> Result<()> { parent = { EXPECTED_ANYIO_VERSION = "3.0" } "#})?; - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: false exit_code: 1 ----- stdout ----- @@ -13883,7 +13883,7 @@ fn sync_extra_build_variables() -> Result<()> { parent = { EXPECTED_ANYIO_VERSION = "4.3.0" } "#})?; - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -13916,7 +13916,7 @@ fn reject_unmatched_runtime() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: false exit_code: 1 ----- stdout ----- @@ -13952,7 +13952,7 @@ fn sync_git_lfs() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.sync().env_remove(EnvVars::UV_GIT_LFS), @r" + uv_snapshot!(context.filters(), context.sync().env_remove(EnvVars::UV_GIT_LFS), @" success: true exit_code: 0 ----- stdout ----- @@ -13967,13 +13967,13 @@ fn sync_git_lfs() -> Result<()> { // Verify that we can import the module and access LFS content uv_snapshot!(context.filters(), context.python_command() .arg("-c") - .arg("import test_lfs_repo.lfs_module"), @r#" + .arg("import test_lfs_repo.lfs_module"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- - "#); + "); let lock = context.read("uv.lock"); insta::with_settings!({ @@ -14008,7 +14008,7 @@ fn sync_git_lfs() -> Result<()> { }); // `UV_GIT_LFS=false` should not override `lfs = true` - uv_snapshot!(context.filters(), context.sync().env(EnvVars::UV_GIT_LFS, "false").arg("--reinstall"), @r" + uv_snapshot!(context.filters(), context.sync().env(EnvVars::UV_GIT_LFS, "false").arg("--reinstall"), @" success: true exit_code: 0 ----- stdout ----- @@ -14023,13 +14023,13 @@ fn sync_git_lfs() -> Result<()> { uv_snapshot!(context.filters(), context.python_command() .arg("-c") - .arg("import test_lfs_repo.lfs_module"), @r#" + .arg("import test_lfs_repo.lfs_module"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- - "#); + "); // Set `lfs = false` in the source pyproject_toml.write_str( @@ -14045,7 +14045,7 @@ fn sync_git_lfs() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.sync().env_remove(EnvVars::UV_GIT_LFS).arg("--reinstall"), @r" + uv_snapshot!(context.filters(), context.sync().env_remove(EnvVars::UV_GIT_LFS).arg("--reinstall"), @" success: true exit_code: 0 ----- stdout ----- @@ -14078,7 +14078,7 @@ fn sync_git_lfs() -> Result<()> { "#); // `UV_GIT_lfs=true` should not override `lfs = false` - uv_snapshot!(context.filters(), context.sync().env(EnvVars::UV_GIT_LFS, "true").arg("--reinstall"), @r" + uv_snapshot!(context.filters(), context.sync().env(EnvVars::UV_GIT_LFS, "true").arg("--reinstall"), @" success: true exit_code: 0 ----- stdout ----- @@ -14154,7 +14154,7 @@ fn sync_git_lfs() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.sync().env(EnvVars::UV_GIT_LFS, "true").arg("--reinstall"), @r" + uv_snapshot!(context.filters(), context.sync().env(EnvVars::UV_GIT_LFS, "true").arg("--reinstall"), @" success: true exit_code: 0 ----- stdout ----- @@ -14171,17 +14171,17 @@ fn sync_git_lfs() -> Result<()> { // Verify that we can import the module when UV_GIT_LFS is set uv_snapshot!(context.filters(), context.python_command() .arg("-c") - .arg("import test_lfs_repo.lfs_module; print('LFS module imported via env var')"), @r#" + .arg("import test_lfs_repo.lfs_module; print('LFS module imported via env var')"), @" success: true exit_code: 0 ----- stdout ----- LFS module imported via env var ----- stderr ----- - "#); + "); // Cache should be primed with non-LFS sources - uv_snapshot!(context.filters(), context.sync().env_remove(EnvVars::UV_GIT_LFS).arg("--reinstall"), @r" + uv_snapshot!(context.filters(), context.sync().env_remove(EnvVars::UV_GIT_LFS).arg("--reinstall"), @" success: true exit_code: 0 ----- stdout ----- @@ -14213,7 +14213,7 @@ fn sync_git_lfs() -> Result<()> { "#); // Cache should be primed with LFS sources - uv_snapshot!(context.filters(), context.sync().env(EnvVars::UV_GIT_LFS, "true").arg("--reinstall"), @r" + uv_snapshot!(context.filters(), context.sync().env(EnvVars::UV_GIT_LFS, "true").arg("--reinstall"), @" success: true exit_code: 0 ----- stdout ----- @@ -14229,17 +14229,17 @@ fn sync_git_lfs() -> Result<()> { uv_snapshot!(context.filters(), context.python_command() .arg("-c") - .arg("import test_lfs_repo.lfs_module; print('LFS module imported via env var')"), @r#" + .arg("import test_lfs_repo.lfs_module; print('LFS module imported via env var')"), @" success: true exit_code: 0 ----- stdout ----- LFS module imported via env var ----- stderr ----- - "#); + "); // Cache should hit non-LFS sources - uv_snapshot!(context.filters(), context.sync().env_remove(EnvVars::UV_GIT_LFS).arg("--reinstall"), @r" + uv_snapshot!(context.filters(), context.sync().env_remove(EnvVars::UV_GIT_LFS).arg("--reinstall"), @" success: true exit_code: 0 ----- stdout ----- @@ -14303,7 +14303,7 @@ fn sync_git_lfs() -> Result<()> { }); // Cache should hit LFS sources - uv_snapshot!(context.filters(), context.sync().env(EnvVars::UV_GIT_LFS, "true").arg("--reinstall"), @r" + uv_snapshot!(context.filters(), context.sync().env(EnvVars::UV_GIT_LFS, "true").arg("--reinstall"), @" success: true exit_code: 0 ----- stdout ----- @@ -14319,14 +14319,14 @@ fn sync_git_lfs() -> Result<()> { uv_snapshot!(context.filters(), context.python_command() .arg("-c") - .arg("import test_lfs_repo.lfs_module; print('LFS module imported via env var')"), @r#" + .arg("import test_lfs_repo.lfs_module; print('LFS module imported via env var')"), @" success: true exit_code: 0 ----- stdout ----- LFS module imported via env var ----- stderr ----- - "#); + "); let lock = context.read("uv.lock"); insta::with_settings!({ @@ -14387,7 +14387,7 @@ fn match_runtime_optional() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -14440,7 +14440,7 @@ fn sync_extra_build_dependencies_cache() -> Result<()> { "#})?; // Running `uv sync` should build the child package. - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -14453,7 +14453,7 @@ fn sync_extra_build_dependencies_cache() -> Result<()> { "); // Running `uv sync` again should be a no-op. - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -14479,7 +14479,7 @@ fn sync_extra_build_dependencies_cache() -> Result<()> { "#})?; // Running `uv sync` should rebuild the child package with the new build dependency. - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -14494,7 +14494,7 @@ fn sync_extra_build_dependencies_cache() -> Result<()> { "); // Running `uv sync` again should be a no-op. - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -14520,7 +14520,7 @@ fn sync_extra_build_dependencies_cache() -> Result<()> { child = [{ requirement = "iniconfig>0", match-runtime = false }] "#})?; - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -14548,7 +14548,7 @@ fn sync_extra_build_dependencies_cache() -> Result<()> { // Running `uv sync` should reinstall the child package, but not rebuild it (since it's already // cached). - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -14576,7 +14576,7 @@ fn sync_extra_build_dependencies_cache() -> Result<()> { "#})?; // Running `uv sync` should rebuild the child package with the new build dependency. - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -14590,7 +14590,7 @@ fn sync_extra_build_dependencies_cache() -> Result<()> { "); // Running `uv sync` again should be a no-op. - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -14704,7 +14704,7 @@ async fn sync_zstd_wheel() -> Result<()> { server.uri() })?; - uv_snapshot!(context.filters(), context.sync().env_remove(EnvVars::UV_EXCLUDE_NEWER), @r" + uv_snapshot!(context.filters(), context.sync().env_remove(EnvVars::UV_EXCLUDE_NEWER), @" success: true exit_code: 0 ----- stdout ----- @@ -14762,7 +14762,7 @@ fn toggle_workspace_editable() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -14847,7 +14847,7 @@ fn toggle_workspace_editable() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -14919,7 +14919,7 @@ fn toggle_workspace_editable() -> Result<()> { assert!(!context.site_packages().join("_child.pth").exists()); // But `--editable` on the command line should override the lockfile. - uv_snapshot!(context.filters(), context.sync().arg("--editable"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--editable"), @" success: true exit_code: 0 ----- stdout ----- @@ -15004,7 +15004,7 @@ fn workspace_editable_conflict() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -15101,7 +15101,7 @@ fn workspace_editable_conflict() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -15201,7 +15201,7 @@ fn workspace_editable_conflict() -> Result<()> { )?; // If the `editable` declarations are conflicting, raise an error. - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: false exit_code: 2 ----- stdout ----- @@ -15235,7 +15235,7 @@ fn only_group_and_extra_conflict() -> Result<()> { )?; // Using --only-group and --extra together should error. - uv_snapshot!(context.filters(), context.sync().arg("--only-group").arg("dev").arg("--extra").arg("test"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--only-group").arg("dev").arg("--extra").arg("test"), @" success: false exit_code: 2 ----- stdout ----- @@ -15246,10 +15246,10 @@ fn only_group_and_extra_conflict() -> Result<()> { Usage: uv sync --cache-dir [CACHE_DIR] --only-group --exclude-newer For more information, try '--help'. - "###); + "); // Using --only-group and --all-extras together should also error. - uv_snapshot!(context.filters(), context.sync().arg("--only-group").arg("dev").arg("--all-extras"), @r###" + uv_snapshot!(context.filters(), context.sync().arg("--only-group").arg("dev").arg("--all-extras"), @" success: false exit_code: 2 ----- stdout ----- @@ -15260,7 +15260,7 @@ fn only_group_and_extra_conflict() -> Result<()> { Usage: uv sync --cache-dir [CACHE_DIR] --only-group --exclude-newer For more information, try '--help'. - "###); + "); Ok(()) } @@ -15314,7 +15314,7 @@ fn sync_no_sources_editable_to_package_switch() -> Result<()> { )?; // Step 1: `uv sync --no-sources` should install `anyio` from PyPI. - uv_snapshot!(context.filters(), context.sync().arg("--no-sources"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--no-sources"), @" success: true exit_code: 0 ----- stdout ----- @@ -15330,7 +15330,7 @@ fn sync_no_sources_editable_to_package_switch() -> Result<()> { "); // Step 2: `uv sync` should switch to an editable installation. - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -15347,7 +15347,7 @@ fn sync_no_sources_editable_to_package_switch() -> Result<()> { "); // Step 3: `uv sync --no-sources` again should switch back to PyPI package. - uv_snapshot!(context.filters(), context.sync().arg("--no-sources"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--no-sources"), @" success: true exit_code: 0 ----- stdout ----- @@ -15453,7 +15453,7 @@ fn sync_reinstalls_on_version_change() -> Result<()> { .touch()?; // Lock and sync (installs child v0.1.0). - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -15462,7 +15462,7 @@ fn sync_reinstalls_on_version_change() -> Result<()> { Resolved 2 packages in [TIME] "); - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -15489,7 +15489,7 @@ fn sync_reinstalls_on_version_change() -> Result<()> { )?; // Lock again; lockfile should show v0.1.1. - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -15501,7 +15501,7 @@ fn sync_reinstalls_on_version_change() -> Result<()> { // Sync should reinstall child with the new version. Before the fix for #17370, // this would incorrectly say "Audited 2 packages" and not reinstall the child package. - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- diff --git a/crates/uv/tests/it/tool_dir.rs b/crates/uv/tests/it/tool_dir.rs index fb04e6d92..5eb092416 100644 --- a/crates/uv/tests/it/tool_dir.rs +++ b/crates/uv/tests/it/tool_dir.rs @@ -12,14 +12,14 @@ fn tool_dir() { uv_snapshot!(context.filters(), context.tool_dir() .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- [TEMP_DIR]/tools ----- stderr ----- - "###); + "); } #[test] @@ -30,12 +30,12 @@ fn tool_dir_bin() { uv_snapshot!(context.filters(), context.tool_dir().arg("--bin") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- [TEMP_DIR]/bin ----- stderr ----- - "###); + "); } diff --git a/crates/uv/tests/it/tool_install.rs b/crates/uv/tests/it/tool_install.rs index 8e17c0810..241749841 100644 --- a/crates/uv/tests/it/tool_install.rs +++ b/crates/uv/tests/it/tool_install.rs @@ -28,7 +28,7 @@ fn tool_install() { .arg("black") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -44,7 +44,7 @@ fn tool_install() { + pathspec==0.12.1 + platformdirs==4.2.0 Installed 2 executables: black, blackd - "###); + "); tool_dir.child("black").assert(predicate::path::is_dir()); tool_dir @@ -61,7 +61,7 @@ fn tool_install() { filters => context.filters(), }, { // Should run black in the virtual environment - assert_snapshot!(fs_err::read_to_string(executable).unwrap(), @r###" + assert_snapshot!(fs_err::read_to_string(executable).unwrap(), @r#" #![TEMP_DIR]/tools/black/bin/python # -*- coding: utf-8 -*- import sys @@ -72,7 +72,7 @@ fn tool_install() { elif sys.argv[0].endswith(".exe"): sys.argv[0] = sys.argv[0][:-4] sys.exit(patched_main()) - "###); + "#); }); @@ -80,7 +80,7 @@ fn tool_install() { filters => context.filters(), }, { // We should have a tool receipt - assert_snapshot!(fs_err::read_to_string(tool_dir.join("black").join("uv-receipt.toml")).unwrap(), @r###" + assert_snapshot!(fs_err::read_to_string(tool_dir.join("black").join("uv-receipt.toml")).unwrap(), @r#" [tool] requirements = [{ name = "black" }] entrypoints = [ @@ -90,10 +90,10 @@ fn tool_install() { [tool.options] exclude-newer = "2024-03-25T00:00:00Z" - "###); + "#); }); - uv_snapshot!(context.filters(), Command::new("black").arg("--version").env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + uv_snapshot!(context.filters(), Command::new("black").arg("--version").env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -101,14 +101,14 @@ fn tool_install() { Python (CPython) 3.12.[X] ----- stderr ----- - "###); + "); // Install another tool uv_snapshot!(context.filters(), context.tool_install() .arg("flask") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -125,7 +125,7 @@ fn tool_install() { + markupsafe==2.1.5 + werkzeug==3.0.1 Installed 1 executable: flask - "###); + "); tool_dir.child("flask").assert(predicate::path::is_dir()); assert!( @@ -138,7 +138,7 @@ fn tool_install() { insta::with_settings!({ filters => context.filters(), }, { - assert_snapshot!(fs_err::read_to_string(bin_dir.join("flask")).unwrap(), @r###" + assert_snapshot!(fs_err::read_to_string(bin_dir.join("flask")).unwrap(), @r#" #![TEMP_DIR]/tools/flask/bin/python # -*- coding: utf-8 -*- import sys @@ -149,10 +149,10 @@ fn tool_install() { elif sys.argv[0].endswith(".exe"): sys.argv[0] = sys.argv[0][:-4] sys.exit(main()) - "###); + "#); }); - uv_snapshot!(context.filters(), Command::new("flask").arg("--version").env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + uv_snapshot!(context.filters(), Command::new("flask").arg("--version").env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -161,12 +161,12 @@ fn tool_install() { Werkzeug 3.0.1 ----- stderr ----- - "###); + "); insta::with_settings!({ filters => context.filters(), }, { - assert_snapshot!(fs_err::read_to_string(tool_dir.join("flask").join("uv-receipt.toml")).unwrap(), @r###" + assert_snapshot!(fs_err::read_to_string(tool_dir.join("flask").join("uv-receipt.toml")).unwrap(), @r#" [tool] requirements = [{ name = "flask" }] entrypoints = [ @@ -175,7 +175,7 @@ fn tool_install() { [tool.options] exclude-newer = "2024-03-25T00:00:00Z" - "###); + "#); }); } @@ -195,7 +195,7 @@ fn tool_install_with_global_python() -> Result<()> { .arg("flask") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -212,7 +212,7 @@ fn tool_install_with_global_python() -> Result<()> { + markupsafe==2.1.5 + werkzeug==3.0.1 Installed 1 executable: flask - "###); + "); tool_dir.child("flask").assert(predicate::path::is_dir()); assert!( @@ -221,7 +221,7 @@ fn tool_install_with_global_python() -> Result<()> { .exists() ); - uv_snapshot!(context.filters(), Command::new("flask").arg("--version").env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + uv_snapshot!(context.filters(), Command::new("flask").arg("--version").env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -230,11 +230,11 @@ fn tool_install_with_global_python() -> Result<()> { Werkzeug 3.0.1 ----- stderr ----- - "###); + "); // Change global version uv_snapshot!(context.filters(), context.python_pin().arg("3.12").arg("--global"), - @r" + @" success: true exit_code: 0 ----- stdout ----- @@ -250,7 +250,7 @@ fn tool_install_with_global_python() -> Result<()> { .arg("--reinstall") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -272,7 +272,7 @@ fn tool_install_with_global_python() -> Result<()> { // Currently, when reinstalling a tool we use the original version the tool // was installed with, not the most up-to-date global version - uv_snapshot!(context.filters(), Command::new("flask").arg("--version").env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + uv_snapshot!(context.filters(), Command::new("flask").arg("--version").env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -281,7 +281,7 @@ fn tool_install_with_global_python() -> Result<()> { Werkzeug 3.0.1 ----- stderr ----- - "###); + "); Ok(()) } @@ -308,7 +308,7 @@ fn tool_install_with_editable() -> Result<()> { .arg("executable-application") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -321,7 +321,7 @@ fn tool_install_with_editable() -> Result<()> { + executable-application==0.3.0 + iniconfig==2.0.0 Installed 1 executable: app - "###); + "); Ok(()) } @@ -346,7 +346,7 @@ fn tool_install_with_compatible_build_constraints() -> Result<()> { .arg("build_constraints.txt") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -376,7 +376,7 @@ fn tool_install_with_compatible_build_constraints() -> Result<()> { filters => context.filters(), }, { // We should have a tool receipt - assert_snapshot!(fs_err::read_to_string(tool_dir.join("black").join("uv-receipt.toml")).unwrap(), @r###" + assert_snapshot!(fs_err::read_to_string(tool_dir.join("black").join("uv-receipt.toml")).unwrap(), @r#" [tool] requirements = [ { name = "black" }, @@ -390,7 +390,7 @@ fn tool_install_with_compatible_build_constraints() -> Result<()> { [tool.options] exclude-newer = "2024-05-04T00:00:00Z" - "###); + "#); }); Ok(()) @@ -416,7 +416,7 @@ fn tool_install_with_incompatible_build_constraints() -> Result<()> { .arg("build_constraints.txt") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: false exit_code: 1 ----- stdout ----- @@ -450,7 +450,7 @@ fn tool_install_suggest_other_packages_with_executable() { uv_snapshot!(filters, context.tool_install() .arg("fastapi==0.111.0") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: false exit_code: 2 ----- stdout ----- @@ -512,7 +512,7 @@ fn tool_install_version() { .arg("black==24.2.0") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -528,7 +528,7 @@ fn tool_install_version() { + pathspec==0.12.1 + platformdirs==4.2.0 Installed 2 executables: black, blackd - "###); + "); tool_dir.child("black").assert(predicate::path::is_dir()); tool_dir @@ -545,7 +545,7 @@ fn tool_install_version() { filters => context.filters(), }, { // Should run black in the virtual environment - assert_snapshot!(fs_err::read_to_string(executable).unwrap(), @r###" + assert_snapshot!(fs_err::read_to_string(executable).unwrap(), @r#" #![TEMP_DIR]/tools/black/bin/python # -*- coding: utf-8 -*- import sys @@ -556,7 +556,7 @@ fn tool_install_version() { elif sys.argv[0].endswith(".exe"): sys.argv[0] = sys.argv[0][:-4] sys.exit(patched_main()) - "###); + "#); }); @@ -564,7 +564,7 @@ fn tool_install_version() { filters => context.filters(), }, { // We should have a tool receipt - assert_snapshot!(fs_err::read_to_string(tool_dir.join("black").join("uv-receipt.toml")).unwrap(), @r###" + assert_snapshot!(fs_err::read_to_string(tool_dir.join("black").join("uv-receipt.toml")).unwrap(), @r#" [tool] requirements = [{ name = "black", specifier = "==24.2.0" }] entrypoints = [ @@ -574,10 +574,10 @@ fn tool_install_version() { [tool.options] exclude-newer = "2024-03-25T00:00:00Z" - "###); + "#); }); - uv_snapshot!(context.filters(), Command::new("black").arg("--version").env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + uv_snapshot!(context.filters(), Command::new("black").arg("--version").env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -585,7 +585,7 @@ fn tool_install_version() { Python (CPython) 3.12.[X] ----- stderr ----- - "###); + "); } /// Test an editable installation of a tool. @@ -601,7 +601,7 @@ fn tool_install_editable() { .arg(context.workspace_root.join("test/packages/black_editable")) .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -612,7 +612,7 @@ fn tool_install_editable() { Installed 1 package in [TIME] + black==0.1.0 (from file://[WORKSPACE]/test/packages/black_editable) Installed 1 executable: black - "###); + "); tool_dir.child("black").assert(predicate::path::is_dir()); tool_dir @@ -629,7 +629,7 @@ fn tool_install_editable() { filters => context.filters(), }, { // Should run black in the virtual environment - assert_snapshot!(fs_err::read_to_string(&executable).unwrap(), @r###" + assert_snapshot!(fs_err::read_to_string(&executable).unwrap(), @r#" #![TEMP_DIR]/tools/black/bin/python # -*- coding: utf-8 -*- import sys @@ -640,7 +640,7 @@ fn tool_install_editable() { elif sys.argv[0].endswith(".exe"): sys.argv[0] = sys.argv[0][:-4] sys.exit(main()) - "###); + "#); }); @@ -648,7 +648,7 @@ fn tool_install_editable() { filters => context.filters(), }, { // We should have a tool receipt - assert_snapshot!(fs_err::read_to_string(tool_dir.join("black").join("uv-receipt.toml")).unwrap(), @r###" + assert_snapshot!(fs_err::read_to_string(tool_dir.join("black").join("uv-receipt.toml")).unwrap(), @r#" [tool] requirements = [{ name = "black", editable = "[WORKSPACE]/test/packages/black_editable" }] entrypoints = [ @@ -657,24 +657,24 @@ fn tool_install_editable() { [tool.options] exclude-newer = "2024-03-25T00:00:00Z" - "###); + "#); }); - uv_snapshot!(context.filters(), Command::new("black").arg("--version").env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + uv_snapshot!(context.filters(), Command::new("black").arg("--version").env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- Hello world! ----- stderr ----- - "###); + "); // Request `black`. It should reinstall from the registry. uv_snapshot!(context.filters(), context.tool_install() .arg("black") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -683,13 +683,13 @@ fn tool_install_editable() { Resolved 1 package in [TIME] Audited 1 package in [TIME] Installed 1 executable: black - "###); + "); insta::with_settings!({ filters => context.filters(), }, { // We should have a tool receipt - assert_snapshot!(fs_err::read_to_string(tool_dir.join("black").join("uv-receipt.toml")).unwrap(), @r###" + assert_snapshot!(fs_err::read_to_string(tool_dir.join("black").join("uv-receipt.toml")).unwrap(), @r#" [tool] requirements = [{ name = "black" }] entrypoints = [ @@ -698,7 +698,7 @@ fn tool_install_editable() { [tool.options] exclude-newer = "2024-03-25T00:00:00Z" - "###); + "#); }); // Request `black` at a different version. It should install a new version. @@ -708,7 +708,7 @@ fn tool_install_editable() { .arg("black==24.2.0") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -726,13 +726,13 @@ fn tool_install_editable() { + pathspec==0.12.1 + platformdirs==4.2.0 Installed 2 executables: black, blackd - "###); + "); insta::with_settings!({ filters => context.filters(), }, { // We should have a tool receipt - assert_snapshot!(fs_err::read_to_string(tool_dir.join("black").join("uv-receipt.toml")).unwrap(), @r###" + assert_snapshot!(fs_err::read_to_string(tool_dir.join("black").join("uv-receipt.toml")).unwrap(), @r#" [tool] requirements = [{ name = "black", specifier = "==24.2.0" }] entrypoints = [ @@ -742,7 +742,7 @@ fn tool_install_editable() { [tool.options] exclude-newer = "2024-03-25T00:00:00Z" - "###); + "#); }); } @@ -758,7 +758,7 @@ fn tool_install_remove_on_empty() -> Result<()> { .arg("black") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -774,13 +774,13 @@ fn tool_install_remove_on_empty() -> Result<()> { + pathspec==0.12.1 + platformdirs==4.2.0 Installed 2 executables: black, blackd - "###); + "); insta::with_settings!({ filters => context.filters(), }, { // We should have a tool receipt - assert_snapshot!(fs_err::read_to_string(tool_dir.join("black").join("uv-receipt.toml")).unwrap(), @r###" + assert_snapshot!(fs_err::read_to_string(tool_dir.join("black").join("uv-receipt.toml")).unwrap(), @r#" [tool] requirements = [{ name = "black" }] entrypoints = [ @@ -790,7 +790,7 @@ fn tool_install_remove_on_empty() -> Result<()> { [tool.options] exclude-newer = "2024-03-25T00:00:00Z" - "###); + "#); }); // Install `black` as an editable package, but without any entrypoints. @@ -824,7 +824,7 @@ fn tool_install_remove_on_empty() -> Result<()> { .arg(black.path()) .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: false exit_code: 2 ----- stdout ----- @@ -850,7 +850,7 @@ fn tool_install_remove_on_empty() -> Result<()> { .arg("black") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -865,13 +865,13 @@ fn tool_install_remove_on_empty() -> Result<()> { + pathspec==0.12.1 + platformdirs==4.2.0 Installed 2 executables: black, blackd - "###); + "); insta::with_settings!({ filters => context.filters(), }, { // We should have a tool receipt - assert_snapshot!(fs_err::read_to_string(tool_dir.join("black").join("uv-receipt.toml")).unwrap(), @r###" + assert_snapshot!(fs_err::read_to_string(tool_dir.join("black").join("uv-receipt.toml")).unwrap(), @r#" [tool] requirements = [{ name = "black" }] entrypoints = [ @@ -881,7 +881,7 @@ fn tool_install_remove_on_empty() -> Result<()> { [tool.options] exclude-newer = "2024-03-25T00:00:00Z" - "###); + "#); }); Ok(()) @@ -902,7 +902,7 @@ fn tool_install_editable_from() { .arg(context.workspace_root.join("test/packages/black_editable")) .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -913,7 +913,7 @@ fn tool_install_editable_from() { Installed 1 package in [TIME] + black==0.1.0 (from file://[WORKSPACE]/test/packages/black_editable) Installed 1 executable: black - "###); + "); tool_dir.child("black").assert(predicate::path::is_dir()); tool_dir @@ -930,7 +930,7 @@ fn tool_install_editable_from() { filters => context.filters(), }, { // Should run black in the virtual environment - assert_snapshot!(fs_err::read_to_string(&executable).unwrap(), @r###" + assert_snapshot!(fs_err::read_to_string(&executable).unwrap(), @r#" #![TEMP_DIR]/tools/black/bin/python # -*- coding: utf-8 -*- import sys @@ -941,7 +941,7 @@ fn tool_install_editable_from() { elif sys.argv[0].endswith(".exe"): sys.argv[0] = sys.argv[0][:-4] sys.exit(main()) - "###); + "#); }); @@ -949,7 +949,7 @@ fn tool_install_editable_from() { filters => context.filters(), }, { // We should have a tool receipt - assert_snapshot!(fs_err::read_to_string(tool_dir.join("black").join("uv-receipt.toml")).unwrap(), @r###" + assert_snapshot!(fs_err::read_to_string(tool_dir.join("black").join("uv-receipt.toml")).unwrap(), @r#" [tool] requirements = [{ name = "black", editable = "[WORKSPACE]/test/packages/black_editable" }] entrypoints = [ @@ -958,17 +958,17 @@ fn tool_install_editable_from() { [tool.options] exclude-newer = "2024-03-25T00:00:00Z" - "###); + "#); }); - uv_snapshot!(context.filters(), Command::new("black").arg("--version").env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + uv_snapshot!(context.filters(), Command::new("black").arg("--version").env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- Hello world! ----- stderr ----- - "###); + "); } /// Test installing a tool with `uv tool install --from` @@ -985,7 +985,7 @@ fn tool_install_from() { .arg("black==24.2.0") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -1001,7 +1001,7 @@ fn tool_install_from() { + pathspec==0.12.1 + platformdirs==4.2.0 Installed 2 executables: black, blackd - "###); + "); // Attempt to install `black` using `--from` with a different package name uv_snapshot!(context.filters(), context.tool_install() @@ -1010,14 +1010,14 @@ fn tool_install_from() { .arg("flask==24.2.0") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: Package name (`flask`) provided with `--from` does not match install request (`black`) - "###); + "); // Attempt to install `black` using `--from` with a different version uv_snapshot!(context.filters(), context.tool_install() @@ -1026,14 +1026,14 @@ fn tool_install_from() { .arg("black==24.3.0") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: Package requirement (`black==24.3.0`) provided with `--from` conflicts with install request (`black==24.2.0`) - "###); + "); } /// Test installing and reinstalling an already installed tool @@ -1050,7 +1050,7 @@ fn tool_install_already_installed() { .arg("black") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -1066,7 +1066,7 @@ fn tool_install_already_installed() { + pathspec==0.12.1 + platformdirs==4.2.0 Installed 2 executables: black, blackd - "###); + "); tool_dir.child("black").assert(predicate::path::is_dir()); tool_dir @@ -1083,7 +1083,7 @@ fn tool_install_already_installed() { filters => context.filters(), }, { // Should run black in the virtual environment - assert_snapshot!(fs_err::read_to_string(executable).unwrap(), @r###" + assert_snapshot!(fs_err::read_to_string(executable).unwrap(), @r#" #![TEMP_DIR]/tools/black/bin/python # -*- coding: utf-8 -*- import sys @@ -1094,14 +1094,14 @@ fn tool_install_already_installed() { elif sys.argv[0].endswith(".exe"): sys.argv[0] = sys.argv[0][:-4] sys.exit(patched_main()) - "###); + "#); }); insta::with_settings!({ filters => context.filters(), }, { // We should have a tool receipt - assert_snapshot!(fs_err::read_to_string(tool_dir.join("black").join("uv-receipt.toml")).unwrap(), @r###" + assert_snapshot!(fs_err::read_to_string(tool_dir.join("black").join("uv-receipt.toml")).unwrap(), @r#" [tool] requirements = [{ name = "black" }] entrypoints = [ @@ -1111,7 +1111,7 @@ fn tool_install_already_installed() { [tool.options] exclude-newer = "2024-03-25T00:00:00Z" - "###); + "#); }); // Install `black` again @@ -1119,14 +1119,14 @@ fn tool_install_already_installed() { .arg("black") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- `black` is already installed - "###); + "); tool_dir.child("black").assert(predicate::path::is_dir()); bin_dir @@ -1137,7 +1137,7 @@ fn tool_install_already_installed() { filters => context.filters(), }, { // We should not have an additional tool receipt - assert_snapshot!(fs_err::read_to_string(tool_dir.join("black").join("uv-receipt.toml")).unwrap(), @r###" + assert_snapshot!(fs_err::read_to_string(tool_dir.join("black").join("uv-receipt.toml")).unwrap(), @r#" [tool] requirements = [{ name = "black" }] entrypoints = [ @@ -1147,7 +1147,7 @@ fn tool_install_already_installed() { [tool.options] exclude-newer = "2024-03-25T00:00:00Z" - "###); + "#); }); // Install `black` again with the `--reinstall` flag @@ -1157,7 +1157,7 @@ fn tool_install_already_installed() { .arg("--reinstall") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -1174,7 +1174,7 @@ fn tool_install_already_installed() { ~ pathspec==0.12.1 ~ platformdirs==4.2.0 Installed 2 executables: black, blackd - "###); + "); // Install `black` again with `--reinstall-package` for `black` // We should reinstall `black` in the environment and reinstall the entry points @@ -1184,7 +1184,7 @@ fn tool_install_already_installed() { .arg("black") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -1196,7 +1196,7 @@ fn tool_install_already_installed() { Installed [N] packages in [TIME] ~ black==24.3.0 Installed 2 executables: black, blackd - "###); + "); // Install `black` again with `--reinstall-package` for a dependency // We should reinstall `click` in the environment but not reinstall `black` @@ -1206,7 +1206,7 @@ fn tool_install_already_installed() { .arg("click") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -1218,7 +1218,7 @@ fn tool_install_already_installed() { Installed [N] packages in [TIME] ~ click==8.1.7 Installed 2 executables: black, blackd - "###); + "); } /// Test installing a tool when its entry point already exists @@ -1238,7 +1238,7 @@ fn tool_install_force() { .arg("black") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: false exit_code: 2 ----- stdout ----- @@ -1254,7 +1254,7 @@ fn tool_install_force() { + pathspec==0.12.1 + platformdirs==4.2.0 error: Executable already exists: black (use `--force` to overwrite) - "###); + "); // We should delete the virtual environment assert!(!tool_dir.child("black").exists()); @@ -1277,7 +1277,7 @@ fn tool_install_force() { .arg("--reinstall") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: false exit_code: 2 ----- stdout ----- @@ -1293,7 +1293,7 @@ fn tool_install_force() { + pathspec==0.12.1 + platformdirs==4.2.0 error: Executable already exists: black (use `--force` to overwrite) - "###); + "); // We should not create a virtual environment assert!(!tool_dir.child("black").exists()); @@ -1318,7 +1318,7 @@ fn tool_install_force() { .arg("black") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: false exit_code: 2 ----- stdout ----- @@ -1333,7 +1333,7 @@ fn tool_install_force() { + pathspec==0.12.1 + platformdirs==4.2.0 error: Executables already exist: black, blackd (use `--force` to overwrite) - "###); + "); // Install `black` with `--force` uv_snapshot!(context.filters(), context.tool_install() @@ -1341,7 +1341,7 @@ fn tool_install_force() { .arg("--force") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -1356,7 +1356,7 @@ fn tool_install_force() { + pathspec==0.12.1 + platformdirs==4.2.0 Installed 2 executables: black, blackd - "###); + "); tool_dir.child("black").assert(predicate::path::is_dir()); @@ -1366,7 +1366,7 @@ fn tool_install_force() { .arg("--force") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -1377,7 +1377,7 @@ fn tool_install_force() { Installed [N] packages in [TIME] ~ black==24.3.0 Installed 2 executables: black, blackd - "###); + "); tool_dir.child("black").assert(predicate::path::is_dir()); @@ -1386,14 +1386,14 @@ fn tool_install_force() { .arg("black") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- `black` is already installed - "###); + "); tool_dir.child("black").assert(predicate::path::is_dir()); @@ -1403,7 +1403,7 @@ fn tool_install_force() { .arg("--reinstall") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -1420,7 +1420,7 @@ fn tool_install_force() { ~ pathspec==0.12.1 ~ platformdirs==4.2.0 Installed 2 executables: black, blackd - "###); + "); tool_dir.child("black").assert(predicate::path::is_dir()); @@ -1428,7 +1428,7 @@ fn tool_install_force() { filters => context.filters(), }, { // We write a tool receipt - assert_snapshot!(fs_err::read_to_string(tool_dir.join("black").join("uv-receipt.toml")).unwrap(), @r###" + assert_snapshot!(fs_err::read_to_string(tool_dir.join("black").join("uv-receipt.toml")).unwrap(), @r#" [tool] requirements = [{ name = "black" }] entrypoints = [ @@ -1438,7 +1438,7 @@ fn tool_install_force() { [tool.options] exclude-newer = "2024-03-25T00:00:00Z" - "###); + "#); }); // On Windows, we can't snapshot an executable file. @@ -1447,7 +1447,7 @@ fn tool_install_force() { filters => context.filters(), }, { // Should run black in the virtual environment - assert_snapshot!(fs_err::read_to_string(executable).unwrap(), @r###" + assert_snapshot!(fs_err::read_to_string(executable).unwrap(), @r#" #![TEMP_DIR]/tools/black/bin/python3 # -*- coding: utf-8 -*- import sys @@ -1458,7 +1458,7 @@ fn tool_install_force() { elif sys.argv[0].endswith(".exe"): sys.argv[0] = sys.argv[0][:-4] sys.exit(patched_main()) - "###); + "#); }); @@ -1466,7 +1466,7 @@ fn tool_install_force() { filters => context.filters(), }, { // We should have a tool receipt - assert_snapshot!(fs_err::read_to_string(tool_dir.join("black").join("uv-receipt.toml")).unwrap(), @r###" + assert_snapshot!(fs_err::read_to_string(tool_dir.join("black").join("uv-receipt.toml")).unwrap(), @r#" [tool] requirements = [{ name = "black" }] entrypoints = [ @@ -1476,10 +1476,10 @@ fn tool_install_force() { [tool.options] exclude-newer = "2024-03-25T00:00:00Z" - "###); + "#); }); - uv_snapshot!(context.filters(), Command::new("black").arg("--version").env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + uv_snapshot!(context.filters(), Command::new("black").arg("--version").env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -1487,7 +1487,7 @@ fn tool_install_force() { Python (CPython) 3.12.[X] ----- stderr ----- - "###); + "); } /// Test `uv tool install` when the bin directory is inferred from `$HOME` @@ -1511,7 +1511,7 @@ fn tool_install_home() { EnvVars::PATH, context.home_dir.child(".local").child("bin").as_os_str(), ); - uv_snapshot!(context.filters(), cmd, @r###" + uv_snapshot!(context.filters(), cmd, @" success: true exit_code: 0 ----- stdout ----- @@ -1527,7 +1527,7 @@ fn tool_install_home() { + pathspec==0.12.1 + platformdirs==4.2.0 Installed 2 executables: black, blackd - "###); + "); context .home_dir @@ -1548,7 +1548,7 @@ fn tool_install_xdg_data_home() { .arg("black") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_DATA_HOME, data_home.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -1564,7 +1564,7 @@ fn tool_install_xdg_data_home() { + pathspec==0.12.1 + platformdirs==4.2.0 Installed 2 executables: black, blackd - "###); + "); context .temp_dir @@ -1584,7 +1584,7 @@ fn tool_install_xdg_bin_home() { .arg("black") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -1600,7 +1600,7 @@ fn tool_install_xdg_bin_home() { + pathspec==0.12.1 + platformdirs==4.2.0 Installed 2 executables: black, blackd - "###); + "); bin_dir .child(format!("black{}", std::env::consts::EXE_SUFFIX)) @@ -1619,7 +1619,7 @@ fn tool_install_tool_bin_dir() { .arg("black") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::UV_TOOL_BIN_DIR, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -1635,7 +1635,7 @@ fn tool_install_tool_bin_dir() { + pathspec==0.12.1 + platformdirs==4.2.0 Installed 2 executables: black, blackd - "###); + "); bin_dir .child(format!("black{}", std::env::consts::EXE_SUFFIX)) @@ -1653,7 +1653,7 @@ fn tool_install_no_entrypoints() { .arg("iniconfig") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: false exit_code: 2 ----- stdout ----- @@ -1696,7 +1696,7 @@ fn tool_install_uninstallable() { .arg("pyenv") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: false exit_code: 1 ----- stdout ----- @@ -1743,7 +1743,7 @@ fn tool_install_unnamed_package() { .arg("https://files.pythonhosted.org/packages/0f/89/294c9a6b6c75a08da55e9d05321d0707e9418735e3062b12ef0f54c33474/black-24.4.2-py3-none-any.whl") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -1759,7 +1759,7 @@ fn tool_install_unnamed_package() { + pathspec==0.12.1 + platformdirs==4.2.0 Installed 2 executables: black, blackd - "###); + "); tool_dir.child("black").assert(predicate::path::is_dir()); tool_dir @@ -1776,7 +1776,7 @@ fn tool_install_unnamed_package() { filters => context.filters(), }, { // Should run black in the virtual environment - assert_snapshot!(fs_err::read_to_string(executable).unwrap(), @r###" + assert_snapshot!(fs_err::read_to_string(executable).unwrap(), @r#" #![TEMP_DIR]/tools/black/bin/python # -*- coding: utf-8 -*- import sys @@ -1787,7 +1787,7 @@ fn tool_install_unnamed_package() { elif sys.argv[0].endswith(".exe"): sys.argv[0] = sys.argv[0][:-4] sys.exit(patched_main()) - "###); + "#); }); @@ -1795,7 +1795,7 @@ fn tool_install_unnamed_package() { filters => context.filters(), }, { // We should have a tool receipt - assert_snapshot!(fs_err::read_to_string(tool_dir.join("black").join("uv-receipt.toml")).unwrap(), @r###" + assert_snapshot!(fs_err::read_to_string(tool_dir.join("black").join("uv-receipt.toml")).unwrap(), @r#" [tool] requirements = [{ name = "black", url = "https://files.pythonhosted.org/packages/0f/89/294c9a6b6c75a08da55e9d05321d0707e9418735e3062b12ef0f54c33474/black-24.4.2-py3-none-any.whl" }] entrypoints = [ @@ -1805,10 +1805,10 @@ fn tool_install_unnamed_package() { [tool.options] exclude-newer = "2024-03-25T00:00:00Z" - "###); + "#); }); - uv_snapshot!(context.filters(), Command::new("black").arg("--version").env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + uv_snapshot!(context.filters(), Command::new("black").arg("--version").env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -1816,7 +1816,7 @@ fn tool_install_unnamed_package() { Python (CPython) 3.12.[X] ----- stderr ----- - "###); + "); } /// Test installing a tool with a Git requirement. @@ -1852,7 +1852,7 @@ fn tool_install_git() { .arg("git+https://github.com/psf/black@24.2.0") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, path.as_os_str()), @r" + .env(EnvVars::PATH, path.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -1887,7 +1887,7 @@ fn tool_install_git() { .arg("black @ git+https://github.com/psf/black@24.2.0") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, path.as_os_str()), @r" + .env(EnvVars::PATH, path.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -1960,7 +1960,7 @@ fn tool_install_git_lfs() { .arg("test-lfs-repo @ git+https://github.com/astral-sh/test-lfs-repo@c6d77ab63d91104f32ab5e5ae2943f4d26ff875f") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, path.as_os_str()), @r" + .env(EnvVars::PATH, path.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -2001,23 +2001,23 @@ fn tool_install_git_lfs() { "#); }); - uv_snapshot!(context.filters(), Command::new("test-lfs-repo").env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + uv_snapshot!(context.filters(), Command::new("test-lfs-repo").env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- Hello from test-lfs-repo! ----- stderr ----- - "###); + "); - uv_snapshot!(context.filters(), Command::new("test-lfs-repo-assets").env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + uv_snapshot!(context.filters(), Command::new("test-lfs-repo-assets").env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- Hello from test-lfs-repo! LFS_TEST=True ANOTHER_LFS_TEST=True ----- stderr ----- - "###); + "); // Attempt to install when LFS artifacts are missing and LFS is requested. @@ -2040,7 +2040,7 @@ fn tool_install_git_lfs() { .env(EnvVars::UV_INTERNAL__TEST_LFS_DISABLED, "1") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, path.as_os_str()), @r" + .env(EnvVars::PATH, path.as_os_str()), @" success: false exit_code: [ERROR_CODE] ----- stdout ----- @@ -2054,7 +2054,7 @@ fn tool_install_git_lfs() { .arg("test-lfs-repo @ git+https://github.com/astral-sh/test-lfs-repo@c6d77ab63d91104f32ab5e5ae2943f4d26ff875f") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, path.as_os_str()), @r" + .env(EnvVars::PATH, path.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -2125,14 +2125,14 @@ fn tool_install_unnamed_conflict() { .arg("https://files.pythonhosted.org/packages/ef/a6/62565a6e1cf69e10f5727360368e451d4b7f58beeac6173dc9db836a5b46/iniconfig-2.0.0-py3-none-any.whl") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: Package name (`iniconfig`) provided with `--from` does not match install request (`black`) - "###); + "); } /// Test installing a tool with a bare URL requirement using `--from`. @@ -2149,7 +2149,7 @@ fn tool_install_unnamed_from() { .arg("https://files.pythonhosted.org/packages/0f/89/294c9a6b6c75a08da55e9d05321d0707e9418735e3062b12ef0f54c33474/black-24.4.2-py3-none-any.whl") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -2165,7 +2165,7 @@ fn tool_install_unnamed_from() { + pathspec==0.12.1 + platformdirs==4.2.0 Installed 2 executables: black, blackd - "###); + "); tool_dir.child("black").assert(predicate::path::is_dir()); tool_dir @@ -2182,7 +2182,7 @@ fn tool_install_unnamed_from() { filters => context.filters(), }, { // Should run black in the virtual environment - assert_snapshot!(fs_err::read_to_string(executable).unwrap(), @r###" + assert_snapshot!(fs_err::read_to_string(executable).unwrap(), @r#" #![TEMP_DIR]/tools/black/bin/python # -*- coding: utf-8 -*- import sys @@ -2193,7 +2193,7 @@ fn tool_install_unnamed_from() { elif sys.argv[0].endswith(".exe"): sys.argv[0] = sys.argv[0][:-4] sys.exit(patched_main()) - "###); + "#); }); @@ -2201,7 +2201,7 @@ fn tool_install_unnamed_from() { filters => context.filters(), }, { // We should have a tool receipt - assert_snapshot!(fs_err::read_to_string(tool_dir.join("black").join("uv-receipt.toml")).unwrap(), @r###" + assert_snapshot!(fs_err::read_to_string(tool_dir.join("black").join("uv-receipt.toml")).unwrap(), @r#" [tool] requirements = [{ name = "black", url = "https://files.pythonhosted.org/packages/0f/89/294c9a6b6c75a08da55e9d05321d0707e9418735e3062b12ef0f54c33474/black-24.4.2-py3-none-any.whl" }] entrypoints = [ @@ -2211,10 +2211,10 @@ fn tool_install_unnamed_from() { [tool.options] exclude-newer = "2024-03-25T00:00:00Z" - "###); + "#); }); - uv_snapshot!(context.filters(), Command::new("black").arg("--version").env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + uv_snapshot!(context.filters(), Command::new("black").arg("--version").env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -2222,7 +2222,7 @@ fn tool_install_unnamed_from() { Python (CPython) 3.12.[X] ----- stderr ----- - "###); + "); } /// Test installing a tool with a bare URL requirement using `--with`. @@ -2239,7 +2239,7 @@ fn tool_install_unnamed_with() { .arg("https://files.pythonhosted.org/packages/ef/a6/62565a6e1cf69e10f5727360368e451d4b7f58beeac6173dc9db836a5b46/iniconfig-2.0.0-py3-none-any.whl") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -2256,7 +2256,7 @@ fn tool_install_unnamed_with() { + pathspec==0.12.1 + platformdirs==4.2.0 Installed 2 executables: black, blackd - "###); + "); tool_dir.child("black").assert(predicate::path::is_dir()); tool_dir @@ -2273,7 +2273,7 @@ fn tool_install_unnamed_with() { filters => context.filters(), }, { // Should run black in the virtual environment - assert_snapshot!(fs_err::read_to_string(executable).unwrap(), @r###" + assert_snapshot!(fs_err::read_to_string(executable).unwrap(), @r#" #![TEMP_DIR]/tools/black/bin/python # -*- coding: utf-8 -*- import sys @@ -2284,7 +2284,7 @@ fn tool_install_unnamed_with() { elif sys.argv[0].endswith(".exe"): sys.argv[0] = sys.argv[0][:-4] sys.exit(patched_main()) - "###); + "#); }); @@ -2292,7 +2292,7 @@ fn tool_install_unnamed_with() { filters => context.filters(), }, { // We should have a tool receipt - assert_snapshot!(fs_err::read_to_string(tool_dir.join("black").join("uv-receipt.toml")).unwrap(), @r###" + assert_snapshot!(fs_err::read_to_string(tool_dir.join("black").join("uv-receipt.toml")).unwrap(), @r#" [tool] requirements = [ { name = "black" }, @@ -2305,10 +2305,10 @@ fn tool_install_unnamed_with() { [tool.options] exclude-newer = "2024-03-25T00:00:00Z" - "###); + "#); }); - uv_snapshot!(context.filters(), Command::new("black").arg("--version").env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + uv_snapshot!(context.filters(), Command::new("black").arg("--version").env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -2316,7 +2316,7 @@ fn tool_install_unnamed_with() { Python (CPython) 3.12.[X] ----- stderr ----- - "###); + "); } #[test] @@ -2346,7 +2346,7 @@ fn tool_install_with_dependencies_from_script() -> Result<()> { .arg("black") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -2407,7 +2407,7 @@ fn tool_install_with_dependencies_from_script() -> Result<()> { .arg("script.py") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -2463,7 +2463,7 @@ fn tool_install_requirements_txt() { .arg("requirements.txt") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -2480,13 +2480,13 @@ fn tool_install_requirements_txt() { + pathspec==0.12.1 + platformdirs==4.2.0 Installed 2 executables: black, blackd - "###); + "); insta::with_settings!({ filters => context.filters(), }, { // We should have a tool receipt - assert_snapshot!(fs_err::read_to_string(tool_dir.join("black").join("uv-receipt.toml")).unwrap(), @r###" + assert_snapshot!(fs_err::read_to_string(tool_dir.join("black").join("uv-receipt.toml")).unwrap(), @r#" [tool] requirements = [ { name = "black" }, @@ -2499,7 +2499,7 @@ fn tool_install_requirements_txt() { [tool.options] exclude-newer = "2024-03-25T00:00:00Z" - "###); + "#); }); // Update the `requirements.txt` file. @@ -2512,7 +2512,7 @@ fn tool_install_requirements_txt() { .arg("requirements.txt") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -2525,13 +2525,13 @@ fn tool_install_requirements_txt() { + idna==3.6 - iniconfig==2.0.0 Installed 2 executables: black, blackd - "###); + "); insta::with_settings!({ filters => context.filters(), }, { // We should have a tool receipt - assert_snapshot!(fs_err::read_to_string(tool_dir.join("black").join("uv-receipt.toml")).unwrap(), @r###" + assert_snapshot!(fs_err::read_to_string(tool_dir.join("black").join("uv-receipt.toml")).unwrap(), @r#" [tool] requirements = [ { name = "black" }, @@ -2544,7 +2544,7 @@ fn tool_install_requirements_txt() { [tool.options] exclude-newer = "2024-03-25T00:00:00Z" - "###); + "#); }); } @@ -2571,7 +2571,7 @@ fn tool_install_requirements_txt_arguments() { .arg("requirements.txt") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -2589,13 +2589,13 @@ fn tool_install_requirements_txt_arguments() { + pathspec==0.12.1 + platformdirs==4.2.0 Installed 2 executables: black, blackd - "###); + "); insta::with_settings!({ filters => context.filters(), }, { // We should have a tool receipt - assert_snapshot!(fs_err::read_to_string(tool_dir.join("black").join("uv-receipt.toml")).unwrap(), @r###" + assert_snapshot!(fs_err::read_to_string(tool_dir.join("black").join("uv-receipt.toml")).unwrap(), @r#" [tool] requirements = [ { name = "black" }, @@ -2608,7 +2608,7 @@ fn tool_install_requirements_txt_arguments() { [tool.options] exclude-newer = "2024-03-25T00:00:00Z" - "###); + "#); }); // Don't warn, though, if the index URL is the same as the default or as settings. @@ -2628,14 +2628,14 @@ fn tool_install_requirements_txt_arguments() { .arg("requirements.txt") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- `black` is already installed - "###); + "); let requirements_txt = context.temp_dir.child("requirements.txt"); requirements_txt @@ -2655,7 +2655,7 @@ fn tool_install_requirements_txt_arguments() { .arg("https://test.pypi.org/simple") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -2673,7 +2673,7 @@ fn tool_install_requirements_txt_arguments() { + markupsafe==2.1.5 + werkzeug==3.0.1 Installed 1 executable: flask - "###); + "); } /// Test upgrading an already installed tool. @@ -2690,7 +2690,7 @@ fn tool_install_upgrade() { .arg("black==24.1.1") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -2706,13 +2706,13 @@ fn tool_install_upgrade() { + pathspec==0.12.1 + platformdirs==4.2.0 Installed 2 executables: black, blackd - "###); + "); insta::with_settings!({ filters => context.filters(), }, { // We should have a tool receipt - assert_snapshot!(fs_err::read_to_string(tool_dir.join("black").join("uv-receipt.toml")).unwrap(), @r###" + assert_snapshot!(fs_err::read_to_string(tool_dir.join("black").join("uv-receipt.toml")).unwrap(), @r#" [tool] requirements = [{ name = "black", specifier = "==24.1.1" }] entrypoints = [ @@ -2722,7 +2722,7 @@ fn tool_install_upgrade() { [tool.options] exclude-newer = "2024-03-25T00:00:00Z" - "###); + "#); }); // Install without the constraint. It should be replaced, but the package shouldn't be installed @@ -2731,7 +2731,7 @@ fn tool_install_upgrade() { .arg("black") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -2740,13 +2740,13 @@ fn tool_install_upgrade() { Resolved [N] packages in [TIME] Audited [N] packages in [TIME] Installed 2 executables: black, blackd - "###); + "); insta::with_settings!({ filters => context.filters(), }, { // We should have a tool receipt - assert_snapshot!(fs_err::read_to_string(tool_dir.join("black").join("uv-receipt.toml")).unwrap(), @r###" + assert_snapshot!(fs_err::read_to_string(tool_dir.join("black").join("uv-receipt.toml")).unwrap(), @r#" [tool] requirements = [{ name = "black" }] entrypoints = [ @@ -2756,7 +2756,7 @@ fn tool_install_upgrade() { [tool.options] exclude-newer = "2024-03-25T00:00:00Z" - "###); + "#); }); // Install with a `with`. It should be added to the environment. @@ -2766,7 +2766,7 @@ fn tool_install_upgrade() { .arg("iniconfig @ https://files.pythonhosted.org/packages/ef/a6/62565a6e1cf69e10f5727360368e451d4b7f58beeac6173dc9db836a5b46/iniconfig-2.0.0-py3-none-any.whl") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -2777,13 +2777,13 @@ fn tool_install_upgrade() { Installed [N] packages in [TIME] + iniconfig==2.0.0 (from https://files.pythonhosted.org/packages/ef/a6/62565a6e1cf69e10f5727360368e451d4b7f58beeac6173dc9db836a5b46/iniconfig-2.0.0-py3-none-any.whl) Installed 2 executables: black, blackd - "###); + "); insta::with_settings!({ filters => context.filters(), }, { // We should have a tool receipt - assert_snapshot!(fs_err::read_to_string(tool_dir.join("black").join("uv-receipt.toml")).unwrap(), @r###" + assert_snapshot!(fs_err::read_to_string(tool_dir.join("black").join("uv-receipt.toml")).unwrap(), @r#" [tool] requirements = [ { name = "black" }, @@ -2796,7 +2796,7 @@ fn tool_install_upgrade() { [tool.options] exclude-newer = "2024-03-25T00:00:00Z" - "###); + "#); }); // Install with `--upgrade`. `black` should be reinstalled with a more recent version, and @@ -2806,7 +2806,7 @@ fn tool_install_upgrade() { .arg("--upgrade") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -2820,13 +2820,13 @@ fn tool_install_upgrade() { + black==24.3.0 - iniconfig==2.0.0 (from https://files.pythonhosted.org/packages/ef/a6/62565a6e1cf69e10f5727360368e451d4b7f58beeac6173dc9db836a5b46/iniconfig-2.0.0-py3-none-any.whl) Installed 2 executables: black, blackd - "###); + "); insta::with_settings!({ filters => context.filters(), }, { // We should have a tool receipt - assert_snapshot!(fs_err::read_to_string(tool_dir.join("black").join("uv-receipt.toml")).unwrap(), @r###" + assert_snapshot!(fs_err::read_to_string(tool_dir.join("black").join("uv-receipt.toml")).unwrap(), @r#" [tool] requirements = [{ name = "black" }] entrypoints = [ @@ -2836,7 +2836,7 @@ fn tool_install_upgrade() { [tool.options] exclude-newer = "2024-03-25T00:00:00Z" - "###); + "#); }); } @@ -2856,7 +2856,7 @@ fn tool_install_python_requests() { .arg("black") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -2872,7 +2872,7 @@ fn tool_install_python_requests() { + pathspec==0.12.1 + platformdirs==4.2.0 Installed 2 executables: black, blackd - "###); + "); // Install with Python 3.12 (compatible). uv_snapshot!(context.filters(), context.tool_install() @@ -2881,14 +2881,14 @@ fn tool_install_python_requests() { .arg("black") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- `black` is already installed - "###); + "); // // Install with Python 3.11 (incompatible). uv_snapshot!(context.filters(), context.tool_install() @@ -2897,7 +2897,7 @@ fn tool_install_python_requests() { .arg("black") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -2914,7 +2914,7 @@ fn tool_install_python_requests() { + pathspec==0.12.1 + platformdirs==4.2.0 Installed 2 executables: black, blackd - "###); + "); } /// Test reinstalling tools with varying `--python` and @@ -3075,7 +3075,7 @@ fn tool_install_preserve_environment() { .arg("black==24.1.1") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -3091,7 +3091,7 @@ fn tool_install_preserve_environment() { + pathspec==0.12.1 + platformdirs==4.2.0 Installed 2 executables: black, blackd - "###); + "); // Install `black`, but with an incompatible requirement. uv_snapshot!(context.filters(), context.tool_install() @@ -3100,7 +3100,7 @@ fn tool_install_preserve_environment() { .arg("packaging==0.0.1") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: false exit_code: 1 ----- stdout ----- @@ -3109,21 +3109,21 @@ fn tool_install_preserve_environment() { × No solution found when resolving dependencies: ╰─▶ Because black==24.1.1 depends on packaging>=22.0 and you require black==24.1.1, we can conclude that you require packaging>=22.0. And because you require packaging==0.0.1, we can conclude that your requirements are unsatisfiable. - "###); + "); // Install `black`. The tool should already be installed, since we didn't remove the environment. uv_snapshot!(context.filters(), context.tool_install() .arg("black==24.1.1") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- `black==24.1.1` is already installed - "###); + "); } /// Test warning when the binary directory is not on the user's PATH. @@ -3175,7 +3175,7 @@ fn tool_install_bad_receipt() -> Result<()> { .arg("black") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -3191,7 +3191,7 @@ fn tool_install_bad_receipt() -> Result<()> { + pathspec==0.12.1 + platformdirs==4.2.0 Installed 2 executables: black, blackd - "###); + "); tool_dir .child("black") @@ -3209,7 +3209,7 @@ fn tool_install_bad_receipt() -> Result<()> { .arg("black") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -3225,7 +3225,7 @@ fn tool_install_bad_receipt() -> Result<()> { + pathspec==0.12.1 + platformdirs==4.2.0 Installed 2 executables: black, blackd - "###); + "); Ok(()) } @@ -3246,7 +3246,7 @@ fn tool_install_malformed_dist_info() { .arg("executable-application") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -3257,7 +3257,7 @@ fn tool_install_malformed_dist_info() { Installed [N] packages in [TIME] + executable-application==0.3.0 Installed 1 executable: app - "###); + "); tool_dir .child("executable-application") @@ -3276,7 +3276,7 @@ fn tool_install_malformed_dist_info() { filters => context.filters(), }, { // Should run black in the virtual environment - assert_snapshot!(fs_err::read_to_string(executable).unwrap(), @r###" + assert_snapshot!(fs_err::read_to_string(executable).unwrap(), @r#" #![TEMP_DIR]/tools/executable-application/bin/python # -*- coding: utf-8 -*- import sys @@ -3287,7 +3287,7 @@ fn tool_install_malformed_dist_info() { elif sys.argv[0].endswith(".exe"): sys.argv[0] = sys.argv[0][:-4] sys.exit(main()) - "###); + "#); }); @@ -3295,7 +3295,7 @@ fn tool_install_malformed_dist_info() { filters => context.filters(), }, { // We should have a tool receipt - assert_snapshot!(fs_err::read_to_string(tool_dir.join("executable-application").join("uv-receipt.toml")).unwrap(), @r###" + assert_snapshot!(fs_err::read_to_string(tool_dir.join("executable-application").join("uv-receipt.toml")).unwrap(), @r#" [tool] requirements = [{ name = "executable-application" }] entrypoints = [ @@ -3304,7 +3304,7 @@ fn tool_install_malformed_dist_info() { [tool.options] exclude-newer = "2025-01-18T00:00:00Z" - "###); + "#); }); } @@ -3323,7 +3323,7 @@ fn tool_install_settings() { .arg("--resolution=lowest-direct") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -3340,7 +3340,7 @@ fn tool_install_settings() { + markupsafe==2.1.5 + werkzeug==3.0.1 Installed 1 executable: flask - "###); + "); tool_dir.child("flask").assert(predicate::path::is_dir()); tool_dir @@ -3356,7 +3356,7 @@ fn tool_install_settings() { insta::with_settings!({ filters => context.filters(), }, { - assert_snapshot!(fs_err::read_to_string(executable).unwrap(), @r###" + assert_snapshot!(fs_err::read_to_string(executable).unwrap(), @r#" #![TEMP_DIR]/tools/flask/bin/python # -*- coding: utf-8 -*- import sys @@ -3367,7 +3367,7 @@ fn tool_install_settings() { elif sys.argv[0].endswith(".exe"): sys.argv[0] = sys.argv[0][:-4] sys.exit(main()) - "###); + "#); }); @@ -3375,7 +3375,7 @@ fn tool_install_settings() { filters => context.filters(), }, { // We should have a tool receipt - assert_snapshot!(fs_err::read_to_string(tool_dir.join("flask").join("uv-receipt.toml")).unwrap(), @r###" + assert_snapshot!(fs_err::read_to_string(tool_dir.join("flask").join("uv-receipt.toml")).unwrap(), @r#" [tool] requirements = [{ name = "flask", specifier = ">=3" }] entrypoints = [ @@ -3385,7 +3385,7 @@ fn tool_install_settings() { [tool.options] resolution = "lowest-direct" exclude-newer = "2024-03-25T00:00:00Z" - "###); + "#); }); // Reinstall with `highest`. This is a no-op, since we _do_ have a compatible version installed. @@ -3394,21 +3394,21 @@ fn tool_install_settings() { .arg("--resolution=highest") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- `flask>=3` is already installed - "###); + "); // It should update the receipt though. insta::with_settings!({ filters => context.filters(), }, { // We should have a tool receipt - assert_snapshot!(fs_err::read_to_string(tool_dir.join("flask").join("uv-receipt.toml")).unwrap(), @r###" + assert_snapshot!(fs_err::read_to_string(tool_dir.join("flask").join("uv-receipt.toml")).unwrap(), @r#" [tool] requirements = [{ name = "flask", specifier = ">=3" }] entrypoints = [ @@ -3418,7 +3418,7 @@ fn tool_install_settings() { [tool.options] resolution = "highest" exclude-newer = "2024-03-25T00:00:00Z" - "###); + "#); }); // Reinstall with `highest` and `--upgrade`. This should change the setting and install a higher @@ -3429,7 +3429,7 @@ fn tool_install_settings() { .arg("--upgrade") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -3442,13 +3442,13 @@ fn tool_install_settings() { - flask==3.0.0 + flask==3.0.2 Installed 1 executable: flask - "###); + "); insta::with_settings!({ filters => context.filters(), }, { // We should have a tool receipt - assert_snapshot!(fs_err::read_to_string(tool_dir.join("flask").join("uv-receipt.toml")).unwrap(), @r###" + assert_snapshot!(fs_err::read_to_string(tool_dir.join("flask").join("uv-receipt.toml")).unwrap(), @r#" [tool] requirements = [{ name = "flask", specifier = ">=3" }] entrypoints = [ @@ -3458,7 +3458,7 @@ fn tool_install_settings() { [tool.options] resolution = "highest" exclude-newer = "2024-03-25T00:00:00Z" - "###); + "#); }); } @@ -3476,7 +3476,7 @@ fn tool_install_at_version() { .arg("black@24.1.0") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -3492,12 +3492,12 @@ fn tool_install_at_version() { + pathspec==0.12.1 + platformdirs==4.2.0 Installed 2 executables: black, blackd - "###); + "); insta::with_settings!({ filters => context.filters(), }, { - assert_snapshot!(fs_err::read_to_string(tool_dir.join("black").join("uv-receipt.toml")).unwrap(), @r###" + assert_snapshot!(fs_err::read_to_string(tool_dir.join("black").join("uv-receipt.toml")).unwrap(), @r#" [tool] requirements = [{ name = "black", specifier = "==24.1.0" }] entrypoints = [ @@ -3507,7 +3507,7 @@ fn tool_install_at_version() { [tool.options] exclude-newer = "2024-03-25T00:00:00Z" - "###); + "#); }); // Combining `{package}@{version}` with a `--from` should fail (even if they're ultimately @@ -3518,14 +3518,14 @@ fn tool_install_at_version() { .arg("black==24.1.0") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: Package requirement (`black==24.1.0`) provided with `--from` conflicts with install request (`black@24.1.0`) - "###); + "); } /// Test installing a tool with `uv tool install {package}@latest`. @@ -3542,7 +3542,7 @@ fn tool_install_at_latest() { .arg("black@latest") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -3558,12 +3558,12 @@ fn tool_install_at_latest() { + pathspec==0.12.1 + platformdirs==4.2.0 Installed 2 executables: black, blackd - "###); + "); insta::with_settings!({ filters => context.filters(), }, { - assert_snapshot!(fs_err::read_to_string(tool_dir.join("black").join("uv-receipt.toml")).unwrap(), @r###" + assert_snapshot!(fs_err::read_to_string(tool_dir.join("black").join("uv-receipt.toml")).unwrap(), @r#" [tool] requirements = [{ name = "black" }] entrypoints = [ @@ -3573,7 +3573,7 @@ fn tool_install_at_latest() { [tool.options] exclude-newer = "2024-03-25T00:00:00Z" - "###); + "#); }); } @@ -3593,7 +3593,7 @@ fn tool_install_from_at_latest() { .arg("executable-application@latest") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -3604,12 +3604,12 @@ fn tool_install_from_at_latest() { Installed [N] packages in [TIME] + executable-application==0.3.0 Installed 1 executable: app - "###); + "); insta::with_settings!({ filters => context.filters(), }, { - assert_snapshot!(fs_err::read_to_string(tool_dir.join("executable-application").join("uv-receipt.toml")).unwrap(), @r###" + assert_snapshot!(fs_err::read_to_string(tool_dir.join("executable-application").join("uv-receipt.toml")).unwrap(), @r#" [tool] requirements = [{ name = "executable-application" }] entrypoints = [ @@ -3618,7 +3618,7 @@ fn tool_install_from_at_latest() { [tool.options] exclude-newer = "2025-01-18T00:00:00Z" - "###); + "#); }); } @@ -3638,7 +3638,7 @@ fn tool_install_from_at_version() { .arg("executable-application@0.2.0") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -3649,12 +3649,12 @@ fn tool_install_from_at_version() { Installed [N] packages in [TIME] + executable-application==0.2.0 Installed 1 executable: app - "###); + "); insta::with_settings!({ filters => context.filters(), }, { - assert_snapshot!(fs_err::read_to_string(tool_dir.join("executable-application").join("uv-receipt.toml")).unwrap(), @r###" + assert_snapshot!(fs_err::read_to_string(tool_dir.join("executable-application").join("uv-receipt.toml")).unwrap(), @r#" [tool] requirements = [{ name = "executable-application", specifier = "==0.2.0" }] entrypoints = [ @@ -3663,7 +3663,7 @@ fn tool_install_from_at_version() { [tool.options] exclude-newer = "2025-01-18T00:00:00Z" - "###); + "#); }); } @@ -3681,7 +3681,7 @@ fn tool_install_at_latest_upgrade() { .arg("black==24.1.1") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -3697,13 +3697,13 @@ fn tool_install_at_latest_upgrade() { + pathspec==0.12.1 + platformdirs==4.2.0 Installed 2 executables: black, blackd - "###); + "); insta::with_settings!({ filters => context.filters(), }, { // We should have a tool receipt - assert_snapshot!(fs_err::read_to_string(tool_dir.join("black").join("uv-receipt.toml")).unwrap(), @r###" + assert_snapshot!(fs_err::read_to_string(tool_dir.join("black").join("uv-receipt.toml")).unwrap(), @r#" [tool] requirements = [{ name = "black", specifier = "==24.1.1" }] entrypoints = [ @@ -3713,7 +3713,7 @@ fn tool_install_at_latest_upgrade() { [tool.options] exclude-newer = "2024-03-25T00:00:00Z" - "###); + "#); }); // Install without the constraint. It should be replaced, but the package shouldn't be installed @@ -3722,7 +3722,7 @@ fn tool_install_at_latest_upgrade() { .arg("black") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -3731,13 +3731,13 @@ fn tool_install_at_latest_upgrade() { Resolved [N] packages in [TIME] Audited [N] packages in [TIME] Installed 2 executables: black, blackd - "###); + "); insta::with_settings!({ filters => context.filters(), }, { // We should have a tool receipt - assert_snapshot!(fs_err::read_to_string(tool_dir.join("black").join("uv-receipt.toml")).unwrap(), @r###" + assert_snapshot!(fs_err::read_to_string(tool_dir.join("black").join("uv-receipt.toml")).unwrap(), @r#" [tool] requirements = [{ name = "black" }] entrypoints = [ @@ -3747,7 +3747,7 @@ fn tool_install_at_latest_upgrade() { [tool.options] exclude-newer = "2024-03-25T00:00:00Z" - "###); + "#); }); // Install with `{package}@{latest}`. `black` should be reinstalled with a more recent version. @@ -3755,7 +3755,7 @@ fn tool_install_at_latest_upgrade() { .arg("black@latest") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -3768,13 +3768,13 @@ fn tool_install_at_latest_upgrade() { - black==24.1.1 + black==24.3.0 Installed 2 executables: black, blackd - "###); + "); insta::with_settings!({ filters => context.filters(), }, { // We should have a tool receipt - assert_snapshot!(fs_err::read_to_string(tool_dir.join("black").join("uv-receipt.toml")).unwrap(), @r###" + assert_snapshot!(fs_err::read_to_string(tool_dir.join("black").join("uv-receipt.toml")).unwrap(), @r#" [tool] requirements = [{ name = "black" }] entrypoints = [ @@ -3784,7 +3784,7 @@ fn tool_install_at_latest_upgrade() { [tool.options] exclude-newer = "2024-03-25T00:00:00Z" - "###); + "#); }); } @@ -3810,7 +3810,7 @@ fn tool_install_constraints() -> Result<()> { .arg(constraints_txt.as_os_str()) .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -3826,13 +3826,13 @@ fn tool_install_constraints() -> Result<()> { + pathspec==0.12.1 + platformdirs==4.2.0 Installed 2 executables: black, blackd - "###); + "); insta::with_settings!({ filters => context.filters(), }, { // We should have a tool receipt - assert_snapshot!(fs_err::read_to_string(tool_dir.join("black").join("uv-receipt.toml")).unwrap(), @r###" + assert_snapshot!(fs_err::read_to_string(tool_dir.join("black").join("uv-receipt.toml")).unwrap(), @r#" [tool] requirements = [{ name = "black" }] constraints = [ @@ -3846,7 +3846,7 @@ fn tool_install_constraints() -> Result<()> { [tool.options] exclude-newer = "2024-03-25T00:00:00Z" - "###); + "#); }); // Installing with the same constraints should be a no-op. @@ -3856,14 +3856,14 @@ fn tool_install_constraints() -> Result<()> { .arg(constraints_txt.as_os_str()) .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- `black` is already installed - "###); + "); let constraints_txt = context.temp_dir.child("constraints.txt"); constraints_txt.write_str(indoc::indoc! {r" @@ -3877,7 +3877,7 @@ fn tool_install_constraints() -> Result<()> { .arg(constraints_txt.as_os_str()) .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -3890,7 +3890,7 @@ fn tool_install_constraints() -> Result<()> { - platformdirs==4.2.0 + platformdirs==3.11.0 Installed 2 executables: black, blackd - "###); + "); Ok(()) } @@ -3917,7 +3917,7 @@ fn tool_install_overrides() -> Result<()> { .arg(overrides_txt.as_os_str()) .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -3933,13 +3933,13 @@ fn tool_install_overrides() -> Result<()> { + pathspec==0.12.1 + platformdirs==4.2.0 Installed 2 executables: black, blackd - "###); + "); insta::with_settings!({ filters => context.filters(), }, { // We should have a tool receipt - assert_snapshot!(fs_err::read_to_string(tool_dir.join("black").join("uv-receipt.toml")).unwrap(), @r###" + assert_snapshot!(fs_err::read_to_string(tool_dir.join("black").join("uv-receipt.toml")).unwrap(), @r#" [tool] requirements = [{ name = "black" }] overrides = [ @@ -3953,7 +3953,7 @@ fn tool_install_overrides() -> Result<()> { [tool.options] exclude-newer = "2024-03-25T00:00:00Z" - "###); + "#); }); Ok(()) @@ -3973,28 +3973,28 @@ fn tool_install_python() { .arg("python") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: Cannot install Python with `uv tool install`. Did you mean to use `uv python install`? - "###); + "); // Install `python@` uv_snapshot!(context.filters(), context.tool_install() .arg("python@3.12") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: Cannot install Python with `uv tool install`. Did you mean to use `uv python install`? - "###); + "); } #[test] @@ -4011,14 +4011,14 @@ fn tool_install_mismatched_name() { .arg("https://files.pythonhosted.org/packages/af/47/93213ee66ef8fae3b93b3e29206f6b251e65c97bd91d8e1c5596ef15af0a/flask-3.1.0-py3-none-any.whl") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: Package name (`flask`) provided with `--from` does not match install request (`black`) - "###); + "); uv_snapshot!(context.filters(), context.tool_install() .arg("black") @@ -4026,14 +4026,14 @@ fn tool_install_mismatched_name() { .arg("flask @ https://files.pythonhosted.org/packages/af/47/93213ee66ef8fae3b93b3e29206f6b251e65c97bd91d8e1c5596ef15af0a/flask-3.1.0-py3-none-any.whl") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: Package name (`flask`) provided with `--from` does not match install request (`black`) - "###); + "); uv_snapshot!(context.filters(), context.tool_install() .arg("flask") @@ -4041,14 +4041,14 @@ fn tool_install_mismatched_name() { .arg("black @ https://files.pythonhosted.org/packages/af/47/93213ee66ef8fae3b93b3e29206f6b251e65c97bd91d8e1c5596ef15af0a/flask-3.1.0-py3-none-any.whl") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: Package name (`black`) provided with `--from` does not match install request (`flask`) - "###); + "); } /// When installing from an authenticated index, the credentials should be omitted from the receipt. @@ -4068,7 +4068,7 @@ fn tool_install_credentials() { .arg("https://public:heron@pypi-proxy.fly.dev/basic-auth/simple") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -4079,7 +4079,7 @@ fn tool_install_credentials() { Installed [N] packages in [TIME] + executable-application==0.3.0 Installed 1 executable: app - "###); + "); tool_dir .child("executable-application") @@ -4098,7 +4098,7 @@ fn tool_install_credentials() { filters => context.filters(), }, { // Should run black in the virtual environment - assert_snapshot!(fs_err::read_to_string(executable).unwrap(), @r###" + assert_snapshot!(fs_err::read_to_string(executable).unwrap(), @r#" #![TEMP_DIR]/tools/executable-application/bin/python # -*- coding: utf-8 -*- import sys @@ -4109,7 +4109,7 @@ fn tool_install_credentials() { elif sys.argv[0].endswith(".exe"): sys.argv[0] = sys.argv[0][:-4] sys.exit(main()) - "###); + "#); }); @@ -4157,7 +4157,7 @@ fn tool_install_default_credentials() -> Result<()> { .arg(uv_toml.as_os_str()) .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -4168,7 +4168,7 @@ fn tool_install_default_credentials() -> Result<()> { Installed [N] packages in [TIME] + executable-application==0.3.0 Installed 1 executable: app - "###); + "); tool_dir .child("executable-application") @@ -4187,7 +4187,7 @@ fn tool_install_default_credentials() -> Result<()> { filters => context.filters(), }, { // Should run black in the virtual environment - assert_snapshot!(fs_err::read_to_string(executable).unwrap(), @r###" + assert_snapshot!(fs_err::read_to_string(executable).unwrap(), @r#" #![TEMP_DIR]/tools/executable-application/bin/python # -*- coding: utf-8 -*- import sys @@ -4198,7 +4198,7 @@ fn tool_install_default_credentials() -> Result<()> { elif sys.argv[0].endswith(".exe"): sys.argv[0] = sys.argv[0][:-4] sys.exit(main()) - "###); + "#); }); insta::with_settings!({ @@ -4223,7 +4223,7 @@ fn tool_install_default_credentials() -> Result<()> { .arg("executable-application") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: false exit_code: 1 ----- stdout ----- @@ -4241,7 +4241,7 @@ fn tool_install_default_credentials() -> Result<()> { .arg(uv_toml.as_os_str()) .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -4268,7 +4268,7 @@ fn tool_install_with_executables_from() { .arg("ansible==9.3.0") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -4300,7 +4300,7 @@ fn tool_install_with_executables_from() { insta::with_settings!({ filters => context.filters(), }, { - assert_snapshot!(fs_err::read_to_string(tool_dir.join("ansible").join("uv-receipt.toml")).unwrap(), @r###" + assert_snapshot!(fs_err::read_to_string(tool_dir.join("ansible").join("uv-receipt.toml")).unwrap(), @r#" [tool] requirements = [ { name = "ansible", specifier = "==9.3.0" }, @@ -4326,21 +4326,21 @@ fn tool_install_with_executables_from() { [tool.options] exclude-newer = "2024-03-25T00:00:00Z" - "###); + "#); }); uv_snapshot!(context.filters(), context.tool_uninstall() .arg("ansible") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Uninstalled 14 executables: ansible, ansible-community, ansible-config, ansible-connection, ansible-console, ansible-doc, ansible-galaxy, ansible-inventory, ansible-playbook, ansible-pull, ansible-test, ansible-vault, black, blackd - "###); + "); } /// Test installing a tool with `--with-executables-from`, but the package has no entrypoints. @@ -4359,7 +4359,7 @@ fn tool_install_with_executables_from_no_entrypoints() { .arg("flask") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -4383,7 +4383,7 @@ fn tool_install_with_executables_from_no_entrypoints() { + urllib3==2.2.1 + werkzeug==3.0.1 Installed 1 executable: flask - "###); + "); } #[test] @@ -4398,7 +4398,7 @@ fn tool_install_find_links() { .arg(context.workspace_root.join("test/links/")) .arg("basic-app") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -4418,7 +4418,7 @@ fn tool_install_find_links() { .arg("basic-app") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -4468,7 +4468,7 @@ fn tool_install_find_links() { .arg(context.workspace_root.join("test/links/")) .arg("basic-app") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -4482,7 +4482,7 @@ fn tool_install_find_links() { .arg("--offline") .arg("basic-app") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: false exit_code: 1 ----- stdout ----- @@ -4511,7 +4511,7 @@ fn tool_install_python_platform() { .arg("macos") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -4536,7 +4536,7 @@ fn tool_install_python_platform() { .arg("linux") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- diff --git a/crates/uv/tests/it/tool_list.rs b/crates/uv/tests/it/tool_list.rs index 3d77f0178..485f3b354 100644 --- a/crates/uv/tests/it/tool_list.rs +++ b/crates/uv/tests/it/tool_list.rs @@ -23,7 +23,7 @@ fn tool_list() { uv_snapshot!(context.filters(), context.tool_list() .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -32,7 +32,7 @@ fn tool_list() { - blackd ----- stderr ----- - "###); + "); } #[test] @@ -52,7 +52,7 @@ fn tool_list_paths() { uv_snapshot!(context.filters(), context.tool_list().arg("--show-paths") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -61,7 +61,7 @@ fn tool_list_paths() { - blackd ([TEMP_DIR]/bin/blackd) ----- stderr ----- - "###); + "); } #[cfg(windows)] @@ -104,14 +104,14 @@ fn tool_list_empty() { uv_snapshot!(context.filters(), context.tool_list() .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- No tools installed - "###); + "); } #[test] @@ -133,14 +133,14 @@ fn tool_list_missing_receipt() { uv_snapshot!(context.filters(), context.tool_list() .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- warning: Ignoring malformed tool `black` (run `uv tool uninstall black` to remove) - "###); + "); } #[test] @@ -180,7 +180,7 @@ fn tool_list_bad_environment() -> Result<()> { .tool_list() .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), - @r" + @" success: true exit_code: 0 ----- stdout ----- @@ -214,7 +214,7 @@ fn tool_list_deprecated() -> Result<()> { insta::with_settings!({ filters => context.filters(), }, { - assert_snapshot!(fs_err::read_to_string(tool_dir.join("black").join("uv-receipt.toml")).unwrap(), @r###" + assert_snapshot!(fs_err::read_to_string(tool_dir.join("black").join("uv-receipt.toml")).unwrap(), @r#" [tool] requirements = [{ name = "black", specifier = "==24.2.0" }] entrypoints = [ @@ -224,7 +224,7 @@ fn tool_list_deprecated() -> Result<()> { [tool.options] exclude-newer = "2024-03-25T00:00:00Z" - "###); + "#); }); // Replace with a legacy receipt. @@ -243,7 +243,7 @@ fn tool_list_deprecated() -> Result<()> { // Ensure that we can still list the tool. uv_snapshot!(context.filters(), context.tool_list() .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -252,7 +252,7 @@ fn tool_list_deprecated() -> Result<()> { - blackd ----- stderr ----- - "###); + "); // Replace with an invalid receipt. fs::write( @@ -270,14 +270,14 @@ fn tool_list_deprecated() -> Result<()> { // Ensure that listing fails. uv_snapshot!(context.filters(), context.tool_list() .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- warning: Ignoring malformed tool `black` (run `uv tool uninstall black` to remove) - "###); + "); Ok(()) } @@ -308,7 +308,7 @@ fn tool_list_show_version_specifiers() { uv_snapshot!(context.filters(), context.tool_list().arg("--show-version-specifiers") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -319,12 +319,12 @@ fn tool_list_show_version_specifiers() { - flask ----- stderr ----- - "###); + "); // with paths uv_snapshot!(context.filters(), context.tool_list().arg("--show-version-specifiers").arg("--show-paths") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -335,7 +335,7 @@ fn tool_list_show_version_specifiers() { - flask ([TEMP_DIR]/bin/flask) ----- stderr ----- - "###); + "); } #[test] @@ -380,7 +380,7 @@ fn tool_list_show_with() { // Test with --show-with uv_snapshot!(context.filters(), context.tool_list().arg("--show-with") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -393,12 +393,12 @@ fn tool_list_show_with() { - ruff ----- stderr ----- - "###); + "); // Test with both --show-with and --show-paths uv_snapshot!(context.filters(), context.tool_list().arg("--show-with").arg("--show-paths") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -411,12 +411,12 @@ fn tool_list_show_with() { - ruff ([TEMP_DIR]/bin/ruff) ----- stderr ----- - "###); + "); // Test with both --show-with and --show-version-specifiers uv_snapshot!(context.filters(), context.tool_list().arg("--show-with").arg("--show-version-specifiers") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -429,7 +429,7 @@ fn tool_list_show_with() { - ruff ----- stderr ----- - "###); + "); // Test with all flags uv_snapshot!(context.filters(), context.tool_list() @@ -437,7 +437,7 @@ fn tool_list_show_with() { .arg("--show-version-specifiers") .arg("--show-paths") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -450,7 +450,7 @@ fn tool_list_show_with() { - ruff ([TEMP_DIR]/bin/ruff) ----- stderr ----- - "###); + "); } #[test] @@ -482,7 +482,7 @@ fn tool_list_show_extras() { // Test with --show-extras only uv_snapshot!(context.filters(), context.tool_list().arg("--show-extras") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -493,12 +493,12 @@ fn tool_list_show_extras() { - flask ----- stderr ----- - "###); + "); // Test with both --show-extras and --show-with uv_snapshot!(context.filters(), context.tool_list().arg("--show-extras").arg("--show-with") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -509,12 +509,12 @@ fn tool_list_show_extras() { - flask ----- stderr ----- - "###); + "); // Test with --show-extras and --show-paths uv_snapshot!(context.filters(), context.tool_list().arg("--show-extras").arg("--show-paths") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -525,12 +525,12 @@ fn tool_list_show_extras() { - flask ([TEMP_DIR]/bin/flask) ----- stderr ----- - "###); + "); // Test with --show-extras and --show-version-specifiers uv_snapshot!(context.filters(), context.tool_list().arg("--show-extras").arg("--show-version-specifiers") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -541,7 +541,7 @@ fn tool_list_show_extras() { - flask ----- stderr ----- - "###); + "); // Test with all flags including --show-extras uv_snapshot!(context.filters(), context.tool_list() @@ -550,7 +550,7 @@ fn tool_list_show_extras() { .arg("--show-version-specifiers") .arg("--show-paths") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -561,7 +561,7 @@ fn tool_list_show_extras() { - flask ([TEMP_DIR]/bin/flask) ----- stderr ----- - "###); + "); } #[test] @@ -582,7 +582,7 @@ fn tool_list_show_python() { // Test with --show-python uv_snapshot!(context.filters(), context.tool_list().arg("--show-python") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -591,7 +591,7 @@ fn tool_list_show_python() { - blackd ----- stderr ----- - "###); + "); } #[test] @@ -628,7 +628,7 @@ fn tool_list_show_all() { .arg("--show-paths") .arg("--show-python") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -639,5 +639,5 @@ fn tool_list_show_all() { - flask ([TEMP_DIR]/bin/flask) ----- stderr ----- - "###); + "); } diff --git a/crates/uv/tests/it/tool_run.rs b/crates/uv/tests/it/tool_run.rs index a92c1a330..ad7bb487b 100644 --- a/crates/uv/tests/it/tool_run.rs +++ b/crates/uv/tests/it/tool_run.rs @@ -23,7 +23,7 @@ fn tool_run_args() { .arg("--help") .arg("pytest") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -37,7 +37,7 @@ fn tool_run_args() { .arg("pytest") .arg("--help") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -50,7 +50,7 @@ fn tool_run_args() { .arg("pytest") .arg("--version") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -58,7 +58,7 @@ fn tool_run_args() { ----- stderr ----- Resolved [N] packages in [TIME] - "###); + "); } #[test] @@ -71,7 +71,7 @@ fn tool_run_at_version() { .arg("pytest@8.0.0") .arg("--version") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -85,14 +85,14 @@ fn tool_run_at_version() { + packaging==24.0 + pluggy==1.4.0 + pytest==8.0.0 - "###); + "); // Empty versions are just treated as package and command names uv_snapshot!(context.filters(), context.tool_run() .arg("pytest@") .arg("--version") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: false exit_code: 2 ----- stdout ----- @@ -102,14 +102,14 @@ fn tool_run_at_version() { Caused by: Expected URL pytest@ ^ - "###); + "); // Invalid versions are just treated as package and command names uv_snapshot!(context.filters(), context.tool_run() .arg("pytest@invalid") .arg("--version") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: false exit_code: 1 ----- stdout ----- @@ -117,7 +117,7 @@ fn tool_run_at_version() { ----- stderr ----- × Failed to resolve tool requirement ╰─▶ Distribution not found at: file://[TEMP_DIR]/invalid - "###); + "); let filters = context .filters() @@ -136,7 +136,7 @@ fn tool_run_at_version() { .arg("pytest@8.0.0") .arg("--version") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: false exit_code: 1 ----- stdout ----- @@ -168,7 +168,7 @@ fn tool_run_from_version() { .arg("pytest") .arg("--version") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -182,7 +182,7 @@ fn tool_run_from_version() { + packaging==24.0 + pluggy==1.4.0 + pytest==8.0.0 - "###); + "); } #[test] @@ -200,7 +200,7 @@ fn tool_run_constraints() { .arg("pytest") .arg("--version") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -214,7 +214,7 @@ fn tool_run_constraints() { + packaging==24.0 + pluggy==1.3.0 + pytest==8.0.2 - "###); + "); } #[test] @@ -232,7 +232,7 @@ fn tool_run_overrides() { .arg("pytest") .arg("--version") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -246,7 +246,7 @@ fn tool_run_overrides() { + packaging==24.0 + pluggy==1.3.0 + pytest==8.1.1 - "###); + "); } #[test] @@ -260,7 +260,7 @@ fn tool_run_suggest_valid_commands() { .arg("black") .arg("orange") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: false exit_code: 1 ----- stdout ----- @@ -284,7 +284,7 @@ fn tool_run_suggest_valid_commands() { uv_snapshot!(context.filters(), context.tool_run() .arg("fastapi-cli") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: false exit_code: 1 ----- stdout ----- @@ -319,7 +319,7 @@ fn tool_run_warn_executable_not_in_from() { .arg("fastapi") .arg("fastapi") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: false exit_code: 2 ----- stdout ----- @@ -386,7 +386,7 @@ fn tool_run_from_install() { .arg("black") .arg("--version") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -394,7 +394,7 @@ fn tool_run_from_install() { Python (CPython) 3.12.[X] ----- stderr ----- - "###); + "); // Verify that `--isolated` uses an isolated environment. uv_snapshot!(context.filters(), context.tool_run() @@ -402,7 +402,7 @@ fn tool_run_from_install() { .arg("black") .arg("--version") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -419,14 +419,14 @@ fn tool_run_from_install() { + packaging==24.0 + pathspec==0.12.1 + platformdirs==4.2.0 - "###); + "); // Verify that `tool run black` at a different version installs the new version. uv_snapshot!(context.filters(), context.tool_run() .arg("black@24.1.1") .arg("--version") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -443,7 +443,7 @@ fn tool_run_from_install() { + packaging==24.0 + pathspec==0.12.1 + platformdirs==4.2.0 - "###); + "); // Verify that `--with` installs a new version. // TODO(charlie): This could (in theory) layer the `--with` requirements on top of the existing @@ -454,7 +454,7 @@ fn tool_run_from_install() { .arg("black") .arg("--version") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -472,7 +472,7 @@ fn tool_run_from_install() { + packaging==24.0 + pathspec==0.12.1 + platformdirs==4.2.0 - "###); + "); // Verify that `tool run black` at a different version (via `--from`) installs the new version. uv_snapshot!(context.filters(), context.tool_run() @@ -481,7 +481,7 @@ fn tool_run_from_install() { .arg("black") .arg("--version") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -498,7 +498,7 @@ fn tool_run_from_install() { + packaging==24.0 + pathspec==0.12.1 + platformdirs==4.2.0 - "###); + "); } #[test] @@ -521,7 +521,7 @@ fn tool_run_from_install_constraints() { .arg("flask") .arg("--version") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -530,7 +530,7 @@ fn tool_run_from_install_constraints() { Werkzeug 3.0.1 ----- stderr ----- - "###); + "); // Verify that `tool run flask` with a compatible constraint uses the already-installed version. context @@ -545,7 +545,7 @@ fn tool_run_from_install_constraints() { .arg("flask") .arg("--version") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -554,7 +554,7 @@ fn tool_run_from_install_constraints() { Werkzeug 3.0.1 ----- stderr ----- - "###); + "); // Verify that `tool run flask` with an incompatible constraint installs a new version. context @@ -569,7 +569,7 @@ fn tool_run_from_install_constraints() { .arg("flask") .arg("--version") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -588,7 +588,7 @@ fn tool_run_from_install_constraints() { + jinja2==3.1.3 + markupsafe==2.1.5 + werkzeug==2.3.8 - "###); + "); // Verify that `tool run flask` with a compatible override uses the already-installed version. context @@ -603,7 +603,7 @@ fn tool_run_from_install_constraints() { .arg("flask") .arg("--version") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -612,7 +612,7 @@ fn tool_run_from_install_constraints() { Werkzeug 3.0.1 ----- stderr ----- - "###); + "); // Verify that `tool run flask` with an incompatible override installs a new version. context @@ -627,7 +627,7 @@ fn tool_run_from_install_constraints() { .arg("flask") .arg("--version") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -646,7 +646,7 @@ fn tool_run_from_install_constraints() { + jinja2==3.1.3 + markupsafe==2.1.5 + werkzeug==3.0.0 - "###); + "); // Verify that an override that enables a new extra also invalidates the environment. context @@ -661,7 +661,7 @@ fn tool_run_from_install_constraints() { .arg("flask") .arg("--version") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -681,7 +681,7 @@ fn tool_run_from_install_constraints() { + markupsafe==2.1.5 + python-dotenv==1.0.1 + werkzeug==3.0.1 - "###); + "); } #[test] @@ -697,7 +697,7 @@ fn tool_run_cache() { .arg("black") .arg("--version") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -714,7 +714,7 @@ fn tool_run_cache() { + packaging==24.0 + pathspec==0.12.1 + platformdirs==4.2.0 - "###); + "); // Verify that `tool run black` uses the cached version. uv_snapshot!(context.filters(), context.tool_run() @@ -723,7 +723,7 @@ fn tool_run_cache() { .arg("black") .arg("--version") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -732,7 +732,7 @@ fn tool_run_cache() { ----- stderr ----- Resolved [N] packages in [TIME] - "###); + "); // Verify that `--refresh` allows cache reuse. uv_snapshot!(context.filters(), context.tool_run() @@ -742,7 +742,7 @@ fn tool_run_cache() { .arg("black") .arg("--version") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -762,7 +762,7 @@ fn tool_run_cache() { .arg("black") .arg("--version") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -780,7 +780,7 @@ fn tool_run_cache() { .arg("black") .arg("--version") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -797,7 +797,7 @@ fn tool_run_cache() { + packaging==24.0 + pathspec==0.12.1 + platformdirs==4.2.0 - "###); + "); // But that re-invoking with the previous interpreter retains the cached version. uv_snapshot!(context.filters(), context.tool_run() @@ -806,7 +806,7 @@ fn tool_run_cache() { .arg("black") .arg("--version") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -815,7 +815,7 @@ fn tool_run_cache() { ----- stderr ----- Resolved [N] packages in [TIME] - "###); + "); // Verify that `--with` leads to a fresh environment. uv_snapshot!(context.filters(), context.tool_run() @@ -826,7 +826,7 @@ fn tool_run_cache() { .arg("black") .arg("--version") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -844,7 +844,7 @@ fn tool_run_cache() { + packaging==24.0 + pathspec==0.12.1 + platformdirs==4.2.0 - "###); + "); } #[test] @@ -859,7 +859,7 @@ fn tool_run_url() { .arg("flask") .arg("--version") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -878,7 +878,7 @@ fn tool_run_url() { + jinja2==3.1.3 + markupsafe==2.1.5 + werkzeug==3.0.1 - "###); + "); uv_snapshot!(context.filters(), context.tool_run() .arg("--from") @@ -886,7 +886,7 @@ fn tool_run_url() { .arg("flask") .arg("--version") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -896,13 +896,13 @@ fn tool_run_url() { ----- stderr ----- Resolved [N] packages in [TIME] - "###); + "); uv_snapshot!(context.filters(), context.tool_run() .arg("flask @ https://files.pythonhosted.org/packages/61/80/ffe1da13ad9300f87c93af113edd0638c75138c42a0994becfacac078c06/flask-3.0.3-py3-none-any.whl") .arg("--version") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -912,13 +912,13 @@ fn tool_run_url() { ----- stderr ----- Resolved [N] packages in [TIME] - "###); + "); uv_snapshot!(context.filters(), context.tool_run() .arg("https://files.pythonhosted.org/packages/61/80/ffe1da13ad9300f87c93af113edd0638c75138c42a0994becfacac078c06/flask-3.0.3-py3-none-any.whl") .arg("--version") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -928,7 +928,7 @@ fn tool_run_url() { ----- stderr ----- Resolved [N] packages in [TIME] - "###); + "); } /// Test running a tool with a Git requirement. @@ -943,7 +943,7 @@ fn tool_run_git() { .arg("git+https://github.com/psf/black@24.2.0") .arg("--version") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -960,13 +960,13 @@ fn tool_run_git() { + packaging==24.0 + pathspec==0.12.1 + platformdirs==4.2.0 - "###); + "); uv_snapshot!(context.filters(), context.tool_run() .arg("black @ git+https://github.com/psf/black@24.2.0") .arg("--version") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -975,7 +975,7 @@ fn tool_run_git() { ----- stderr ----- Resolved [N] packages in [TIME] - "###); + "); // Clear the cache. fs_err::remove_dir_all(&context.cache_dir).expect("Failed to remove cache dir."); @@ -986,7 +986,7 @@ fn tool_run_git() { .arg("black") .arg("--version") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -1011,7 +1011,7 @@ fn tool_run_git() { .arg("black") .arg("--version") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -1020,7 +1020,7 @@ fn tool_run_git() { ----- stderr ----- Resolved [N] packages in [TIME] - "###); + "); } /// Test running a tool with a Git LFS enabled requirement. @@ -1038,7 +1038,7 @@ fn tool_run_git_lfs() { .arg("--lfs") .arg("git+https://github.com/astral-sh/test-lfs-repo@c6d77ab63d91104f32ab5e5ae2943f4d26ff875f") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -1049,13 +1049,13 @@ fn tool_run_git_lfs() { Prepared [N] packages in [TIME] Installed [N] packages in [TIME] + test-lfs-repo==0.1.0 (from git+https://github.com/astral-sh/test-lfs-repo@c6d77ab63d91104f32ab5e5ae2943f4d26ff875f#lfs=true) - "###); + "); uv_snapshot!(context.filters(), context.tool_run() .arg("--lfs") .arg("test-lfs-repo @ git+https://github.com/astral-sh/test-lfs-repo@c6d77ab63d91104f32ab5e5ae2943f4d26ff875f") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -1063,7 +1063,7 @@ fn tool_run_git_lfs() { ----- stderr ----- Resolved [N] packages in [TIME] - "###); + "); // Clear the cache. fs_err::remove_dir_all(&context.cache_dir).expect("Failed to remove cache dir."); @@ -1074,7 +1074,7 @@ fn tool_run_git_lfs() { .arg("--lfs") .arg("test-lfs-repo-assets") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -1093,7 +1093,7 @@ fn tool_run_git_lfs() { .arg("--lfs") .arg("test-lfs-repo-assets") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -1125,7 +1125,7 @@ fn tool_run_git_lfs() { .arg("test-lfs-repo @ git+https://github.com/astral-sh/test-lfs-repo@c6d77ab63d91104f32ab5e5ae2943f4d26ff875f") .env(EnvVars::UV_INTERNAL__TEST_LFS_DISABLED, "1") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: false exit_code: [ERROR_CODE] ----- stdout ----- @@ -1212,7 +1212,7 @@ fn tool_run_requirements_txt() { .arg("flask") .arg("--version") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -1233,7 +1233,7 @@ fn tool_run_requirements_txt() { + markupsafe==2.1.5 + typing-extensions==4.10.0 + werkzeug==3.0.1 - "###); + "); } /// Ignore and warn when (e.g.) the `--index-url` argument is a provided `requirements.txt`. @@ -1258,7 +1258,7 @@ fn tool_run_requirements_txt_arguments() { .arg("flask") .arg("--version") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -1279,7 +1279,7 @@ fn tool_run_requirements_txt_arguments() { + jinja2==3.1.3 + markupsafe==2.1.5 + werkzeug==3.0.1 - "###); + "); } /// List installed tools when no command arg is given (e.g. `uv tool run`). @@ -1292,7 +1292,7 @@ fn tool_run_list_installed() { // No tools installed. uv_snapshot!(context.filters(), context.tool_run() .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: false exit_code: 2 ----- stdout ----- @@ -1301,7 +1301,7 @@ fn tool_run_list_installed() { See `uv tool run --help` for more information. ----- stderr ----- - "###); + "); // Install `black`. context @@ -1315,7 +1315,7 @@ fn tool_run_list_installed() { // List installed tools. uv_snapshot!(context.filters(), context.tool_run() .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: false exit_code: 2 ----- stdout ----- @@ -1328,7 +1328,7 @@ fn tool_run_list_installed() { See `uv tool run --help` for more information. ----- stderr ----- - "###); + "); } /// By default, omit resolver and installer output. @@ -1345,7 +1345,7 @@ fn tool_run_without_output() { .arg("pytest") .arg("--version") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -1353,7 +1353,7 @@ fn tool_run_without_output() { ----- stderr ----- Installed [N] packages in [TIME] - "###); + "); // Subsequent runs are quiet. uv_snapshot!(context.filters(), context.tool_run() @@ -1362,14 +1362,14 @@ fn tool_run_without_output() { .arg("pytest") .arg("--version") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- pytest 8.1.1 ----- stderr ----- - "###); + "); } #[test] @@ -1414,7 +1414,7 @@ fn tool_run_csv_with_shorthand() -> anyhow::Result<()> { .arg("pytest") .arg("--version") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -1429,7 +1429,7 @@ fn tool_run_csv_with_shorthand() -> anyhow::Result<()> { + pluggy==1.4.0 + pytest==8.1.1 + typing-extensions==4.10.0 - "###); + "); Ok(()) } @@ -1476,7 +1476,7 @@ fn tool_run_csv_with() -> anyhow::Result<()> { .arg("pytest") .arg("--version") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -1491,7 +1491,7 @@ fn tool_run_csv_with() -> anyhow::Result<()> { + pluggy==1.4.0 + pytest==8.1.1 + typing-extensions==4.10.0 - "###); + "); Ok(()) } @@ -1602,7 +1602,7 @@ fn tool_run_repeated_with() -> anyhow::Result<()> { .arg("pytest") .arg("--version") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -1617,7 +1617,7 @@ fn tool_run_repeated_with() -> anyhow::Result<()> { + pluggy==1.4.0 + pytest==8.1.1 + typing-extensions==4.10.0 - "###); + "); Ok(()) } @@ -1728,7 +1728,7 @@ fn tool_run_with_editable() -> anyhow::Result<()> { .arg("flask") .arg("--version") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -1749,11 +1749,11 @@ fn tool_run_with_editable() -> anyhow::Result<()> { + jinja2==3.1.3 + markupsafe==2.1.5 + werkzeug==3.0.1 - "###); + "); // Requesting an editable requirement should install it in a layer, even if it satisfied uv_snapshot!(context.filters(), context.tool_run().arg("--with-editable").arg("./src/anyio_local").arg("flask").arg("--version").env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()).env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), - @r###" + @" success: true exit_code: 0 ----- stdout ----- @@ -1773,10 +1773,10 @@ fn tool_run_with_editable() -> anyhow::Result<()> { + jinja2==3.1.3 + markupsafe==2.1.5 + werkzeug==3.0.1 - "###); + "); // Requesting the project itself should use a new environment. - uv_snapshot!(context.filters(), context.tool_run().arg("--with-editable").arg(".").arg("flask").arg("--version").env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()).env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + uv_snapshot!(context.filters(), context.tool_run().arg("--with-editable").arg(".").arg("flask").arg("--version").env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()).env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -1799,7 +1799,7 @@ fn tool_run_with_editable() -> anyhow::Result<()> { + markupsafe==2.1.5 + sniffio==1.3.1 + werkzeug==3.0.1 - "###); + "); // If invalid, we should reference `--with`. uv_snapshot!(context.filters(), context @@ -1809,7 +1809,7 @@ fn tool_run_with_editable() -> anyhow::Result<()> { .arg("flask") .arg("--version") .env(EnvVars::UV_TOOL_DIR, tool_dir - .as_os_str()).env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .as_os_str()).env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: false exit_code: 1 ----- stdout ----- @@ -1817,7 +1817,7 @@ fn tool_run_with_editable() -> anyhow::Result<()> { ----- stderr ----- × Failed to resolve `--with` requirement ╰─▶ Distribution not found at: file://[TEMP_DIR]/foo - "###); + "); Ok(()) } @@ -1831,7 +1831,7 @@ fn warn_no_executables_found() { uv_snapshot!(context.filters(), context.tool_run() .arg("requests") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: false exit_code: 1 ----- stdout ----- @@ -1861,7 +1861,7 @@ fn tool_run_upgrade_warn() { .arg("pytest") .arg("--version") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -1876,7 +1876,7 @@ fn tool_run_upgrade_warn() { + packaging==24.0 + pluggy==1.4.0 + pytest==8.1.1 - "###); + "); uv_snapshot!(context.filters(), context.tool_run() .arg("--upgrade") @@ -1885,7 +1885,7 @@ fn tool_run_upgrade_warn() { .arg("pytest") .arg("--version") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -1901,7 +1901,7 @@ fn tool_run_upgrade_warn() { + pluggy==1.4.0 + pytest==8.1.1 + typing-extensions==4.10.0 - "###); + "); } /// If we fail to resolve the tool, we should include "tool" in the error message. @@ -1914,7 +1914,7 @@ fn tool_run_resolution_error() { uv_snapshot!(context.filters(), context.tool_run() .arg("add") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: false exit_code: 1 ----- stdout ----- @@ -1922,7 +1922,7 @@ fn tool_run_resolution_error() { ----- stderr ----- × No solution found when resolving tool dependencies: ╰─▶ Because there are no versions of add and you require add, we can conclude that your requirements are unsatisfiable. - "###); + "); } #[test] @@ -1945,21 +1945,21 @@ fn tool_run_latest() { .arg("pytest") .arg("--version") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- pytest 7.0.0 ----- stderr ----- - "###); + "); // Run `pytest@latest`, which should use the latest version. uv_snapshot!(context.filters(), context.tool_run() .arg("pytest@latest") .arg("--version") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -1973,21 +1973,21 @@ fn tool_run_latest() { + packaging==24.0 + pluggy==1.4.0 + pytest==8.1.1 - "###); + "); // Run `pytest`, which should use the installed version. uv_snapshot!(context.filters(), context.tool_run() .arg("pytest") .arg("--version") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- pytest 7.0.0 ----- stderr ----- - "###); + "); } #[test] @@ -2000,7 +2000,7 @@ fn tool_run_latest_extra() { .arg("flask[dotenv]@latest") .arg("--version") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -2020,13 +2020,13 @@ fn tool_run_latest_extra() { + markupsafe==2.1.5 + python-dotenv==1.0.1 + werkzeug==3.0.1 - "###); + "); uv_snapshot!(context.filters(), context.tool_run() .arg("flask[dotenv]@3.0.0") .arg("--version") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -2046,7 +2046,7 @@ fn tool_run_latest_extra() { + markupsafe==2.1.5 + python-dotenv==1.0.1 + werkzeug==3.0.1 - "###); + "); } #[test] @@ -2059,7 +2059,7 @@ fn tool_run_extra() { .arg("flask[dotenv]") .arg("--version") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -2079,7 +2079,7 @@ fn tool_run_extra() { + markupsafe==2.1.5 + python-dotenv==1.0.1 + werkzeug==3.0.1 - "###); + "); } #[test] @@ -2092,7 +2092,7 @@ fn tool_run_specifier() { .arg("flask<3.0.0") .arg("--version") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -2111,7 +2111,7 @@ fn tool_run_specifier() { + jinja2==3.1.3 + markupsafe==2.1.5 + werkzeug==3.0.1 - "###); + "); } #[test] @@ -2119,7 +2119,7 @@ fn tool_run_python() { let context = TestContext::new("3.12").with_filtered_counts(); uv_snapshot!(context.filters(), context.tool_run() .arg("python") - .arg("--version"), @r###" + .arg("--version"), @" success: true exit_code: 0 ----- stdout ----- @@ -2128,12 +2128,12 @@ fn tool_run_python() { ----- stderr ----- Resolved in [TIME] Audited in [TIME] - "###); + "); uv_snapshot!(context.filters(), context.tool_run() .arg("python") .arg("-c") - .arg("print('Hello, world!')"), @r###" + .arg("print('Hello, world!')"), @" success: true exit_code: 0 ----- stdout ----- @@ -2141,7 +2141,7 @@ fn tool_run_python() { ----- stderr ----- Resolved in [TIME] - "###); + "); } #[test] @@ -2152,7 +2152,7 @@ fn tool_run_python_at_version() { uv_snapshot!(context.filters(), context.tool_run() .arg("python") - .arg("--version"), @r###" + .arg("--version"), @" success: true exit_code: 0 ----- stdout ----- @@ -2161,11 +2161,11 @@ fn tool_run_python_at_version() { ----- stderr ----- Resolved in [TIME] Audited in [TIME] - "###); + "); uv_snapshot!(context.filters(), context.tool_run() .arg("python@3.12") - .arg("--version"), @r###" + .arg("--version"), @" success: true exit_code: 0 ----- stdout ----- @@ -2173,11 +2173,11 @@ fn tool_run_python_at_version() { ----- stderr ----- Resolved in [TIME] - "###); + "); uv_snapshot!(context.filters(), context.tool_run() .arg("python@3.11") - .arg("--version"), @r###" + .arg("--version"), @" success: true exit_code: 0 ----- stdout ----- @@ -2186,12 +2186,12 @@ fn tool_run_python_at_version() { ----- stderr ----- Resolved in [TIME] Audited in [TIME] - "###); + "); // The @ is optional. uv_snapshot!(context.filters(), context.tool_run() .arg("python3.11") - .arg("--version"), @r###" + .arg("--version"), @" success: true exit_code: 0 ----- stdout ----- @@ -2199,12 +2199,12 @@ fn tool_run_python_at_version() { ----- stderr ----- Resolved in [TIME] - "###); + "); // Dotless syntax also works. uv_snapshot!(context.filters(), context.tool_run() .arg("python311") - .arg("--version"), @r###" + .arg("--version"), @" success: true exit_code: 0 ----- stdout ----- @@ -2212,13 +2212,13 @@ fn tool_run_python_at_version() { ----- stderr ----- Resolved in [TIME] - "###); + "); // Other implementations like PyPy also work. PyPy isn't currently in the test suite, so // specify CPython and rely on the fact that they go through the same codepath. uv_snapshot!(context.filters(), context.tool_run() .arg("cpython311") - .arg("--version"), @r###" + .arg("--version"), @" success: true exit_code: 0 ----- stdout ----- @@ -2226,13 +2226,13 @@ fn tool_run_python_at_version() { ----- stderr ----- Resolved in [TIME] - "###); + "); // But short names don't work in the executable position (as opposed to with -p/--python). We // interpret those as package names. uv_snapshot!(context.filters(), context.tool_run() .arg("cp311") - .arg("--version"), @r" + .arg("--version"), @" success: false exit_code: 1 ----- stdout ----- @@ -2245,7 +2245,7 @@ fn tool_run_python_at_version() { // Bare versions don't work either. Again we interpret them as package names. uv_snapshot!(context.filters(), context.tool_run() .arg("311") - .arg("--version"), @r" + .arg("--version"), @" success: false exit_code: 1 ----- stdout ----- @@ -2260,7 +2260,7 @@ fn tool_run_python_at_version() { .arg("-p") .arg("3.11") .arg("python") - .arg("--version"), @r###" + .arg("--version"), @" success: true exit_code: 0 ----- stdout ----- @@ -2268,14 +2268,14 @@ fn tool_run_python_at_version() { ----- stderr ----- Resolved in [TIME] - "###); + "); // @ syntax is also allowed here. uv_snapshot!(context.filters(), context.tool_run() .arg("-p") .arg("python@311") .arg("python") - .arg("--version"), @r###" + .arg("--version"), @" success: true exit_code: 0 ----- stdout ----- @@ -2283,14 +2283,14 @@ fn tool_run_python_at_version() { ----- stderr ----- Resolved in [TIME] - "###); + "); // But @ with nothing in front of it is not. uv_snapshot!(context.filters(), context.tool_run() .arg("-p") .arg("@311") .arg("python") - .arg("--version"), @r" + .arg("--version"), @" success: false exit_code: 2 ----- stdout ----- @@ -2304,48 +2304,48 @@ fn tool_run_python_at_version() { .arg("-p") .arg("3.12") .arg("python@3.11") - .arg("--version"), @r###" + .arg("--version"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: Received multiple Python version requests: `3.12` and `3.11` - "###); + "); // Request a version that does not exist uv_snapshot!(context.filters(), context.tool_run() - .arg("python@3.12.99"), @r###" + .arg("python@3.12.99"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: No interpreter found for Python 3.12.[X] in [PYTHON SOURCES] - "###); + "); // Request an invalid version uv_snapshot!(context.filters(), context.tool_run() - .arg("python@3.300"), @r###" + .arg("python@3.300"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: Invalid version request: 3.300 - "###); + "); // Request `@latest` (not yet supported) uv_snapshot!(context.filters(), context.tool_run() .arg("python@latest") - .arg("--version"), @r###" + .arg("--version"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: Requesting the 'latest' Python version is not yet supported - "###); + "); } #[test] @@ -2356,7 +2356,7 @@ fn tool_run_hint_version_not_available() { uv_snapshot!(context.filters(), context.tool_run() .arg("python@3.12") - .env(EnvVars::UV_PYTHON_DOWNLOADS, "never"), @r" + .env(EnvVars::UV_PYTHON_DOWNLOADS, "never"), @" success: false exit_code: 2 ----- stdout ----- @@ -2370,7 +2370,7 @@ fn tool_run_hint_version_not_available() { uv_snapshot!(context.filters(), context.tool_run() .arg("python@3.12") .env(EnvVars::UV_PYTHON_DOWNLOADS, "auto") - .env(EnvVars::UV_OFFLINE, "true"), @r" + .env(EnvVars::UV_OFFLINE, "true"), @" success: false exit_code: 2 ----- stdout ----- @@ -2384,7 +2384,7 @@ fn tool_run_hint_version_not_available() { uv_snapshot!(context.filters(), context.tool_run() .arg("python@3.12") .env(EnvVars::UV_PYTHON_DOWNLOADS, "auto") - .env(EnvVars::UV_NO_MANAGED_PYTHON, "true"), @r" + .env(EnvVars::UV_NO_MANAGED_PYTHON, "true"), @" success: false exit_code: 2 ----- stdout ----- @@ -2406,7 +2406,7 @@ fn tool_run_python_from() { .arg("--from") .arg("python") .arg("python") - .arg("--version"), @r###" + .arg("--version"), @" success: true exit_code: 0 ----- stdout ----- @@ -2415,13 +2415,13 @@ fn tool_run_python_from() { ----- stderr ----- Resolved in [TIME] Audited in [TIME] - "###); + "); uv_snapshot!(context.filters(), context.tool_run() .arg("--from") .arg("python@3.11") .arg("python") - .arg("--version"), @r###" + .arg("--version"), @" success: true exit_code: 0 ----- stdout ----- @@ -2430,13 +2430,13 @@ fn tool_run_python_from() { ----- stderr ----- Resolved in [TIME] Audited in [TIME] - "###); + "); uv_snapshot!(context.filters(), context.tool_run() .arg("--from") .arg("python311") .arg("python") - .arg("--version"), @r" + .arg("--version"), @" success: true exit_code: 0 ----- stdout ----- @@ -2450,7 +2450,7 @@ fn tool_run_python_from() { .arg("--from") .arg("python>3.11,<3.13") .arg("python") - .arg("--version"), @r" + .arg("--version"), @" success: true exit_code: 0 ----- stdout ----- @@ -2466,7 +2466,7 @@ fn tool_run_python_from() { .arg("python@3.11") .arg("bash") .arg("-c") - .arg("python --version"), @r" + .arg("python --version"), @" success: true exit_code: 0 ----- stdout ----- @@ -2525,7 +2525,7 @@ fn run_with_env_file() -> anyhow::Result<()> { .arg("./foo") .arg("script") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -2555,7 +2555,7 @@ fn run_with_env_file() -> anyhow::Result<()> { .arg("./foo") .arg("script") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -2585,7 +2585,7 @@ fn tool_run_from_at() { .arg("app") .arg("--version") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -2596,7 +2596,7 @@ fn tool_run_from_at() { Prepared 1 package in [TIME] Installed 1 package in [TIME] + executable-application==0.3.0 - "###); + "); uv_snapshot!(context.filters(), context.tool_run() .arg("--from") @@ -2604,7 +2604,7 @@ fn tool_run_from_at() { .arg("app") .arg("--version") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -2615,7 +2615,7 @@ fn tool_run_from_at() { Prepared 1 package in [TIME] Installed 1 package in [TIME] + executable-application==0.2.0 - "###); + "); } #[test] @@ -2631,7 +2631,7 @@ fn tool_run_verbatim_name() { .arg("change_wheel_version") .arg("--help") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -2663,7 +2663,7 @@ fn tool_run_verbatim_name() { .arg("change-wheel-version") .arg("--help") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: false exit_code: 1 ----- stdout ----- @@ -2683,7 +2683,7 @@ fn tool_run_verbatim_name() { .arg("change_wheel_version") .arg("--help") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -2711,7 +2711,7 @@ fn tool_run_with_existing_py_script() -> anyhow::Result<()> { let context = TestContext::new("3.12").with_filtered_counts(); context.temp_dir.child("script.py").touch()?; - uv_snapshot!(context.filters(), context.tool_run().arg("script.py"), @r" + uv_snapshot!(context.filters(), context.tool_run().arg("script.py"), @" success: false exit_code: 2 ----- stdout ----- @@ -2731,7 +2731,7 @@ fn tool_run_with_existing_pyw_script() -> anyhow::Result<()> { // We treat arguments before the command as uv arguments uv_snapshot!(context.filters(), context.tool_run() - .arg("script.pyw"), @r" + .arg("script.pyw"), @" success: false exit_code: 2 ----- stdout ----- @@ -2750,7 +2750,7 @@ fn tool_run_with_nonexistent_py_script() { // We treat arguments before the command as uv arguments uv_snapshot!(context.filters(), context.tool_run() - .arg("script.py"), @r" + .arg("script.py"), @" success: false exit_code: 2 ----- stdout ----- @@ -2768,7 +2768,7 @@ fn tool_run_with_nonexistent_pyw_script() { // We treat arguments before the command as uv arguments uv_snapshot!(context.filters(), context.tool_run() - .arg("script.pyw"), @r" + .arg("script.pyw"), @" success: false exit_code: 2 ----- stdout ----- @@ -2788,7 +2788,7 @@ fn tool_run_with_from_script() { uv_snapshot!(context.filters(), context.tool_run() .arg("--from") .arg("script.py") - .arg("ruff"), @r" + .arg("ruff"), @" success: false exit_code: 2 ----- stdout ----- @@ -2808,7 +2808,7 @@ fn tool_run_with_script_and_from_script() { uv_snapshot!(context.filters(), context.tool_run() .arg("--from") .arg("script.py") - .arg("other-script.py"), @r" + .arg("other-script.py"), @" success: false exit_code: 2 ----- stdout ----- @@ -2833,7 +2833,7 @@ fn tool_run_verbose_hint() { .arg("nonexistent-package-foo") .arg("--verbose") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: false exit_code: 1 ----- stdout ----- @@ -2842,14 +2842,14 @@ fn tool_run_verbose_hint() { × No solution found when resolving dependencies: ╰─▶ Because nonexistent-package-foo was not found in the package registry and you require nonexistent-package-foo, we can conclude that your requirements are unsatisfiable. help: You provided `--verbose` to `nonexistent-package-foo`. Did you mean to provide it to `uv tool run`? e.g., `uv tool run --verbose nonexistent-package-foo` - "###); + "); // Test with -v flag uv_snapshot!(context.filters(), context.tool_run() .arg("nonexistent-package-bar") .arg("-v") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: false exit_code: 1 ----- stdout ----- @@ -2858,14 +2858,14 @@ fn tool_run_verbose_hint() { × No solution found when resolving dependencies: ╰─▶ Because nonexistent-package-bar was not found in the package registry and you require nonexistent-package-bar, we can conclude that your requirements are unsatisfiable. help: You provided `-v` to `nonexistent-package-bar`. Did you mean to provide it to `uv tool run`? e.g., `uv tool run -v nonexistent-package-bar` - "###); + "); // Test with -vv flag uv_snapshot!(context.filters(), context.tool_run() .arg("nonexistent-package-baz") .arg("-vv") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: false exit_code: 1 ----- stdout ----- @@ -2874,14 +2874,14 @@ fn tool_run_verbose_hint() { × No solution found when resolving dependencies: ╰─▶ Because nonexistent-package-baz was not found in the package registry and you require nonexistent-package-baz, we can conclude that your requirements are unsatisfiable. help: You provided `-vv` to `nonexistent-package-baz`. Did you mean to provide it to `uv tool run`? e.g., `uv tool run -vv nonexistent-package-baz` - "###); + "); // Test for false positives uv_snapshot!(context.filters(), context.tool_run() .arg("nonexistent-package-quux") .arg("-version") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: false exit_code: 1 ----- stdout ----- @@ -2907,7 +2907,7 @@ fn tool_run_with_compatible_build_constraints() -> Result<()> { .arg("--build-constraints") .arg("build_constraints.txt") .arg("pytest") - .arg("--version"), @r" + .arg("--version"), @" success: true exit_code: 0 ----- stdout ----- @@ -2950,7 +2950,7 @@ fn tool_run_with_incompatible_build_constraints() -> Result<()> { .arg("--version") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: false exit_code: 1 ----- stdout ----- @@ -2994,7 +2994,7 @@ fn tool_run_with_dependencies_from_script() -> Result<()> { .arg("script.py") .arg("black") .arg("script.py") - .arg("-q"), @r" + .arg("-q"), @" success: true exit_code: 0 ----- stdout ----- @@ -3019,7 +3019,7 @@ fn tool_run_with_dependencies_from_script() -> Result<()> { .arg("script-no-ext") .arg("black") .arg("script-no-ext") - .arg("-q"), @r" + .arg("-q"), @" success: true exit_code: 0 ----- stdout ----- @@ -3035,7 +3035,7 @@ fn tool_run_with_dependencies_from_script() -> Result<()> { uv_snapshot!(context.filters(), context.tool_run() .arg("--with-requirements") .arg("not_pep723_script.py") - .arg("black"), @r" + .arg("black"), @" success: false exit_code: 2 ----- stdout ----- @@ -3048,7 +3048,7 @@ fn tool_run_with_dependencies_from_script() -> Result<()> { uv_snapshot!(context.filters(), context.tool_run() .arg("--with-requirements") .arg("missing_file.py") - .arg("black"), @r" + .arg("black"), @" success: false exit_code: 2 ----- stdout ----- @@ -3415,7 +3415,7 @@ fn tool_run_reresolve_python() -> anyhow::Result<()> { .arg("./foo") .arg("foo") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -3436,7 +3436,7 @@ fn tool_run_reresolve_python() -> anyhow::Result<()> { .arg("3.11") .arg("foo") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: false exit_code: 1 ----- stdout ----- @@ -3455,7 +3455,7 @@ fn tool_run_reresolve_python() -> anyhow::Result<()> { .arg(">=3.11") .arg("foo") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -3545,7 +3545,7 @@ fn tool_run_latest_keyring_auth() { .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) .env(EnvVars::KEYRING_TEST_CREDENTIALS, r#"{"pypi-proxy.fly.dev": {"public": "heron"}}"#) - .env(EnvVars::PATH, path), @r###" + .env(EnvVars::PATH, path), @" success: true exit_code: 0 ----- stdout ----- @@ -3558,5 +3558,5 @@ fn tool_run_latest_keyring_auth() { Installed [N] packages in [TIME] + executable-application==0.3.0 Installed 1 executable: app - "###); + "); } diff --git a/crates/uv/tests/it/tool_uninstall.rs b/crates/uv/tests/it/tool_uninstall.rs index ae194217d..e0d3227c3 100644 --- a/crates/uv/tests/it/tool_uninstall.rs +++ b/crates/uv/tests/it/tool_uninstall.rs @@ -22,33 +22,33 @@ fn tool_uninstall() { uv_snapshot!(context.filters(), context.tool_uninstall().arg("black") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Uninstalled 2 executables: black, blackd - "###); + "); // After uninstalling the tool, it shouldn't be listed. uv_snapshot!(context.filters(), context.tool_list() .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- No tools installed - "###); + "); // After uninstalling the tool, we should be able to reinstall it. uv_snapshot!(context.filters(), context.tool_install() .arg("black==24.2.0") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -63,7 +63,7 @@ fn tool_uninstall() { + pathspec==0.12.1 + platformdirs==4.2.0 Installed 2 executables: black, blackd - "###); + "); } #[test] @@ -91,26 +91,26 @@ fn tool_uninstall_multiple_names() { uv_snapshot!(context.filters(), context.tool_uninstall().arg("black").arg("ruff") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Uninstalled 3 executables: black, blackd, ruff - "###); + "); // After uninstalling the tool, it shouldn't be listed. uv_snapshot!(context.filters(), context.tool_list() .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- No tools installed - "###); + "); } #[test] @@ -121,14 +121,14 @@ fn tool_uninstall_not_installed() { uv_snapshot!(context.filters(), context.tool_uninstall().arg("black") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: `black` is not installed - "###); + "); } #[test] @@ -150,14 +150,14 @@ fn tool_uninstall_missing_receipt() { uv_snapshot!(context.filters(), context.tool_uninstall().arg("black") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Removed dangling environment for `black` - "###); + "); } #[test] @@ -179,12 +179,12 @@ fn tool_uninstall_all_missing_receipt() { uv_snapshot!(context.filters(), context.tool_uninstall().arg("--all") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) - .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @r###" + .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Removed dangling environment for `black` - "###); + "); } diff --git a/crates/uv/tests/it/tool_upgrade.rs b/crates/uv/tests/it/tool_upgrade.rs index d3a5d6da1..1bb9c0149 100644 --- a/crates/uv/tests/it/tool_upgrade.rs +++ b/crates/uv/tests/it/tool_upgrade.rs @@ -17,14 +17,14 @@ fn tool_upgrade_empty() { .arg("--all") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Nothing to upgrade - "###); + "); uv_snapshot!(context.filters(), context.tool_upgrade() .arg("--all") @@ -32,14 +32,14 @@ fn tool_upgrade_empty() { .arg("3.13") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Nothing to upgrade - "###); + "); // Install the latest `babel`. uv_snapshot!(context.filters(), context.tool_install() @@ -48,7 +48,7 @@ fn tool_upgrade_empty() { .arg("https://pypi.org/simple/") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -59,20 +59,20 @@ fn tool_upgrade_empty() { Installed [N] packages in [TIME] + babel==2.14.0 Installed 1 executable: pybabel - "###); + "); uv_snapshot!(context.filters(), context.tool_upgrade() .arg("--all") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Nothing to upgrade - "###); + "); uv_snapshot!(context.filters(), context.tool_upgrade() .arg("--all") @@ -80,14 +80,14 @@ fn tool_upgrade_empty() { .arg("3.12") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Nothing to upgrade - "###); + "); } #[test] @@ -105,7 +105,7 @@ fn tool_upgrade_name() { .arg("https://test.pypi.org/simple/") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -117,7 +117,7 @@ fn tool_upgrade_name() { + babel==2.6.0 + pytz==2018.5 Installed 1 executable: pybabel - "###); + "); // Upgrade `babel` by installing from PyPI, which should upgrade to the latest version. uv_snapshot!(context.filters(), context.tool_upgrade() @@ -126,7 +126,7 @@ fn tool_upgrade_name() { .arg("https://pypi.org/simple/") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -137,7 +137,7 @@ fn tool_upgrade_name() { + babel==2.14.0 - pytz==2018.5 Installed 1 executable: pybabel - "###); + "); } #[test] @@ -155,7 +155,7 @@ fn tool_upgrade_multiple_names() { .arg("https://test.pypi.org/simple/") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -166,7 +166,7 @@ fn tool_upgrade_multiple_names() { Installed [N] packages in [TIME] + python-dotenv==0.10.2.post2 Installed 1 executable: dotenv - "###); + "); // Install `babel` from Test PyPI, to get an outdated version. uv_snapshot!(context.filters(), context.tool_install() @@ -175,7 +175,7 @@ fn tool_upgrade_multiple_names() { .arg("https://test.pypi.org/simple/") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -187,7 +187,7 @@ fn tool_upgrade_multiple_names() { + babel==2.6.0 + pytz==2018.5 Installed 1 executable: pybabel - "###); + "); // Upgrade `babel` and `python-dotenv` from PyPI. uv_snapshot!(context.filters(), context.tool_upgrade() @@ -197,7 +197,7 @@ fn tool_upgrade_multiple_names() { .arg("https://pypi.org/simple/") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -212,7 +212,7 @@ fn tool_upgrade_multiple_names() { - python-dotenv==0.10.2.post2 + python-dotenv==1.0.1 Installed 1 executable: dotenv - "###); + "); } #[test] @@ -231,7 +231,7 @@ fn tool_upgrade_pinned_hint() { .arg("https://test.pypi.org/simple/") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -243,7 +243,7 @@ fn tool_upgrade_pinned_hint() { + babel==2.6.0 + pytz==2018.5 Installed 1 executable: pybabel - "###); + "); // Attempt to upgrade `babel`; it should remain pinned and emit a hint explaining why. uv_snapshot!(context.filters(), context.tool_upgrade() @@ -252,7 +252,7 @@ fn tool_upgrade_pinned_hint() { .arg("https://pypi.org/simple/") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -263,7 +263,7 @@ fn tool_upgrade_pinned_hint() { + pytz==2024.1 hint: `babel` is pinned to `2.6.0` (installed with an exact version pin); reinstall with `uv tool install babel@latest` to upgrade to a new version. - "###); + "); } #[test] @@ -283,7 +283,7 @@ fn tool_upgrade_pinned_hint_with_mixed_constraint() { .arg("https://test.pypi.org/simple/") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -295,7 +295,7 @@ fn tool_upgrade_pinned_hint_with_mixed_constraint() { + babel==2.6.0 + pytz==2018.5 Installed 1 executable: pybabel - "###); + "); // Attempt to upgrade `babel`; it should remain pinned and emit a hint explaining why. uv_snapshot!(context.filters(), context.tool_upgrade() @@ -304,7 +304,7 @@ fn tool_upgrade_pinned_hint_with_mixed_constraint() { .arg("https://pypi.org/simple/") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -315,7 +315,7 @@ fn tool_upgrade_pinned_hint_with_mixed_constraint() { + pytz==2024.1 hint: `babel` is pinned to `2.6.0` (installed with an exact version pin); reinstall with `uv tool install babel@latest` to upgrade to a new version. - "###); + "); } #[test] @@ -333,7 +333,7 @@ fn tool_upgrade_all() { .arg("https://test.pypi.org/simple/") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -344,7 +344,7 @@ fn tool_upgrade_all() { Installed [N] packages in [TIME] + python-dotenv==0.10.2.post2 Installed 1 executable: dotenv - "###); + "); // Install `babel` from Test PyPI, to get an outdated version. uv_snapshot!(context.filters(), context.tool_install() @@ -353,7 +353,7 @@ fn tool_upgrade_all() { .arg("https://test.pypi.org/simple/") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -365,7 +365,7 @@ fn tool_upgrade_all() { + babel==2.6.0 + pytz==2018.5 Installed 1 executable: pybabel - "###); + "); // Upgrade all from PyPI. uv_snapshot!(context.filters(), context.tool_upgrade() @@ -374,7 +374,7 @@ fn tool_upgrade_all() { .arg("https://pypi.org/simple/") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -389,7 +389,7 @@ fn tool_upgrade_all() { - python-dotenv==0.10.2.post2 + python-dotenv==1.0.1 Installed 1 executable: dotenv - "###); + "); } #[test] @@ -405,7 +405,7 @@ fn tool_upgrade_non_existing_package() { .arg("black") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: false exit_code: 1 ----- stdout ----- @@ -413,21 +413,21 @@ fn tool_upgrade_non_existing_package() { ----- stderr ----- error: Failed to upgrade black Caused by: `black` is not installed; run `uv tool install black` to install - "###); + "); // Attempt to upgrade all. uv_snapshot!(context.filters(), context.tool_upgrade() .arg("--all") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Nothing to upgrade - "###); + "); } #[test] @@ -445,7 +445,7 @@ fn tool_upgrade_not_stop_if_upgrade_fails() -> anyhow::Result<()> { .arg("https://test.pypi.org/simple/") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -456,7 +456,7 @@ fn tool_upgrade_not_stop_if_upgrade_fails() -> anyhow::Result<()> { Installed [N] packages in [TIME] + python-dotenv==0.10.2.post2 Installed 1 executable: dotenv - "###); + "); // Install `babel` from Test PyPI, to get an outdated version. uv_snapshot!(context.filters(), context.tool_install() @@ -465,7 +465,7 @@ fn tool_upgrade_not_stop_if_upgrade_fails() -> anyhow::Result<()> { .arg("https://test.pypi.org/simple/") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -477,7 +477,7 @@ fn tool_upgrade_not_stop_if_upgrade_fails() -> anyhow::Result<()> { + babel==2.6.0 + pytz==2018.5 Installed 1 executable: pybabel - "###); + "); // Break the receipt for python-dotenv tool_dir @@ -492,7 +492,7 @@ fn tool_upgrade_not_stop_if_upgrade_fails() -> anyhow::Result<()> { .arg("https://pypi.org/simple/") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: false exit_code: 1 ----- stdout ----- @@ -505,7 +505,7 @@ fn tool_upgrade_not_stop_if_upgrade_fails() -> anyhow::Result<()> { Installed 1 executable: pybabel error: Failed to upgrade python-dotenv Caused by: `python-dotenv` is missing a valid receipt; run `uv tool install --force python-dotenv` to reinstall - "###); + "); Ok(()) } @@ -524,7 +524,7 @@ fn tool_upgrade_settings() { .arg("--resolution=lowest-direct") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -540,21 +540,21 @@ fn tool_upgrade_settings() { + pathspec==0.12.1 + platformdirs==4.2.0 Installed 2 executables: black, blackd - "###); + "); // Upgrade `black`. This should be a no-op, since the resolution is set to `lowest-direct`. uv_snapshot!(context.filters(), context.tool_upgrade() .arg("black") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Nothing to upgrade - "###); + "); // Upgrade `black`, but override the resolution. uv_snapshot!(context.filters(), context.tool_upgrade() @@ -562,7 +562,7 @@ fn tool_upgrade_settings() { .arg("--resolution=highest") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -572,7 +572,7 @@ fn tool_upgrade_settings() { - black==23.1.0 + black==24.3.0 Installed 2 executables: black, blackd - "###); + "); } #[test] @@ -590,7 +590,7 @@ fn tool_upgrade_respect_constraints() { .arg("https://test.pypi.org/simple/") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -602,7 +602,7 @@ fn tool_upgrade_respect_constraints() { + babel==2.6.0 + pytz==2018.5 Installed 1 executable: pybabel - "###); + "); // Upgrade `babel` from PyPI. It should be updated, but not beyond the constraint. uv_snapshot!(context.filters(), context.tool_upgrade() @@ -611,7 +611,7 @@ fn tool_upgrade_respect_constraints() { .arg("https://pypi.org/simple/") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -623,7 +623,7 @@ fn tool_upgrade_respect_constraints() { - pytz==2018.5 + pytz==2024.1 Installed 1 executable: pybabel - "###); + "); } #[test] @@ -641,7 +641,7 @@ fn tool_upgrade_constraint() { .arg("https://test.pypi.org/simple/") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -653,7 +653,7 @@ fn tool_upgrade_constraint() { + babel==2.6.0 + pytz==2018.5 Installed 1 executable: pybabel - "###); + "); // Upgrade `babel`, but apply a constraint inline. uv_snapshot!(context.filters(), context.tool_upgrade() @@ -662,7 +662,7 @@ fn tool_upgrade_constraint() { .arg("https://pypi.org/simple/") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -674,7 +674,7 @@ fn tool_upgrade_constraint() { - pytz==2018.5 + pytz==2024.1 Installed 1 executable: pybabel - "###); + "); // Upgrade `babel`, but apply a constraint via `--upgrade-package`. uv_snapshot!(context.filters(), context.tool_upgrade() @@ -685,7 +685,7 @@ fn tool_upgrade_constraint() { .arg("babel<2.14.0") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -698,7 +698,7 @@ fn tool_upgrade_constraint() { - pytz==2024.1 + setuptools==69.2.0 Installed 1 executable: pybabel - "###); + "); // Upgrade `babel` without a constraint. uv_snapshot!(context.filters(), context.tool_upgrade() @@ -707,7 +707,7 @@ fn tool_upgrade_constraint() { .arg("https://pypi.org/simple/") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -718,7 +718,7 @@ fn tool_upgrade_constraint() { + babel==2.14.0 - setuptools==69.2.0 Installed 1 executable: pybabel - "###); + "); // Passing `--upgrade` explicitly should warn. uv_snapshot!(context.filters(), context.tool_upgrade() @@ -728,7 +728,7 @@ fn tool_upgrade_constraint() { .arg("--upgrade") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -736,7 +736,7 @@ fn tool_upgrade_constraint() { ----- stderr ----- warning: `--upgrade` is enabled by default on `uv tool upgrade` Nothing to upgrade - "###); + "); } /// Upgrade a tool, but only by upgrading one of it's `--with` dependencies, and not the tool @@ -756,7 +756,7 @@ fn tool_upgrade_with() { .arg("https://test.pypi.org/simple/") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -768,7 +768,7 @@ fn tool_upgrade_with() { + babel==2.6.0 + pytz==2018.5 Installed 1 executable: pybabel - "###); + "); // Upgrade `babel` from PyPI. It shouldn't be updated, but `pytz` should be. uv_snapshot!(context.filters(), context.tool_upgrade() @@ -777,7 +777,7 @@ fn tool_upgrade_with() { .arg("https://pypi.org/simple/") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -788,7 +788,7 @@ fn tool_upgrade_with() { + pytz==2024.1 hint: `babel` is pinned to `2.6.0` (installed with an exact version pin); reinstall with `uv tool install babel@latest` to upgrade to a new version. - "###); + "); } #[test] @@ -806,7 +806,7 @@ fn tool_upgrade_python() { .arg("--python").arg("3.11") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -818,7 +818,7 @@ fn tool_upgrade_python() { + babel==2.6.0 + pytz==2018.5 Installed 1 executable: pybabel - "###); + "); uv_snapshot!( context.filters(), @@ -826,7 +826,7 @@ fn tool_upgrade_python() { .arg("--python").arg("3.12") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -838,7 +838,7 @@ fn tool_upgrade_python() { + pytz==2018.5 Installed 1 executable: pybabel Upgraded tool environment for `babel` to Python 3.12 - "### + " ); insta::with_settings!({ @@ -865,7 +865,7 @@ fn tool_upgrade_python_with_all() { .arg("--python").arg("3.11") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -877,7 +877,7 @@ fn tool_upgrade_python_with_all() { + babel==2.6.0 + pytz==2018.5 Installed 1 executable: pybabel - "###); + "); uv_snapshot!(context.filters(), context.tool_install() .arg("python-dotenv") @@ -886,7 +886,7 @@ fn tool_upgrade_python_with_all() { .arg("--python").arg("3.11") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -897,7 +897,7 @@ fn tool_upgrade_python_with_all() { Installed [N] packages in [TIME] + python-dotenv==0.10.2.post2 Installed 1 executable: dotenv - "###); + "); uv_snapshot!( context.filters(), @@ -905,7 +905,7 @@ fn tool_upgrade_python_with_all() { .arg("--python").arg("3.12") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r###" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -921,7 +921,7 @@ fn tool_upgrade_python_with_all() { + python-dotenv==0.10.2.post2 Installed 1 executable: dotenv Upgraded tool environments for `babel` and `python-dotenv` to Python 3.12 - "### + " ); insta::with_settings!({ @@ -960,7 +960,7 @@ fn test_tool_upgrade_additional_entrypoints() { .arg("babel==2.14.0") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -988,7 +988,7 @@ fn test_tool_upgrade_additional_entrypoints() { .arg("babel") .env(EnvVars::UV_TOOL_DIR, tool_dir.as_os_str()) .env(EnvVars::XDG_BIN_HOME, bin_dir.as_os_str()) - .env(EnvVars::PATH, bin_dir.as_os_str()), @r" + .env(EnvVars::PATH, bin_dir.as_os_str()), @" success: true exit_code: 0 ----- stdout ----- diff --git a/crates/uv/tests/it/tree.rs b/crates/uv/tests/it/tree.rs index b58313c6a..e310b1658 100644 --- a/crates/uv/tests/it/tree.rs +++ b/crates/uv/tests/it/tree.rs @@ -24,7 +24,7 @@ fn nested_dependencies() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.tree().arg("--universal"), @r###" + uv_snapshot!(context.filters(), context.tree().arg("--universal"), @" success: true exit_code: 0 ----- stdout ----- @@ -38,7 +38,7 @@ fn nested_dependencies() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] - "### + " ); // `uv tree` should update the lockfile @@ -65,7 +65,7 @@ fn nested_platform_dependencies() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.tree().arg("--python-platform").arg("linux"), @r###" + uv_snapshot!(context.filters(), context.tree().arg("--python-platform").arg("linux"), @" success: true exit_code: 0 ----- stdout ----- @@ -82,10 +82,10 @@ fn nested_platform_dependencies() -> Result<()> { ----- stderr ----- Resolved 12 packages in [TIME] - "### + " ); - uv_snapshot!(context.filters(), context.tree().arg("--universal"), @r###" + uv_snapshot!(context.filters(), context.tree().arg("--universal"), @" success: true exit_code: 0 ----- stdout ----- @@ -105,7 +105,7 @@ fn nested_platform_dependencies() -> Result<()> { ----- stderr ----- Resolved 12 packages in [TIME] - "### + " ); // `uv tree` should update the lockfile @@ -132,7 +132,7 @@ fn invert() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.tree().arg("--invert"), @r###" + uv_snapshot!(context.filters(), context.tree().arg("--invert"), @" success: true exit_code: 0 ----- stdout ----- @@ -149,10 +149,10 @@ fn invert() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] - "### + " ); - uv_snapshot!(context.filters(), context.tree().arg("--invert").arg("--no-dedupe"), @r###" + uv_snapshot!(context.filters(), context.tree().arg("--invert").arg("--no-dedupe"), @" success: true exit_code: 0 ----- stdout ----- @@ -171,7 +171,7 @@ fn invert() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] - "### + " ); Ok(()) @@ -192,7 +192,7 @@ fn frozen() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.tree().arg("--universal"), @r###" + uv_snapshot!(context.filters(), context.tree().arg("--universal"), @" success: true exit_code: 0 ----- stdout ----- @@ -203,7 +203,7 @@ fn frozen() -> Result<()> { ----- stderr ----- Resolved 4 packages in [TIME] - "### + " ); // `uv tree` should update the lockfile @@ -223,7 +223,7 @@ fn frozen() -> Result<()> { )?; // Running with `--frozen` should show the stale tree. - uv_snapshot!(context.filters(), context.tree().arg("--frozen"), @r###" + uv_snapshot!(context.filters(), context.tree().arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -233,7 +233,7 @@ fn frozen() -> Result<()> { └── sniffio v1.3.1 ----- stderr ----- - "### + " ); Ok(()) @@ -254,7 +254,7 @@ fn outdated() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.tree().arg("--outdated").arg("--universal"), @r###" + uv_snapshot!(context.filters(), context.tree().arg("--outdated").arg("--universal"), @" success: true exit_code: 0 ----- stdout ----- @@ -265,7 +265,7 @@ fn outdated() -> Result<()> { ----- stderr ----- Resolved 4 packages in [TIME] - "### + " ); Ok(()) @@ -290,7 +290,7 @@ fn platform_dependencies() -> Result<()> { // When `--universal` is _not_ provided, `colorama` should _not_ be included. #[cfg(not(windows))] - uv_snapshot!(context.filters(), context.tree(), @r###" + uv_snapshot!(context.filters(), context.tree(), @" success: true exit_code: 0 ----- stdout ----- @@ -304,10 +304,10 @@ fn platform_dependencies() -> Result<()> { ----- stderr ----- Resolved 8 packages in [TIME] - "###); + "); // Unless `--python-platform` is set to `windows`, in which case it should be included. - uv_snapshot!(context.filters(), context.tree().arg("--python-platform").arg("windows"), @r###" + uv_snapshot!(context.filters(), context.tree().arg("--python-platform").arg("windows"), @" success: true exit_code: 0 ----- stdout ----- @@ -322,11 +322,11 @@ fn platform_dependencies() -> Result<()> { ----- stderr ----- Resolved 8 packages in [TIME] - "###); + "); // When `--universal` is _not_ provided, should include `colorama`, even though it's only // included on Windows. - uv_snapshot!(context.filters(), context.tree().arg("--universal"), @r###" + uv_snapshot!(context.filters(), context.tree().arg("--universal"), @" success: true exit_code: 0 ----- stdout ----- @@ -341,7 +341,7 @@ fn platform_dependencies() -> Result<()> { ----- stderr ----- Resolved 8 packages in [TIME] - "### + " ); // `uv tree` should update the lockfile @@ -369,7 +369,7 @@ fn platform_dependencies_inverted() -> Result<()> { )?; // When `--universal` is _not_ provided, `colorama` should _not_ be included. - uv_snapshot!(context.filters(), context.tree().arg("--invert").arg("--python-platform").arg("linux"), @r###" + uv_snapshot!(context.filters(), context.tree().arg("--invert").arg("--python-platform").arg("linux"), @" success: true exit_code: 0 ----- stdout ----- @@ -378,10 +378,10 @@ fn platform_dependencies_inverted() -> Result<()> { ----- stderr ----- Resolved 3 packages in [TIME] - "###); + "); // Unless `--python-platform` is set to `windows`, in which case it should be included. - uv_snapshot!(context.filters(), context.tree().arg("--invert").arg("--python-platform").arg("windows"), @r#" + uv_snapshot!(context.filters(), context.tree().arg("--invert").arg("--python-platform").arg("windows"), @" success: true exit_code: 0 ----- stdout ----- @@ -391,7 +391,7 @@ fn platform_dependencies_inverted() -> Result<()> { ----- stderr ----- Resolved 3 packages in [TIME] - "#); + "); Ok(()) } @@ -415,7 +415,7 @@ fn repeated_dependencies() -> Result<()> { )?; // Should include both versions of `anyio`, which have different dependencies. - uv_snapshot!(context.filters(), context.tree().arg("--universal"), @r###" + uv_snapshot!(context.filters(), context.tree().arg("--universal"), @" success: true exit_code: 0 ----- stdout ----- @@ -430,7 +430,7 @@ fn repeated_dependencies() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] - "### + " ); // `uv tree` should update the lockfile @@ -488,7 +488,7 @@ fn repeated_version() -> Result<()> { Url::from_file_path(context.temp_dir.join("v2")).unwrap(), })?; - uv_snapshot!(context.filters(), context.tree().arg("--universal"), @r###" + uv_snapshot!(context.filters(), context.tree().arg("--universal"), @" success: true exit_code: 0 ----- stdout ----- @@ -504,7 +504,7 @@ fn repeated_version() -> Result<()> { ----- stderr ----- Resolved 7 packages in [TIME] - "### + " ); // `uv tree` should update the lockfile @@ -532,7 +532,7 @@ fn dev_dependencies() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.tree(), @r" + uv_snapshot!(context.filters(), context.tree(), @" success: true exit_code: 0 ----- stdout ----- @@ -548,7 +548,7 @@ fn dev_dependencies() -> Result<()> { " ); - uv_snapshot!(context.filters(), context.tree().arg("--no-dev"), @r" + uv_snapshot!(context.filters(), context.tree().arg("--no-dev"), @" success: true exit_code: 0 ----- stdout ----- @@ -586,7 +586,7 @@ fn dev_dependencies_inverted() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.tree().arg("--universal").arg("--invert"), @r" + uv_snapshot!(context.filters(), context.tree().arg("--universal").arg("--invert"), @" success: true exit_code: 0 ----- stdout ----- @@ -605,7 +605,7 @@ fn dev_dependencies_inverted() -> Result<()> { " ); - uv_snapshot!(context.filters(), context.tree().arg("--universal").arg("--invert").arg("--no-dev"), @r" + uv_snapshot!(context.filters(), context.tree().arg("--universal").arg("--invert").arg("--no-dev"), @" success: true exit_code: 0 ----- stdout ----- @@ -643,7 +643,7 @@ fn optional_dependencies() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.tree().arg("--universal"), @r###" + uv_snapshot!(context.filters(), context.tree().arg("--universal"), @" success: true exit_code: 0 ----- stdout ----- @@ -665,7 +665,7 @@ fn optional_dependencies() -> Result<()> { ----- stderr ----- Resolved 14 packages in [TIME] - "### + " ); // `uv tree` should update the lockfile @@ -693,7 +693,7 @@ fn optional_dependencies_inverted() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.tree().arg("--universal").arg("--invert"), @r###" + uv_snapshot!(context.filters(), context.tree().arg("--universal").arg("--invert"), @" success: true exit_code: 0 ----- stdout ----- @@ -723,7 +723,7 @@ fn optional_dependencies_inverted() -> Result<()> { ----- stderr ----- Resolved 14 packages in [TIME] - "### + " ); // `uv tree` should update the lockfile @@ -748,7 +748,7 @@ fn package() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.tree(), @r###" + uv_snapshot!(context.filters(), context.tree(), @" success: true exit_code: 0 ----- stdout ----- @@ -768,10 +768,10 @@ fn package() -> Result<()> { ----- stderr ----- Resolved 11 packages in [TIME] - "### + " ); - uv_snapshot!(context.filters(), context.tree().arg("--package").arg("scipy"), @r###" + uv_snapshot!(context.filters(), context.tree().arg("--package").arg("scipy"), @" success: true exit_code: 0 ----- stdout ----- @@ -780,10 +780,10 @@ fn package() -> Result<()> { ----- stderr ----- Resolved 11 packages in [TIME] - "### + " ); - uv_snapshot!(context.filters(), context.tree().arg("--package").arg("numpy").arg("--invert"), @r###" + uv_snapshot!(context.filters(), context.tree().arg("--package").arg("numpy").arg("--invert"), @" success: true exit_code: 0 ----- stdout ----- @@ -798,7 +798,7 @@ fn package() -> Result<()> { ----- stderr ----- Resolved 11 packages in [TIME] - "### + " ); // `uv tree` should update the lockfile @@ -830,7 +830,7 @@ fn group() -> Result<()> { context.lock().assert().success(); - uv_snapshot!(context.filters(), context.tree(), @r###" + uv_snapshot!(context.filters(), context.tree(), @" success: true exit_code: 0 ----- stdout ----- @@ -840,9 +840,9 @@ fn group() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] - "###); + "); - uv_snapshot!(context.filters(), context.tree().arg("--only-group").arg("bar"), @r###" + uv_snapshot!(context.filters(), context.tree().arg("--only-group").arg("bar"), @" success: true exit_code: 0 ----- stdout ----- @@ -851,9 +851,9 @@ fn group() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] - "###); + "); - uv_snapshot!(context.filters(), context.tree().arg("--group").arg("foo"), @r###" + uv_snapshot!(context.filters(), context.tree().arg("--group").arg("foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -866,9 +866,9 @@ fn group() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] - "###); + "); - uv_snapshot!(context.filters(), context.tree().arg("--group").arg("foo").arg("--group").arg("bar"), @r###" + uv_snapshot!(context.filters(), context.tree().arg("--group").arg("foo").arg("--group").arg("bar"), @" success: true exit_code: 0 ----- stdout ----- @@ -882,9 +882,9 @@ fn group() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] - "###); + "); - uv_snapshot!(context.filters(), context.tree().arg("--all-groups"), @r###" + uv_snapshot!(context.filters(), context.tree().arg("--all-groups"), @" success: true exit_code: 0 ----- stdout ----- @@ -898,9 +898,9 @@ fn group() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] - "###); + "); - uv_snapshot!(context.filters(), context.tree().arg("--all-groups").arg("--no-group").arg("bar"), @r###" + uv_snapshot!(context.filters(), context.tree().arg("--all-groups").arg("--no-group").arg("bar"), @" success: true exit_code: 0 ----- stdout ----- @@ -913,7 +913,7 @@ fn group() -> Result<()> { ----- stderr ----- Resolved 6 packages in [TIME] - "###); + "); Ok(()) } @@ -933,7 +933,7 @@ fn cycle() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.tree().arg("--universal"), @r###" + uv_snapshot!(context.filters(), context.tree().arg("--universal"), @" success: true exit_code: 0 ----- stdout ----- @@ -958,10 +958,10 @@ fn cycle() -> Result<()> { ----- stderr ----- Resolved 11 packages in [TIME] - "### + " ); - uv_snapshot!(context.filters(), context.tree().arg("--package").arg("traceback2").arg("--package").arg("six"), @r###" + uv_snapshot!(context.filters(), context.tree().arg("--package").arg("traceback2").arg("--package").arg("six"), @" success: true exit_code: 0 ----- stdout ----- @@ -971,10 +971,10 @@ fn cycle() -> Result<()> { ----- stderr ----- Resolved 11 packages in [TIME] - "### + " ); - uv_snapshot!(context.filters(), context.tree().arg("--package").arg("traceback2").arg("--package").arg("six").arg("--invert"), @r###" + uv_snapshot!(context.filters(), context.tree().arg("--package").arg("traceback2").arg("--package").arg("six").arg("--invert"), @" success: true exit_code: 0 ----- stdout ----- @@ -994,7 +994,7 @@ fn cycle() -> Result<()> { ----- stderr ----- Resolved 11 packages in [TIME] - "### + " ); // `uv tree` should update the lockfile @@ -1040,7 +1040,7 @@ fn workspace_dev() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.tree().arg("--universal"), @r" + uv_snapshot!(context.filters(), context.tree().arg("--universal"), @" success: true exit_code: 0 ----- stdout ----- @@ -1060,7 +1060,7 @@ fn workspace_dev() -> Result<()> { // Under `--no-dev`, the member should still be included, since we show the entire workspace. // But it shouldn't be considered a dependency of the root. - uv_snapshot!(context.filters(), context.tree().arg("--universal").arg("--no-dev"), @r" + uv_snapshot!(context.filters(), context.tree().arg("--universal").arg("--no-dev"), @" success: true exit_code: 0 ----- stdout ----- @@ -1098,7 +1098,7 @@ fn non_project() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.tree().arg("--universal"), @r###" + uv_snapshot!(context.filters(), context.tree().arg("--universal"), @" success: true exit_code: 0 ----- stdout ----- @@ -1109,7 +1109,7 @@ fn non_project() -> Result<()> { ----- stderr ----- warning: No `requires-python` value found in the workspace. Defaulting to `>=3.12`. Resolved 3 packages in [TIME] - "### + " ); // `uv tree` should update the lockfile @@ -1149,7 +1149,7 @@ fn non_project_member() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.tree().arg("--universal"), @r###" + uv_snapshot!(context.filters(), context.tree().arg("--universal"), @" success: true exit_code: 0 ----- stdout ----- @@ -1164,10 +1164,10 @@ fn non_project_member() -> Result<()> { ----- stderr ----- Resolved 5 packages in [TIME] - "### + " ); - uv_snapshot!(context.filters(), context.tree().arg("--universal").arg("--invert"), @r###" + uv_snapshot!(context.filters(), context.tree().arg("--universal").arg("--invert"), @" success: true exit_code: 0 ----- stdout ----- @@ -1183,7 +1183,7 @@ fn non_project_member() -> Result<()> { ----- stderr ----- Resolved 5 packages in [TIME] - "### + " ); // `uv tree` should update the lockfile @@ -1215,7 +1215,7 @@ fn script() -> Result<()> { pprint([(k, v["title"]) for k, v in data.items()][:10]) "#})?; - uv_snapshot!(context.filters(), context.tree().arg("--script").arg(script.path()), @r###" + uv_snapshot!(context.filters(), context.tree().arg("--script").arg(script.path()), @" success: true exit_code: 0 ----- stdout ----- @@ -1231,20 +1231,20 @@ fn script() -> Result<()> { ----- stderr ----- Resolved 9 packages in [TIME] - "###); + "); // If the lockfile didn't exist already, it shouldn't be persisted to disk. assert!(!context.temp_dir.child("uv.lock").exists()); // Explicitly lock the script. - uv_snapshot!(context.filters(), context.lock().arg("--script").arg(script.path()), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--script").arg(script.path()), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 9 packages in [TIME] - "###); + "); let lock = context.read("script.py.lock"); @@ -1413,7 +1413,7 @@ fn script() -> Result<()> { "#})?; // `uv tree` should update the lockfile. - uv_snapshot!(context.filters(), context.tree().arg("--script").arg(script.path()), @r###" + uv_snapshot!(context.filters(), context.tree().arg("--script").arg(script.path()), @" success: true exit_code: 0 ----- stdout ----- @@ -1430,7 +1430,7 @@ fn script() -> Result<()> { ----- stderr ----- Resolved 10 packages in [TIME] - "###); + "); let lock = context.read("script.py.lock"); @@ -1619,7 +1619,7 @@ fn only_group() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.tree().arg("--universal"), @r" + uv_snapshot!(context.filters(), context.tree().arg("--universal"), @" success: true exit_code: 0 ----- stdout ----- @@ -1636,7 +1636,7 @@ fn only_group() -> Result<()> { " ); - uv_snapshot!(context.filters(), context.tree().arg("--universal").arg("--only-group").arg("dev"), @r" + uv_snapshot!(context.filters(), context.tree().arg("--universal").arg("--only-group").arg("dev"), @" success: true exit_code: 0 ----- stdout ----- @@ -1651,7 +1651,7 @@ fn only_group() -> Result<()> { " ); - uv_snapshot!(context.filters(), context.tree().arg("--universal").arg("--only-group").arg("test"), @r" + uv_snapshot!(context.filters(), context.tree().arg("--universal").arg("--only-group").arg("test"), @" success: true exit_code: 0 ----- stdout ----- @@ -1689,7 +1689,7 @@ fn show_sizes() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.tree().arg("--show-sizes").arg("--universal"), @r###" + uv_snapshot!(context.filters(), context.tree().arg("--show-sizes").arg("--universal"), @" success: true exit_code: 0 ----- stdout ----- @@ -1698,7 +1698,7 @@ fn show_sizes() -> Result<()> { ----- stderr ----- Resolved 2 packages in [TIME] - "### + " ); Ok(()) @@ -1752,7 +1752,7 @@ fn workspace_circular_dependencies() -> Result<()> { )?; // Test that package-a is at the root when requested - uv_snapshot!(context.filters(), context.tree().arg("--package").arg("package-a"), @r###" + uv_snapshot!(context.filters(), context.tree().arg("--package").arg("package-a"), @" success: true exit_code: 0 ----- stdout ----- @@ -1763,11 +1763,11 @@ fn workspace_circular_dependencies() -> Result<()> { ----- stderr ----- Resolved 2 packages in [TIME] - "### + " ); // Test that package-b is at the root when requested - uv_snapshot!(context.filters(), context.tree().arg("--package").arg("package-b"), @r###" + uv_snapshot!(context.filters(), context.tree().arg("--package").arg("package-b"), @" success: true exit_code: 0 ----- stdout ----- @@ -1778,11 +1778,11 @@ fn workspace_circular_dependencies() -> Result<()> { ----- stderr ----- Resolved 2 packages in [TIME] - "### + " ); // Test that both packages are shown as roots when both are requested - uv_snapshot!(context.filters(), context.tree().arg("--package").arg("package-a").arg("--package").arg("package-b"), @r###" + uv_snapshot!(context.filters(), context.tree().arg("--package").arg("package-a").arg("--package").arg("package-b"), @" success: true exit_code: 0 ----- stdout ----- @@ -1794,7 +1794,7 @@ fn workspace_circular_dependencies() -> Result<()> { ----- stderr ----- Resolved 2 packages in [TIME] - "### + " ); Ok(()) diff --git a/crates/uv/tests/it/venv.rs b/crates/uv/tests/it/venv.rs index 9094deb3d..928166d1e 100644 --- a/crates/uv/tests/it/venv.rs +++ b/crates/uv/tests/it/venv.rs @@ -19,7 +19,7 @@ fn create_venv() { uv_snapshot!(context.filters(), context.venv() .arg(context.venv.as_os_str()) .arg("--python") - .arg("3.12"), @r###" + .arg("3.12"), @" success: true exit_code: 0 ----- stdout ----- @@ -28,7 +28,7 @@ fn create_venv() { Using CPython 3.12.[X] interpreter at: [PYTHON-3.12] Creating virtual environment at: .venv Activate with: source .venv/[BIN]/activate - "### + " ); context.venv.assert(predicates::path::is_dir()); @@ -36,7 +36,7 @@ fn create_venv() { uv_snapshot!(context.filters(), context.venv() .arg(context.venv.as_os_str()) .arg("--python") - .arg("3.12"), @r" + .arg("3.12"), @" success: true exit_code: 0 ----- stdout ----- @@ -55,7 +55,7 @@ fn create_venv() { .arg(context.venv.as_os_str()) .arg("--clear") .arg("--python") - .arg("3.12"), @r###" + .arg("3.12"), @" success: true exit_code: 0 ----- stdout ----- @@ -64,7 +64,7 @@ fn create_venv() { Using CPython 3.12.[X] interpreter at: [PYTHON-3.12] Creating virtual environment at: .venv Activate with: source .venv/[BIN]/activate - "### + " ); context.venv.assert(predicates::path::is_dir()); @@ -77,7 +77,7 @@ fn create_venv_313() { uv_snapshot!(context.filters(), context.venv() .arg(context.venv.as_os_str()) .arg("--python") - .arg("3.13"), @r###" + .arg("3.13"), @" success: true exit_code: 0 ----- stdout ----- @@ -86,7 +86,7 @@ fn create_venv_313() { Using CPython 3.13.[X] interpreter at: [PYTHON-3.13] Creating virtual environment at: .venv Activate with: source .venv/[BIN]/activate - "### + " ); context.venv.assert(predicates::path::is_dir()); @@ -97,7 +97,7 @@ fn create_venv_project_environment() -> Result<()> { let context = TestContext::new_with_versions(&["3.12"]); // `uv venv` ignores `UV_PROJECT_ENVIRONMENT` when it's not a project - uv_snapshot!(context.filters(), context.venv().env(EnvVars::UV_PROJECT_ENVIRONMENT, "foo"), @r###" + uv_snapshot!(context.filters(), context.venv().env(EnvVars::UV_PROJECT_ENVIRONMENT, "foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -106,7 +106,7 @@ fn create_venv_project_environment() -> Result<()> { Using CPython 3.12.[X] interpreter at: [PYTHON-3.12] Creating virtual environment at: .venv Activate with: source .venv/[BIN]/activate - "### + " ); context.venv.assert(predicates::path::is_dir()); @@ -127,7 +127,7 @@ fn create_venv_project_environment() -> Result<()> { )?; // But, if we're in a project we'll respect it - uv_snapshot!(context.filters(), context.venv().env(EnvVars::UV_PROJECT_ENVIRONMENT, "foo"), @r###" + uv_snapshot!(context.filters(), context.venv().env(EnvVars::UV_PROJECT_ENVIRONMENT, "foo"), @" success: true exit_code: 0 ----- stdout ----- @@ -136,7 +136,7 @@ fn create_venv_project_environment() -> Result<()> { Using CPython 3.12.[X] interpreter at: [PYTHON-3.12] Creating virtual environment at: foo Activate with: source foo/[BIN]/activate - "### + " ); context @@ -148,7 +148,7 @@ fn create_venv_project_environment() -> Result<()> { let child = context.temp_dir.child("child"); child.create_dir_all()?; - uv_snapshot!(context.filters(), context.venv().env(EnvVars::UV_PROJECT_ENVIRONMENT, "foo").current_dir(child.path()), @r###" + uv_snapshot!(context.filters(), context.venv().env(EnvVars::UV_PROJECT_ENVIRONMENT, "foo").current_dir(child.path()), @" success: true exit_code: 0 ----- stdout ----- @@ -157,7 +157,7 @@ fn create_venv_project_environment() -> Result<()> { Using CPython 3.12.[X] interpreter at: [PYTHON-3.12] Creating virtual environment at: .venv Activate with: source .venv/[BIN]/activate - "### + " ); // In which case, we'll use the default name of `.venv` @@ -165,7 +165,7 @@ fn create_venv_project_environment() -> Result<()> { child.child(".venv").assert(predicates::path::is_dir()); // Or, if a name is provided - uv_snapshot!(context.filters(), context.venv().arg("bar"), @r###" + uv_snapshot!(context.filters(), context.venv().arg("bar"), @" success: true exit_code: 0 ----- stdout ----- @@ -174,7 +174,7 @@ fn create_venv_project_environment() -> Result<()> { Using CPython 3.12.[X] interpreter at: [PYTHON-3.12] Creating virtual environment at: bar Activate with: source bar/[BIN]/activate - "### + " ); context @@ -183,7 +183,7 @@ fn create_venv_project_environment() -> Result<()> { .assert(predicates::path::is_dir()); // Or, of they opt-out with `--no-workspace` or `--no-project` - uv_snapshot!(context.filters(), context.venv().arg("--clear").arg("--no-workspace"), @r###" + uv_snapshot!(context.filters(), context.venv().arg("--clear").arg("--no-workspace"), @" success: true exit_code: 0 ----- stdout ----- @@ -192,10 +192,10 @@ fn create_venv_project_environment() -> Result<()> { Using CPython 3.12.[X] interpreter at: [PYTHON-3.12] Creating virtual environment at: .venv Activate with: source .venv/[BIN]/activate - "### + " ); - uv_snapshot!(context.filters(), context.venv().arg("--clear").arg("--no-project"), @r###" + uv_snapshot!(context.filters(), context.venv().arg("--clear").arg("--no-project"), @" success: true exit_code: 0 ----- stdout ----- @@ -204,7 +204,7 @@ fn create_venv_project_environment() -> Result<()> { Using CPython 3.12.[X] interpreter at: [PYTHON-3.12] Creating virtual environment at: .venv Activate with: source .venv/[BIN]/activate - "### + " ); Ok(()) @@ -221,7 +221,7 @@ fn virtual_empty() -> Result<()> { wow = "someconfig" "#})?; - uv_snapshot!(context.filters(), context.venv(), @r" + uv_snapshot!(context.filters(), context.venv(), @" success: true exit_code: 0 ----- stdout ----- @@ -250,7 +250,7 @@ fn virtual_dependency_group() -> Result<()> { dev = ["sniffio"] "#})?; - uv_snapshot!(context.filters(), context.venv(), @r" + uv_snapshot!(context.filters(), context.venv(), @" success: true exit_code: 0 ----- stdout ----- @@ -270,7 +270,7 @@ fn create_venv_defaults_to_cwd() { let context = TestContext::new_with_versions(&["3.12"]); uv_snapshot!(context.filters(), context.venv() .arg("--python") - .arg("3.12"), @r###" + .arg("3.12"), @" success: true exit_code: 0 ----- stdout ----- @@ -279,7 +279,7 @@ fn create_venv_defaults_to_cwd() { Using CPython 3.12.[X] interpreter at: [PYTHON-3.12] Creating virtual environment at: .venv Activate with: source .venv/[BIN]/activate - "### + " ); context.venv.assert(predicates::path::is_dir()); @@ -291,7 +291,7 @@ fn create_venv_ignores_virtual_env_variable() { // We shouldn't care if `VIRTUAL_ENV` is set to an non-existent directory // because we ignore virtual environment interpreter sources (we require a system interpreter) uv_snapshot!(context.filters(), context.venv() - .env(EnvVars::VIRTUAL_ENV, context.temp_dir.child("does-not-exist").as_os_str()), @r###" + .env(EnvVars::VIRTUAL_ENV, context.temp_dir.child("does-not-exist").as_os_str()), @" success: true exit_code: 0 ----- stdout ----- @@ -300,7 +300,7 @@ fn create_venv_ignores_virtual_env_variable() { Using CPython 3.12.[X] interpreter at: [PYTHON-3.12] Creating virtual environment at: .venv Activate with: source .venv/[BIN]/activate - "### + " ); } @@ -309,7 +309,7 @@ fn create_venv_reads_request_from_python_version_file() { let context = TestContext::new_with_versions(&["3.11", "3.12"]); // Without the file, we should use the first on the PATH - uv_snapshot!(context.filters(), context.venv(), @r###" + uv_snapshot!(context.filters(), context.venv(), @" success: true exit_code: 0 ----- stdout ----- @@ -318,7 +318,7 @@ fn create_venv_reads_request_from_python_version_file() { Using CPython 3.11.[X] interpreter at: [PYTHON-3.11] Creating virtual environment at: .venv Activate with: source .venv/[BIN]/activate - "### + " ); // With a version file, we should prefer that version @@ -328,7 +328,7 @@ fn create_venv_reads_request_from_python_version_file() { .write_str("3.12") .unwrap(); - uv_snapshot!(context.filters(), context.venv().arg("--clear"), @r###" + uv_snapshot!(context.filters(), context.venv().arg("--clear"), @" success: true exit_code: 0 ----- stdout ----- @@ -337,7 +337,7 @@ fn create_venv_reads_request_from_python_version_file() { Using CPython 3.12.[X] interpreter at: [PYTHON-3.12] Creating virtual environment at: .venv Activate with: source .venv/[BIN]/activate - "### + " ); context.venv.assert(predicates::path::is_dir()); @@ -348,7 +348,7 @@ fn create_venv_reads_request_from_python_versions_file() { let context = TestContext::new_with_versions(&["3.11", "3.12"]); // Without the file, we should use the first on the PATH - uv_snapshot!(context.filters(), context.venv(), @r###" + uv_snapshot!(context.filters(), context.venv(), @" success: true exit_code: 0 ----- stdout ----- @@ -357,7 +357,7 @@ fn create_venv_reads_request_from_python_versions_file() { Using CPython 3.11.[X] interpreter at: [PYTHON-3.11] Creating virtual environment at: .venv Activate with: source .venv/[BIN]/activate - "### + " ); // With a versions file, we should prefer the first listed version @@ -367,7 +367,7 @@ fn create_venv_reads_request_from_python_versions_file() { .write_str("3.12\n3.11") .unwrap(); - uv_snapshot!(context.filters(), context.venv().arg("--clear"), @r###" + uv_snapshot!(context.filters(), context.venv().arg("--clear"), @" success: true exit_code: 0 ----- stdout ----- @@ -376,7 +376,7 @@ fn create_venv_reads_request_from_python_versions_file() { Using CPython 3.12.[X] interpreter at: [PYTHON-3.12] Creating virtual environment at: .venv Activate with: source .venv/[BIN]/activate - "### + " ); context.venv.assert(predicates::path::is_dir()); @@ -387,7 +387,7 @@ fn create_venv_respects_pyproject_requires_python() -> Result<()> { let context = TestContext::new_with_versions(&["3.11", "3.9", "3.10", "3.12"]); // Without a Python requirement, we use the first on the PATH - uv_snapshot!(context.filters(), context.venv(), @r###" + uv_snapshot!(context.filters(), context.venv(), @" success: true exit_code: 0 ----- stdout ----- @@ -396,7 +396,7 @@ fn create_venv_respects_pyproject_requires_python() -> Result<()> { Using CPython 3.11.[X] interpreter at: [PYTHON-3.11] Creating virtual environment at: .venv Activate with: source .venv/[BIN]/activate - "### + " ); // With `requires-python = "<3.11"`, we prefer the first available version @@ -410,7 +410,7 @@ fn create_venv_respects_pyproject_requires_python() -> Result<()> { "# })?; - uv_snapshot!(context.filters(), context.venv().arg("--clear"), @r###" + uv_snapshot!(context.filters(), context.venv().arg("--clear"), @" success: true exit_code: 0 ----- stdout ----- @@ -419,7 +419,7 @@ fn create_venv_respects_pyproject_requires_python() -> Result<()> { Using CPython 3.9.[X] interpreter at: [PYTHON-3.9] Creating virtual environment at: .venv Activate with: source .venv/[BIN]/activate - "### + " ); // With `requires-python = "==3.11.*"`, we prefer exact version (3.11) @@ -433,7 +433,7 @@ fn create_venv_respects_pyproject_requires_python() -> Result<()> { "# })?; - uv_snapshot!(context.filters(), context.venv().arg("--clear"), @r###" + uv_snapshot!(context.filters(), context.venv().arg("--clear"), @" success: true exit_code: 0 ----- stdout ----- @@ -442,7 +442,7 @@ fn create_venv_respects_pyproject_requires_python() -> Result<()> { Using CPython 3.11.[X] interpreter at: [PYTHON-3.11] Creating virtual environment at: .venv Activate with: source .venv/[BIN]/activate - "### + " ); // With `requires-python = ">=3.11,<3.12"`, we prefer exact version (3.11) @@ -456,7 +456,7 @@ fn create_venv_respects_pyproject_requires_python() -> Result<()> { "# })?; - uv_snapshot!(context.filters(), context.venv().arg("--clear"), @r###" + uv_snapshot!(context.filters(), context.venv().arg("--clear"), @" success: true exit_code: 0 ----- stdout ----- @@ -465,7 +465,7 @@ fn create_venv_respects_pyproject_requires_python() -> Result<()> { Using CPython 3.11.[X] interpreter at: [PYTHON-3.11] Creating virtual environment at: .venv Activate with: source .venv/[BIN]/activate - "### + " ); // With `requires-python = ">=3.10"`, we prefer first compatible version (3.11) @@ -490,7 +490,7 @@ fn create_venv_respects_pyproject_requires_python() -> Result<()> { "# })?; - uv_snapshot!(context.filters(), context.venv().arg("--clear"), @r###" + uv_snapshot!(context.filters(), context.venv().arg("--clear"), @" success: true exit_code: 0 ----- stdout ----- @@ -499,7 +499,7 @@ fn create_venv_respects_pyproject_requires_python() -> Result<()> { Using CPython 3.11.[X] interpreter at: [PYTHON-3.11] Creating virtual environment at: .venv Activate with: source .venv/[BIN]/activate - "### + " ); // With `requires-python = ">3.11"`, we prefer first compatible version (3.11) @@ -513,7 +513,7 @@ fn create_venv_respects_pyproject_requires_python() -> Result<()> { "# })?; - uv_snapshot!(context.filters(), context.venv().arg("--clear"), @r###" + uv_snapshot!(context.filters(), context.venv().arg("--clear"), @" success: true exit_code: 0 ----- stdout ----- @@ -522,7 +522,7 @@ fn create_venv_respects_pyproject_requires_python() -> Result<()> { Using CPython 3.11.[X] interpreter at: [PYTHON-3.11] Creating virtual environment at: .venv Activate with: source .venv/[BIN]/activate - "### + " ); // With `requires-python = ">=3.12"`, we prefer first compatible version (3.12) @@ -536,7 +536,7 @@ fn create_venv_respects_pyproject_requires_python() -> Result<()> { "# })?; - uv_snapshot!(context.filters(), context.venv().arg("--clear"), @r###" + uv_snapshot!(context.filters(), context.venv().arg("--clear"), @" success: true exit_code: 0 ----- stdout ----- @@ -545,13 +545,13 @@ fn create_venv_respects_pyproject_requires_python() -> Result<()> { Using CPython 3.12.[X] interpreter at: [PYTHON-3.12] Creating virtual environment at: .venv Activate with: source .venv/[BIN]/activate - "### + " ); context.venv.assert(predicates::path::is_dir()); // We warn if we receive an incompatible version - uv_snapshot!(context.filters(), context.venv().arg("--clear").arg("--python").arg("3.11"), @r" + uv_snapshot!(context.filters(), context.venv().arg("--clear").arg("--python").arg("3.11"), @" success: true exit_code: 0 ----- stdout ----- @@ -572,7 +572,7 @@ fn create_venv_respects_group_requires_python() -> Result<()> { let context = TestContext::new_with_versions(&["3.9", "3.10", "3.11", "3.12"]); // Without a Python requirement, we use the first on the PATH - uv_snapshot!(context.filters(), context.venv(), @r" + uv_snapshot!(context.filters(), context.venv(), @" success: true exit_code: 0 ----- stdout ----- @@ -603,7 +603,7 @@ fn create_venv_respects_group_requires_python() -> Result<()> { "# })?; - uv_snapshot!(context.filters(), context.venv().arg("--clear"), @r" + uv_snapshot!(context.filters(), context.venv().arg("--clear"), @" success: true exit_code: 0 ----- stdout ----- @@ -636,7 +636,7 @@ fn create_venv_respects_group_requires_python() -> Result<()> { "# })?; - uv_snapshot!(context.filters(), context.venv().arg("--clear"), @r" + uv_snapshot!(context.filters(), context.venv().arg("--clear"), @" success: true exit_code: 0 ----- stdout ----- @@ -669,7 +669,7 @@ fn create_venv_respects_group_requires_python() -> Result<()> { "# })?; - uv_snapshot!(context.filters(), context.venv().arg("--clear"), @r" + uv_snapshot!(context.filters(), context.venv().arg("--clear"), @" success: true exit_code: 0 ----- stdout ----- @@ -697,7 +697,7 @@ fn create_venv_respects_group_requires_python() -> Result<()> { "# })?; - uv_snapshot!(context.filters(), context.venv().arg("--clear").arg("--python").arg("3.11"), @r" + uv_snapshot!(context.filters(), context.venv().arg("--clear").arg("--python").arg("3.11"), @" success: true exit_code: 0 ----- stdout ----- @@ -730,7 +730,7 @@ fn create_venv_respects_group_requires_python() -> Result<()> { "# })?; - uv_snapshot!(context.filters(), context.venv().arg("--clear").arg("--python").arg("3.11"), @r" + uv_snapshot!(context.filters(), context.venv().arg("--clear").arg("--python").arg("3.11"), @" success: false exit_code: 2 ----- stdout ----- @@ -752,7 +752,7 @@ fn create_venv_ignores_missing_pyproject_metadata() -> Result<()> { let pyproject_toml = context.temp_dir.child("pyproject.toml"); pyproject_toml.write_str(indoc! { r"[tool.no.project.here]" })?; - uv_snapshot!(context.filters(), context.venv(), @r###" + uv_snapshot!(context.filters(), context.venv(), @" success: true exit_code: 0 ----- stdout ----- @@ -761,7 +761,7 @@ fn create_venv_ignores_missing_pyproject_metadata() -> Result<()> { Using CPython 3.12.[X] interpreter at: [PYTHON-3.12] Creating virtual environment at: .venv Activate with: source .venv/[BIN]/activate - "### + " ); context.venv.assert(predicates::path::is_dir()); @@ -776,7 +776,7 @@ fn create_venv_warns_user_on_requires_python_discovery_error() -> Result<()> { let pyproject_toml = context.temp_dir.child("pyproject.toml"); pyproject_toml.write_str(indoc! { r"invalid toml" })?; - uv_snapshot!(context.filters(), context.venv(), @r" + uv_snapshot!(context.filters(), context.venv(), @" success: true exit_code: 0 ----- stdout ----- @@ -817,7 +817,7 @@ fn create_venv_explicit_request_takes_priority_over_python_version_file() { .write_str("3.12") .unwrap(); - uv_snapshot!(context.filters(), context.venv().arg("--python").arg("3.11"), @r###" + uv_snapshot!(context.filters(), context.venv().arg("--python").arg("3.11"), @" success: true exit_code: 0 ----- stdout ----- @@ -826,7 +826,7 @@ fn create_venv_explicit_request_takes_priority_over_python_version_file() { Using CPython 3.11.[X] interpreter at: [PYTHON-3.11] Creating virtual environment at: .venv Activate with: source .venv/[BIN]/activate - "### + " ); context.venv.assert(predicates::path::is_dir()); @@ -840,7 +840,7 @@ fn seed() { .arg(context.venv.as_os_str()) .arg("--seed") .arg("--python") - .arg("3.12"), @r###" + .arg("3.12"), @" success: true exit_code: 0 ----- stdout ----- @@ -850,7 +850,7 @@ fn seed() { Creating virtual environment with seed packages at: .venv + pip==24.0 Activate with: source .venv/[BIN]/activate - "### + " ); context.venv.assert(predicates::path::is_dir()); @@ -864,7 +864,7 @@ fn seed_older_python_version() { .arg(context.venv.as_os_str()) .arg("--seed") .arg("--python") - .arg("3.11"), @r###" + .arg("3.11"), @" success: true exit_code: 0 ----- stdout ----- @@ -876,7 +876,7 @@ fn seed_older_python_version() { + setuptools==69.2.0 + wheel==0.43.0 Activate with: source .venv/[BIN]/activate - "### + " ); context.venv.assert(predicates::path::is_dir()); @@ -888,14 +888,14 @@ fn create_venv_with_invalid_http_timeout() { uv_snapshot!(context.filters(), context.venv() .arg(context.venv.as_os_str()) .arg("--python") - .arg("3.12"), @r###" + .arg("3.12"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: Failed to parse environment variable `UV_HTTP_TIMEOUT` with invalid value `not_a_number`: invalid digit found in string - "###); + "); } #[test] @@ -904,14 +904,14 @@ fn create_venv_with_invalid_concurrent_installs() { uv_snapshot!(context.filters(), context.venv() .arg(context.venv.as_os_str()) .arg("--python") - .arg("3.12"), @r###" + .arg("3.12"), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: Failed to parse environment variable `UV_CONCURRENT_INSTALLS` with invalid value `0`: number would be zero for non-zero type - "###); + "); } #[test] @@ -927,7 +927,7 @@ fn create_venv_unknown_python_minor() { // Unset this variable to force what the user would see .env_remove(EnvVars::UV_TEST_PYTHON_PATH); - uv_snapshot!(context.filters(), &mut command, @r" + uv_snapshot!(context.filters(), &mut command, @" success: false exit_code: 2 ----- stdout ----- @@ -953,7 +953,7 @@ fn create_venv_unknown_python_patch() { // Unset this variable to force what the user would see .env_remove(EnvVars::UV_TEST_PYTHON_PATH); - uv_snapshot!(context.filters(), &mut command, @r" + uv_snapshot!(context.filters(), &mut command, @" success: false exit_code: 2 ----- stdout ----- @@ -999,7 +999,7 @@ fn file_exists() -> Result<()> { uv_snapshot!(context.filters(), context.venv() .arg(context.venv.as_os_str()) .arg("--python") - .arg("3.12"), @r" + .arg("3.12"), @" success: false exit_code: 2 ----- stdout ----- @@ -1024,7 +1024,7 @@ fn empty_dir_exists() -> Result<()> { uv_snapshot!(context.filters(), context.venv() .arg(context.venv.as_os_str()) .arg("--python") - .arg("3.12"), @r###" + .arg("3.12"), @" success: true exit_code: 0 ----- stdout ----- @@ -1033,7 +1033,7 @@ fn empty_dir_exists() -> Result<()> { Using CPython 3.12.[X] interpreter at: [PYTHON-3.12] Creating virtual environment at: .venv Activate with: source .venv/[BIN]/activate - "### + " ); context.venv.assert(predicates::path::is_dir()); @@ -1053,7 +1053,7 @@ fn non_empty_dir_exists() -> Result<()> { uv_snapshot!(context.filters(), context.venv() .arg(context.venv.as_os_str()) .arg("--python") - .arg("3.12"), @r" + .arg("3.12"), @" success: false exit_code: 2 ----- stdout ----- @@ -1071,7 +1071,7 @@ fn non_empty_dir_exists() -> Result<()> { .arg(context.venv.as_os_str()) .arg("--clear") .arg("--python") - .arg("3.12"), @r" + .arg("3.12"), @" success: true exit_code: 0 ----- stdout ----- @@ -1098,7 +1098,7 @@ fn non_empty_dir_exists_allow_existing() -> Result<()> { uv_snapshot!(context.filters(), context.venv() .arg(context.venv.as_os_str()) .arg("--python") - .arg("3.12"), @r" + .arg("3.12"), @" success: false exit_code: 2 ----- stdout ----- @@ -1117,7 +1117,7 @@ fn non_empty_dir_exists_allow_existing() -> Result<()> { .arg(context.venv.as_os_str()) .arg("--allow-existing") .arg("--python") - .arg("3.12"), @r###" + .arg("3.12"), @" success: true exit_code: 0 ----- stdout ----- @@ -1126,7 +1126,7 @@ fn non_empty_dir_exists_allow_existing() -> Result<()> { Using CPython 3.12.[X] interpreter at: [PYTHON-3.12] Creating virtual environment at: .venv Activate with: source .venv/[BIN]/activate - "### + " ); // Running again should _also_ succeed, overwriting existing symlinks and respecting existing @@ -1135,7 +1135,7 @@ fn non_empty_dir_exists_allow_existing() -> Result<()> { .arg(context.venv.as_os_str()) .arg("--allow-existing") .arg("--python") - .arg("3.12"), @r###" + .arg("3.12"), @" success: true exit_code: 0 ----- stdout ----- @@ -1144,7 +1144,7 @@ fn non_empty_dir_exists_allow_existing() -> Result<()> { Using CPython 3.12.[X] interpreter at: [PYTHON-3.12] Creating virtual environment at: .venv Activate with: source .venv/[BIN]/activate - "### + " ); Ok(()) @@ -1156,7 +1156,7 @@ fn create_venv_then_allow_existing() { let context = TestContext::new_with_versions(&["3.12"]); // Create a venv - uv_snapshot!(context.filters(), context.venv(), @r" + uv_snapshot!(context.filters(), context.venv(), @" success: true exit_code: 0 ----- stdout ----- @@ -1170,7 +1170,7 @@ fn create_venv_then_allow_existing() { // Create a venv again with `--allow-existing` uv_snapshot!(context.filters(), context.venv() - .arg("--allow-existing"), @r###" + .arg("--allow-existing"), @" success: true exit_code: 0 ----- stdout ----- @@ -1179,7 +1179,7 @@ fn create_venv_then_allow_existing() { Using CPython 3.12.[X] interpreter at: [PYTHON-3.12] Creating virtual environment at: .venv Activate with: source .venv/[BIN]/activate - "### + " ); } @@ -1403,7 +1403,7 @@ fn create_venv_apostrophe() { uv_snapshot!(context.filters(), context.venv() .arg(&venv_dir) .arg("--python") - .arg("3.12"), @r###" + .arg("3.12"), @" success: true exit_code: 0 ----- stdout ----- @@ -1412,7 +1412,7 @@ fn create_venv_apostrophe() { Using CPython 3.12.[X] interpreter at: [PYTHON-3.12] Creating virtual environment at: Testing's Activate with: source Testing's/[BIN]/activate - "### + " ); // One of them should be commonly available on a linux developer machine, if not, we have to @@ -1446,7 +1446,7 @@ fn venv_python_preference() { TestContext::new_with_versions(&["3.12", "3.11"]).with_versions_as_managed(&["3.12"]); // Create a managed interpreter environment - uv_snapshot!(context.filters(), context.venv(), @r" + uv_snapshot!(context.filters(), context.venv(), @" success: true exit_code: 0 ----- stdout ----- @@ -1457,7 +1457,7 @@ fn venv_python_preference() { Activate with: source .venv/[BIN]/activate "); - uv_snapshot!(context.filters(), context.venv().arg("--no-managed-python"), @r" + uv_snapshot!(context.filters(), context.venv().arg("--no-managed-python"), @" success: true exit_code: 0 ----- stdout ----- @@ -1469,7 +1469,7 @@ fn venv_python_preference() { Activate with: source .venv/[BIN]/activate "); - uv_snapshot!(context.filters(), context.venv().arg("--no-managed-python"), @r" + uv_snapshot!(context.filters(), context.venv().arg("--no-managed-python"), @" success: true exit_code: 0 ----- stdout ----- @@ -1481,7 +1481,7 @@ fn venv_python_preference() { Activate with: source .venv/[BIN]/activate "); - uv_snapshot!(context.filters(), context.venv(), @r" + uv_snapshot!(context.filters(), context.venv(), @" success: true exit_code: 0 ----- stdout ----- @@ -1493,7 +1493,7 @@ fn venv_python_preference() { Activate with: source .venv/[BIN]/activate "); - uv_snapshot!(context.filters(), context.venv().arg("--managed-python"), @r" + uv_snapshot!(context.filters(), context.venv().arg("--managed-python"), @" success: true exit_code: 0 ----- stdout ----- @@ -1526,7 +1526,7 @@ fn create_venv_symlink_clear_preservation() -> Result<()> { uv_snapshot!(context.filters(), context.venv() .arg(symlink_path.as_os_str()) .arg("--python") - .arg("3.12"), @r###" + .arg("3.12"), @" success: true exit_code: 0 ----- stdout ----- @@ -1535,7 +1535,7 @@ fn create_venv_symlink_clear_preservation() -> Result<()> { Using CPython 3.12.[X] interpreter at: [PYTHON-3.12] Creating virtual environment at: .venv Activate with: source .venv/[BIN]/activate - "### + " ); // Verify symlink is still preserved after creation @@ -1546,7 +1546,7 @@ fn create_venv_symlink_clear_preservation() -> Result<()> { .arg(symlink_path.as_os_str()) .arg("--clear") .arg("--python") - .arg("3.12"), @r###" + .arg("3.12"), @" success: true exit_code: 0 ----- stdout ----- @@ -1555,7 +1555,7 @@ fn create_venv_symlink_clear_preservation() -> Result<()> { Using CPython 3.12.[X] interpreter at: [PYTHON-3.12] Creating virtual environment at: .venv Activate with: source .venv/[BIN]/activate - "### + " ); // Verify symlink is STILL preserved after --clear @@ -1584,7 +1584,7 @@ fn create_venv_symlink_recreate_preservation() -> Result<()> { uv_snapshot!(context.filters(), context.venv() .arg(symlink_path.as_os_str()) .arg("--python") - .arg("3.12"), @r###" + .arg("3.12"), @" success: true exit_code: 0 ----- stdout ----- @@ -1593,7 +1593,7 @@ fn create_venv_symlink_recreate_preservation() -> Result<()> { Using CPython 3.12.[X] interpreter at: [PYTHON-3.12] Creating virtual environment at: .venv Activate with: source .venv/[BIN]/activate - "### + " ); // Verify symlink is preserved after first creation @@ -1603,7 +1603,7 @@ fn create_venv_symlink_recreate_preservation() -> Result<()> { uv_snapshot!(context.filters(), context.venv() .arg(symlink_path.as_os_str()) .arg("--python") - .arg("3.12"), @r###" + .arg("3.12"), @" success: true exit_code: 0 ----- stdout ----- @@ -1613,7 +1613,7 @@ fn create_venv_symlink_recreate_preservation() -> Result<()> { Creating virtual environment at: .venv warning: A virtual environment already exists at `.venv`. In the future, uv will require `--clear` to replace it Activate with: source .venv/[BIN]/activate - "### + " ); // Verify symlink is STILL preserved after recreation @@ -1647,7 +1647,7 @@ fn create_venv_nested_symlink_preservation() -> Result<()> { uv_snapshot!(context.filters(), context.venv() .arg(symlink_path.as_os_str()) .arg("--python") - .arg("3.12"), @r###" + .arg("3.12"), @" success: true exit_code: 0 ----- stdout ----- @@ -1656,7 +1656,7 @@ fn create_venv_nested_symlink_preservation() -> Result<()> { Using CPython 3.12.[X] interpreter at: [PYTHON-3.12] Creating virtual environment at: .venv Activate with: source .venv/[BIN]/activate - "### + " ); // Verify both symlinks are preserved @@ -1667,7 +1667,7 @@ fn create_venv_nested_symlink_preservation() -> Result<()> { uv_snapshot!(context.filters(), context.venv() .arg(symlink_path.as_os_str()) .arg("--python") - .arg("3.12"), @r###" + .arg("3.12"), @" success: true exit_code: 0 ----- stdout ----- @@ -1677,7 +1677,7 @@ fn create_venv_nested_symlink_preservation() -> Result<()> { Creating virtual environment at: .venv warning: A virtual environment already exists at `.venv`. In the future, uv will require `--clear` to replace it Activate with: source .venv/[BIN]/activate - "### + " ); // Verify nested symlinks are STILL preserved @@ -1696,7 +1696,7 @@ fn create_venv_current_working_directory() { uv_snapshot!(context.filters(), context.venv() .arg(context.venv.as_os_str()) .arg("--python") - .arg("3.12"), @r" + .arg("3.12"), @" success: true exit_code: 0 ----- stdout ----- @@ -1713,7 +1713,7 @@ fn create_venv_current_working_directory() { .arg("--clear") .arg("--python") .arg("3.12") - .current_dir(&context.venv), @r" + .current_dir(&context.venv), @" success: true exit_code: 0 ----- stdout ----- @@ -1777,7 +1777,7 @@ fn no_clear_with_existing_directory() { uv_snapshot!(context.filters(), context.venv() .arg(context.venv.as_os_str()) .arg("--python") - .arg("3.12"), @r###" + .arg("3.12"), @" success: true exit_code: 0 ----- stdout ----- @@ -1786,7 +1786,7 @@ fn no_clear_with_existing_directory() { Using CPython 3.12.[X] interpreter at: [PYTHON-3.12] Creating virtual environment at: .venv Activate with: source .venv/[BIN]/activate - "### + " ); // Try to create again with --no-clear (should fail) @@ -1794,7 +1794,7 @@ fn no_clear_with_existing_directory() { .arg(context.venv.as_os_str()) .arg("--no-clear") .arg("--python") - .arg("3.12"), @r" + .arg("3.12"), @" success: false exit_code: 2 ----- stdout ----- @@ -1819,7 +1819,7 @@ fn no_clear_with_non_existent_directory() { .arg(context.venv.as_os_str()) .arg("--no-clear") .arg("--python") - .arg("3.12"), @r###" + .arg("3.12"), @" success: true exit_code: 0 ----- stdout ----- @@ -1828,7 +1828,7 @@ fn no_clear_with_non_existent_directory() { Using CPython 3.12.[X] interpreter at: [PYTHON-3.12] Creating virtual environment at: .venv Activate with: source .venv/[BIN]/activate - "### + " ); context.venv.assert(predicates::path::is_dir()); @@ -1848,7 +1848,7 @@ fn no_clear_overrides_clear() { .arg("--clear") .arg("--no-clear") .arg("--python") - .arg("3.12"), @r" + .arg("3.12"), @" success: false exit_code: 2 ----- stdout ----- @@ -1874,7 +1874,7 @@ fn no_clear_conflicts_with_allow_existing() { .arg("--no-clear") .arg("--allow-existing") .arg("--python") - .arg("3.12"), @r" + .arg("3.12"), @" success: false exit_code: 2 ----- stdout ----- diff --git a/crates/uv/tests/it/version.rs b/crates/uv/tests/it/version.rs index a7fe58f9a..430a81c8e 100644 --- a/crates/uv/tests/it/version.rs +++ b/crates/uv/tests/it/version.rs @@ -22,7 +22,7 @@ fn version_get() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.version(), @r" + uv_snapshot!(context.filters(), context.version(), @" success: true exit_code: 0 ----- stdout ----- @@ -35,6 +35,7 @@ fn version_get() -> Result<()> { assert_snapshot!( pyproject, @r#" + [project] name = "myproject" version = "1.10.31" @@ -77,6 +78,7 @@ fn version_get_json() -> Result<()> { assert_snapshot!( pyproject, @r#" + [project] name = "myproject" version = "1.10.31" @@ -102,7 +104,7 @@ fn version_get_short() -> Result<()> { )?; uv_snapshot!(context.filters(), context.version() - .arg("--short"), @r" + .arg("--short"), @" success: true exit_code: 0 ----- stdout ----- @@ -115,6 +117,7 @@ fn version_get_short() -> Result<()> { assert_snapshot!( pyproject, @r#" + [project] name = "myproject" version = "1.10.31" @@ -141,7 +144,7 @@ requires-python = ">=3.12" )?; uv_snapshot!(context.filters(), context.version() - .arg("1.1.1"), @r" + .arg("1.1.1"), @" success: true exit_code: 0 ----- stdout ----- @@ -155,12 +158,13 @@ requires-python = ">=3.12" let pyproject = fs_err::read_to_string(&pyproject_toml)?; assert_snapshot!( pyproject, - @r###" + @r#" + [project] name = "myproject" version = "1.1.1" requires-python = ">=3.12" - "### + "# ); Ok(()) @@ -183,7 +187,7 @@ requires-python = ">=3.12" uv_snapshot!(context.filters(), context.version() .arg("1.1.1") - .arg("--short"), @r" + .arg("--short"), @" success: true exit_code: 0 ----- stdout ----- @@ -197,12 +201,13 @@ requires-python = ">=3.12" let pyproject = fs_err::read_to_string(&pyproject_toml)?; assert_snapshot!( pyproject, - @r###" + @r#" + [project] name = "myproject" version = "1.1.1" requires-python = ">=3.12" - "### + "# ); Ok(()) @@ -224,7 +229,7 @@ requires-python = ">=3.12" )?; uv_snapshot!(context.filters(), context.version() - .arg("--bump").arg("patch"), @r" + .arg("--bump").arg("patch"), @" success: true exit_code: 0 ----- stdout ----- @@ -239,6 +244,7 @@ requires-python = ">=3.12" assert_snapshot!( pyproject, @r#" + [project] name = "myproject" version = "1.10.32" @@ -263,7 +269,7 @@ requires-python = ">=3.12" )?; uv_snapshot!(context.filters(), context.version() - .arg("--bump").arg("patch=40"), @r" + .arg("--bump").arg("patch=40"), @" success: true exit_code: 0 ----- stdout ----- @@ -278,6 +284,7 @@ requires-python = ">=3.12" assert_snapshot!( pyproject, @r#" + [project] name = "myproject" version = "1.10.40" @@ -302,7 +309,7 @@ requires-python = ">=3.12" )?; uv_snapshot!(context.filters(), context.version() - .arg("--bump").arg("minor=10"), @r" + .arg("--bump").arg("minor=10"), @" success: true exit_code: 0 ----- stdout ----- @@ -317,6 +324,7 @@ requires-python = ">=3.12" assert_snapshot!( pyproject, @r#" + [project] name = "myproject" version = "1.10.0" @@ -341,7 +349,7 @@ requires-python = ">=3.12" )?; uv_snapshot!(context.filters(), context.version() - .arg("--bump").arg("major=7"), @r" + .arg("--bump").arg("major=7"), @" success: true exit_code: 0 ----- stdout ----- @@ -356,6 +364,7 @@ requires-python = ">=3.12" assert_snapshot!( pyproject, @r#" + [project] name = "myproject" version = "7.0.0" @@ -382,7 +391,7 @@ requires-python = ">=3.12" uv_snapshot!(context.filters(), context.version() .arg("--bump").arg("patch") - .arg("--short"), @r" + .arg("--short"), @" success: true exit_code: 0 ----- stdout ----- @@ -397,6 +406,7 @@ requires-python = ">=3.12" assert_snapshot!( pyproject, @r#" + [project] name = "myproject" version = "1.10.32" @@ -421,7 +431,7 @@ requires-python = ">=3.12" )?; uv_snapshot!(context.filters(), context.version() - .arg("--bump").arg("patch=11"), @r" + .arg("--bump").arg("patch=11"), @" success: false exit_code: 2 ----- stdout ----- @@ -434,6 +444,7 @@ requires-python = ">=3.12" assert_snapshot!( pyproject, @r#" + [project] name = "myproject" version = "0.0.12" @@ -474,14 +485,15 @@ fn version_bump_preserves_preceding_comments() -> Result<()> { assert_snapshot!( pyproject, @r#" - [project] - name = "hello-world" - # pre-1: stays above version - # pre-2: stays below pre-1 - version = "0.1.1" # eol: stays on same line - # after-version: remains after version - description = "Add your description here" - "# + + [project] + name = "hello-world" + # pre-1: stays above version + # pre-2: stays below pre-1 + version = "0.1.1" # eol: stays on same line + # after-version: remains after version + description = "Add your description here" + "# ); Ok(()) @@ -503,7 +515,7 @@ requires-python = ">=3.12" )?; uv_snapshot!(context.filters(), context.version() - .arg("--bump").arg("minor"), @r" + .arg("--bump").arg("minor"), @" success: true exit_code: 0 ----- stdout ----- @@ -518,6 +530,7 @@ requires-python = ">=3.12" assert_snapshot!( pyproject, @r#" + [project] name = "myproject" version = "1.11.0" @@ -543,7 +556,7 @@ requires-python = ">=3.12" )?; uv_snapshot!(context.filters(), context.version() - .arg("--bump").arg("major"), @r" + .arg("--bump").arg("major"), @" success: true exit_code: 0 ----- stdout ----- @@ -558,6 +571,7 @@ requires-python = ">=3.12" assert_snapshot!( pyproject, @r#" + [project] name = "myproject" version = "2.0.0" @@ -583,7 +597,7 @@ requires-python = ">=3.12" )?; uv_snapshot!(context.filters(), context.version() - .arg("--bump").arg("patch"), @r" + .arg("--bump").arg("patch"), @" success: true exit_code: 0 ----- stdout ----- @@ -598,6 +612,7 @@ requires-python = ">=3.12" assert_snapshot!( pyproject, @r#" + [project] name = "myproject" version = "0.1.1" @@ -623,7 +638,7 @@ requires-python = ">=3.12" )?; uv_snapshot!(context.filters(), context.version() - .arg("--bump").arg("minor"), @r" + .arg("--bump").arg("minor"), @" success: true exit_code: 0 ----- stdout ----- @@ -638,6 +653,7 @@ requires-python = ">=3.12" assert_snapshot!( pyproject, @r#" + [project] name = "myproject" version = "0.2" @@ -663,7 +679,7 @@ requires-python = ">=3.12" )?; uv_snapshot!(context.filters(), context.version() - .arg("--bump").arg("major"), @r" + .arg("--bump").arg("major"), @" success: true exit_code: 0 ----- stdout ----- @@ -678,6 +694,7 @@ requires-python = ">=3.12" assert_snapshot!( pyproject, @r#" + [project] name = "myproject" version = "1.0" @@ -703,7 +720,7 @@ requires-python = ">=3.12" )?; uv_snapshot!(context.filters(), context.version() - .arg("--bump").arg("major"), @r" + .arg("--bump").arg("major"), @" success: true exit_code: 0 ----- stdout ----- @@ -718,6 +735,7 @@ requires-python = ">=3.12" assert_snapshot!( pyproject, @r#" + [project] name = "myproject" version = "2.0.0" @@ -743,7 +761,7 @@ requires-python = ">=3.12" )?; uv_snapshot!(context.filters(), context.version() - .arg("--bump").arg("major"), @r" + .arg("--bump").arg("major"), @" success: true exit_code: 0 ----- stdout ----- @@ -758,6 +776,7 @@ requires-python = ">=3.12" assert_snapshot!( pyproject, @r#" + [project] name = "myproject" version = "1!3+deadbeef6" @@ -793,7 +812,7 @@ requires-python = ">=3.12" .arg("--bump").arg("dev") .arg("--bump").arg("minor") .arg("--bump").arg("post") - .arg("--bump").arg("post"), @r" + .arg("--bump").arg("post"), @" success: false exit_code: 2 ----- stdout ----- @@ -806,6 +825,7 @@ requires-python = ">=3.12" assert_snapshot!( pyproject, @r#" + [project] name = "myproject" version = "9!2.3.4a5.post6.dev7+deadbeef6" @@ -831,7 +851,7 @@ requires-python = ">=3.12" )?; uv_snapshot!(context.filters(), context.version() - .arg("--bump").arg("stable"), @r" + .arg("--bump").arg("stable"), @" success: true exit_code: 0 ----- stdout ----- @@ -846,6 +866,7 @@ requires-python = ">=3.12" assert_snapshot!( pyproject, @r#" + [project] name = "myproject" version = "9!2.3.4+deadbeef6" @@ -871,7 +892,7 @@ requires-python = ">=3.12" )?; uv_snapshot!(context.filters(), context.version() - .arg("--bump").arg("alpha"), @r" + .arg("--bump").arg("alpha"), @" success: true exit_code: 0 ----- stdout ----- @@ -886,6 +907,7 @@ requires-python = ">=3.12" assert_snapshot!( pyproject, @r#" + [project] name = "myproject" version = "9!2.3.4a6+deadbeef6" @@ -911,7 +933,7 @@ requires-python = ">=3.12" )?; uv_snapshot!(context.filters(), context.version() - .arg("--bump").arg("beta"), @r" + .arg("--bump").arg("beta"), @" success: true exit_code: 0 ----- stdout ----- @@ -926,6 +948,7 @@ requires-python = ">=3.12" assert_snapshot!( pyproject, @r#" + [project] name = "myproject" version = "9!2.3.4b1+deadbeef6" @@ -950,7 +973,7 @@ requires-python = ">=3.12" )?; uv_snapshot!(context.filters(), context.version() - .arg("--bump").arg("beta=42"), @r" + .arg("--bump").arg("beta=42"), @" success: true exit_code: 0 ----- stdout ----- @@ -965,6 +988,7 @@ requires-python = ">=3.12" assert_snapshot!( pyproject, @r#" + [project] name = "myproject" version = "1.2.3b42" @@ -990,7 +1014,7 @@ requires-python = ">=3.12" uv_snapshot!(context.filters(), context.version() .arg("--bump").arg("beta=5") - .arg("--bump").arg("patch"), @r" + .arg("--bump").arg("patch"), @" success: true exit_code: 0 ----- stdout ----- @@ -1005,6 +1029,7 @@ requires-python = ">=3.12" assert_snapshot!( pyproject, @r#" + [project] name = "myproject" version = "1.2.4b5" @@ -1030,7 +1055,7 @@ requires-python = ">=3.12" )?; uv_snapshot!(context.filters(), context.version() - .arg("--bump").arg("rc"), @r" + .arg("--bump").arg("rc"), @" success: true exit_code: 0 ----- stdout ----- @@ -1045,6 +1070,7 @@ requires-python = ">=3.12" assert_snapshot!( pyproject, @r#" + [project] name = "myproject" version = "9!2.3.4rc1+deadbeef6" @@ -1070,7 +1096,7 @@ requires-python = ">=3.12" )?; uv_snapshot!(context.filters(), context.version() - .arg("--bump").arg("post"), @r" + .arg("--bump").arg("post"), @" success: true exit_code: 0 ----- stdout ----- @@ -1085,6 +1111,7 @@ requires-python = ">=3.12" assert_snapshot!( pyproject, @r#" + [project] name = "myproject" version = "9!2.3.4a5.post7+deadbeef6" @@ -1109,7 +1136,7 @@ requires-python = ">=3.12" )?; uv_snapshot!(context.filters(), context.version() - .arg("--bump").arg("post=10"), @r" + .arg("--bump").arg("post=10"), @" success: true exit_code: 0 ----- stdout ----- @@ -1124,6 +1151,7 @@ requires-python = ">=3.12" assert_snapshot!( pyproject, @r#" + [project] name = "myproject" version = "1.2.3.post10" @@ -1149,7 +1177,7 @@ requires-python = ">=3.12" )?; uv_snapshot!(context.filters(), context.version() - .arg("--bump").arg("dev"), @r" + .arg("--bump").arg("dev"), @" success: true exit_code: 0 ----- stdout ----- @@ -1164,6 +1192,7 @@ requires-python = ">=3.12" assert_snapshot!( pyproject, @r#" + [project] name = "myproject" version = "9!2.3.4a5.post6.dev8+deadbeef6" @@ -1188,7 +1217,7 @@ requires-python = ">=3.12" )?; uv_snapshot!(context.filters(), context.version() - .arg("--bump").arg("dev=42"), @r" + .arg("--bump").arg("dev=42"), @" success: true exit_code: 0 ----- stdout ----- @@ -1203,6 +1232,7 @@ requires-python = ">=3.12" assert_snapshot!( pyproject, @r#" + [project] name = "myproject" version = "0.1.0.dev42" @@ -1228,7 +1258,7 @@ requires-python = ">=3.12" uv_snapshot!(context.filters(), context.version() .arg("--bump").arg("patch") - .arg("--bump").arg("dev=66463664"), @r" + .arg("--bump").arg("dev=66463664"), @" success: true exit_code: 0 ----- stdout ----- @@ -1243,6 +1273,7 @@ requires-python = ">=3.12" assert_snapshot!( pyproject, @r#" + [project] name = "myproject" version = "0.0.2.dev66463664" @@ -1268,7 +1299,7 @@ requires-python = ">=3.12" uv_snapshot!(context.filters(), context.version() .arg("--bump").arg("dev=0") - .arg("--bump").arg("patch=10"), @r" + .arg("--bump").arg("patch=10"), @" success: true exit_code: 0 ----- stdout ----- @@ -1283,6 +1314,7 @@ requires-python = ">=3.12" assert_snapshot!( pyproject, @r#" + [project] name = "myproject" version = "0.1.10.dev0" @@ -1308,7 +1340,7 @@ requires-python = ">=3.12" )?; uv_snapshot!(context.filters(), context.version() - .arg("--bump").arg("major"), @r" + .arg("--bump").arg("major"), @" success: true exit_code: 0 ----- stdout ----- @@ -1323,6 +1355,7 @@ requires-python = ">=3.12" assert_snapshot!( pyproject, @r#" + [project] name = "myproject" version = "2.0.0" @@ -1347,7 +1380,7 @@ requires-python = ">=3.12" )?; uv_snapshot!(context.filters(), context.version() - .arg("--bump").arg("stable=1"), @r" + .arg("--bump").arg("stable=1"), @" success: false exit_code: 2 ----- stdout ----- @@ -1373,7 +1406,7 @@ requires-python = ">=3.12" )?; uv_snapshot!(context.filters(), context.version() - .arg("--bump").arg("patch="), @r" + .arg("--bump").arg("patch="), @" success: false exit_code: 2 ----- stdout ----- @@ -1399,7 +1432,7 @@ requires-python = ">=3.12" )?; uv_snapshot!(context.filters(), context.version() - .arg("--bump").arg("dev=foo"), @r" + .arg("--bump").arg("dev=foo"), @" success: false exit_code: 2 ----- stdout ----- @@ -1426,7 +1459,7 @@ requires-python = ">=3.12" )?; uv_snapshot!(context.filters(), context.version() - .arg("--bump").arg("stable"), @r" + .arg("--bump").arg("stable"), @" success: false exit_code: 2 ----- stdout ----- @@ -1453,7 +1486,7 @@ requires-python = ">=3.12" )?; uv_snapshot!(context.filters(), context.version() - .arg("--bump").arg("alpha"), @r" + .arg("--bump").arg("alpha"), @" success: false exit_code: 2 ----- stdout ----- @@ -1480,7 +1513,7 @@ requires-python = ">=3.12" )?; uv_snapshot!(context.filters(), context.version() - .arg("--bump").arg("alpha"), @r" + .arg("--bump").arg("alpha"), @" success: false exit_code: 2 ----- stdout ----- @@ -1508,7 +1541,7 @@ requires-python = ">=3.12" uv_snapshot!(context.filters(), context.version() .arg("--bump").arg("major") - .arg("--bump").arg("major"), @r" + .arg("--bump").arg("major"), @" success: false exit_code: 2 ----- stdout ----- @@ -1536,7 +1569,7 @@ requires-python = ">=3.12" uv_snapshot!(context.filters(), context.version() .arg("--bump").arg("alpha") - .arg("--bump").arg("alpha"), @r" + .arg("--bump").arg("alpha"), @" success: false exit_code: 2 ----- stdout ----- @@ -1564,7 +1597,7 @@ requires-python = ">=3.12" uv_snapshot!(context.filters(), context.version() .arg("--bump").arg("stable") - .arg("--bump").arg("major"), @r" + .arg("--bump").arg("major"), @" success: false exit_code: 2 ----- stdout ----- @@ -1592,7 +1625,7 @@ requires-python = ">=3.12" uv_snapshot!(context.filters(), context.version() .arg("--bump").arg("major") - .arg("--bump").arg("alpha"), @r" + .arg("--bump").arg("alpha"), @" success: true exit_code: 0 ----- stdout ----- @@ -1622,7 +1655,7 @@ requires-python = ">=3.12" uv_snapshot!(context.filters(), context.version() .arg("--bump").arg("major") - .arg("--bump").arg("alpha"), @r" + .arg("--bump").arg("alpha"), @" success: true exit_code: 0 ----- stdout ----- @@ -1652,7 +1685,7 @@ requires-python = ">=3.12" uv_snapshot!(context.filters(), context.version() .arg("--bump").arg("alpha") - .arg("--bump").arg("dev"), @r" + .arg("--bump").arg("dev"), @" success: false exit_code: 2 ----- stdout ----- @@ -1680,7 +1713,7 @@ requires-python = ">=3.12" uv_snapshot!(context.filters(), context.version() .arg("--bump").arg("major") - .arg("--bump").arg("dev"), @r" + .arg("--bump").arg("dev"), @" success: true exit_code: 0 ----- stdout ----- @@ -1710,7 +1743,7 @@ requires-python = ">=3.12" uv_snapshot!(context.filters(), context.version() .arg("--bump").arg("major") - .arg("--bump").arg("post"), @r" + .arg("--bump").arg("post"), @" success: false exit_code: 2 ----- stdout ----- @@ -1738,7 +1771,7 @@ requires-python = ">=3.12" uv_snapshot!(context.filters(), context.version() .arg("1.2.3") - .arg("--dry-run"), @r" + .arg("--dry-run"), @" success: true exit_code: 0 ----- stdout ----- @@ -1751,6 +1784,7 @@ requires-python = ">=3.12" assert_snapshot!( pyproject, @r#" + [project] name = "myproject" version = "1.10.31" @@ -1777,7 +1811,7 @@ requires-python = ">=3.12" uv_snapshot!(context.filters(), context.version() .arg("--bump").arg("major") - .arg("--dry-run"), @r" + .arg("--dry-run"), @" success: true exit_code: 0 ----- stdout ----- @@ -1790,6 +1824,7 @@ requires-python = ">=3.12" assert_snapshot!( pyproject, @r#" + [project] name = "myproject" version = "1.10.31" @@ -1815,7 +1850,7 @@ requires-python = ">=3.12" )?; uv_snapshot!(context.filters(), context.version() - .arg("abcd"), @r" + .arg("abcd"), @" success: false exit_code: 2 ----- stdout ----- @@ -1828,6 +1863,7 @@ requires-python = ">=3.12" assert_snapshot!( pyproject, @r#" + [project] name = "myproject" version = "1.10.31" @@ -1853,7 +1889,7 @@ requires-python = ">=3.12" )?; uv_snapshot!(context.filters(), context.version() - .arg("minor"), @r" + .arg("minor"), @" success: false exit_code: 2 ----- stdout ----- @@ -1866,6 +1902,7 @@ requires-python = ">=3.12" assert_snapshot!( pyproject, @r#" + [project] name = "myproject" version = "1.10.31" @@ -1890,7 +1927,7 @@ fn version_get_dynamic() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.version(), @r" + uv_snapshot!(context.filters(), context.version(), @" success: false exit_code: 2 ----- stdout ----- @@ -1903,6 +1940,7 @@ fn version_get_dynamic() -> Result<()> { assert_snapshot!( pyproject, @r#" + [project] name = "myproject" dynamic = ["version"] @@ -1928,7 +1966,7 @@ fn version_set_dynamic() -> Result<()> { )?; uv_snapshot!(context.filters(), context.version() - .arg("0.1.2"), @r" + .arg("0.1.2"), @" success: false exit_code: 2 ----- stdout ----- @@ -1941,6 +1979,7 @@ fn version_set_dynamic() -> Result<()> { assert_snapshot!( pyproject, @r#" + [project] name = "myproject" dynamic = ["version"] @@ -1968,7 +2007,7 @@ fn version_get_fallback_unmanaged() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.version(), @r" + uv_snapshot!(context.filters(), context.version(), @" success: false exit_code: 2 ----- stdout ----- @@ -1981,6 +2020,7 @@ fn version_get_fallback_unmanaged() -> Result<()> { assert_snapshot!( pyproject, @r#" + [project] name = "myapp" version = "0.1.2" @@ -2018,7 +2058,7 @@ fn version_get_fallback_unmanaged_short() -> Result<()> { )]) .collect::>(); uv_snapshot!(filters, context.version() - .arg("--short"), @r" + .arg("--short"), @" success: false exit_code: 2 ----- stdout ----- @@ -2031,6 +2071,7 @@ fn version_get_fallback_unmanaged_short() -> Result<()> { assert_snapshot!( pyproject, @r#" + [project] name = "myapp" version = "0.1.2" @@ -2077,7 +2118,7 @@ fn version_get_fallback_unmanaged_strict() -> Result<()> { )?; uv_snapshot!(context.filters(), context.version() - .arg("--project").arg("."), @r" + .arg("--project").arg("."), @" success: false exit_code: 2 ----- stdout ----- @@ -2090,6 +2131,7 @@ fn version_get_fallback_unmanaged_strict() -> Result<()> { assert_snapshot!( pyproject, @r#" + [project] name = "myapp" version = "0.1.2" @@ -2108,7 +2150,7 @@ fn version_get_fallback_missing_strict() -> Result<()> { let context = TestContext::new("3.12"); uv_snapshot!(context.filters(), context.version() - .arg("--project").arg("."), @r" + .arg("--project").arg("."), @" success: false exit_code: 2 ----- stdout ----- @@ -2125,7 +2167,7 @@ fn version_get_fallback_missing_strict() -> Result<()> { fn version_get_missing_with_hint() -> Result<()> { let context = TestContext::new("3.12"); - uv_snapshot!(context.filters(), context.version(), @r" + uv_snapshot!(context.filters(), context.version(), @" success: false exit_code: 2 ----- stdout ----- @@ -2154,7 +2196,7 @@ fn self_version() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.self_version(), @r" + uv_snapshot!(context.filters(), context.self_version(), @" success: true exit_code: 0 ----- stdout ----- @@ -2167,6 +2209,7 @@ fn self_version() -> Result<()> { assert_snapshot!( pyproject, @r#" + [project] name = "myapp" version = "0.1.2" @@ -2199,7 +2242,7 @@ fn self_version_short() -> Result<()> { )]) .collect::>(); uv_snapshot!(filters, context.self_version() - .arg("--short"), @r" + .arg("--short"), @" success: true exit_code: 0 ----- stdout ----- @@ -2212,6 +2255,7 @@ fn self_version_short() -> Result<()> { assert_snapshot!( pyproject, @r#" + [project] name = "myapp" version = "0.1.2" @@ -2260,23 +2304,23 @@ fn self_version_json() -> Result<()> { if git_version_info_expected() { uv_snapshot!(filters, context.self_version() .arg("--output-format").arg("json"), @r#" - success: true - exit_code: 0 - ----- stdout ----- - { - "package_name": "uv", - "version": "[VERSION]", - "commit_info": { - "short_commit_hash": "[LONGHASH]", - "commit_hash": "[LONGHASH]", - "commit_date": "[DATE]", - "last_tag": "[TAG]", - "commits_since_last_tag": [COUNT] + success: true + exit_code: 0 + ----- stdout ----- + { + "package_name": "uv", + "version": "[VERSION]", + "commit_info": { + "short_commit_hash": "[LONGHASH]", + "commit_hash": "[LONGHASH]", + "commit_date": "[DATE]", + "last_tag": "[TAG]", + "commits_since_last_tag": [COUNT] + } } - } - ----- stderr ----- - "#); + ----- stderr ----- + "#); } else { uv_snapshot!(filters, context.self_version() .arg("--output-format").arg("json"), @r#" @@ -2297,6 +2341,7 @@ fn self_version_json() -> Result<()> { assert_snapshot!( pyproject, @r#" + [project] name = "myapp" version = "0.1.2" @@ -2327,7 +2372,7 @@ fn version_get_workspace() -> Result<()> { .assert() .success(); - uv_snapshot!(context.filters(), context.version().arg("--project").arg(context.temp_dir.as_ref()), @r" + uv_snapshot!(context.filters(), context.version().arg("--project").arg(context.temp_dir.as_ref()), @" success: true exit_code: 0 ----- stdout ----- @@ -2336,7 +2381,7 @@ fn version_get_workspace() -> Result<()> { ----- stderr ----- "); - uv_snapshot!(context.filters(), context.version().arg("--project").arg(context.temp_dir.join("workspace-member")), @r" + uv_snapshot!(context.filters(), context.version().arg("--project").arg(context.temp_dir.join("workspace-member")), @" success: true exit_code: 0 ----- stdout ----- @@ -2346,7 +2391,7 @@ fn version_get_workspace() -> Result<()> { "); // Check that --directory also works - uv_snapshot!(context.filters(), context.version().arg("--directory").arg(context.temp_dir.as_ref()), @r" + uv_snapshot!(context.filters(), context.version().arg("--directory").arg(context.temp_dir.as_ref()), @" success: true exit_code: 0 ----- stdout ----- @@ -2355,7 +2400,7 @@ fn version_get_workspace() -> Result<()> { ----- stderr ----- "); - uv_snapshot!(context.filters(), context.version().arg("--directory").arg(context.temp_dir.join("workspace-member")), @r" + uv_snapshot!(context.filters(), context.version().arg("--directory").arg(context.temp_dir.join("workspace-member")), @" success: true exit_code: 0 ----- stdout ----- @@ -2374,7 +2419,7 @@ fn version_get_workspace() -> Result<()> { // A virtual project root has a no version. // TODO(konsti): Show a dedicated error message for virtual workspace roots (generally, not // only for `uv version`) - uv_snapshot!(context.filters(), context.version().arg("--project").arg(context.temp_dir.as_ref()), @r" + uv_snapshot!(context.filters(), context.version().arg("--project").arg(context.temp_dir.as_ref()), @" success: false exit_code: 2 ----- stdout ----- @@ -2453,7 +2498,7 @@ fn version_set_workspace() -> Result<()> { .arg("1.1.1") .current_dir(&context.temp_dir); - uv_snapshot!(context.filters(), version_cmd, @r" + uv_snapshot!(context.filters(), version_cmd, @" success: true exit_code: 0 ----- stdout ----- @@ -2514,7 +2559,7 @@ fn version_set_workspace() -> Result<()> { .arg("1.2.3") .current_dir(&context.temp_dir); - uv_snapshot!(context.filters(), version_cmd, @r" + uv_snapshot!(context.filters(), version_cmd, @" success: true exit_code: 0 ----- stdout ----- @@ -2569,7 +2614,7 @@ fn version_set_workspace() -> Result<()> { // Confirm --locked get works fine uv_snapshot!(context.filters(), context.version() .arg("--package").arg("child1") - .arg("--locked"), @r" + .arg("--locked"), @" success: true exit_code: 0 ----- stdout ----- @@ -2581,7 +2626,7 @@ fn version_set_workspace() -> Result<()> { // Confirm --frozen get works fine uv_snapshot!(context.filters(), context.version() .arg("--package").arg("child2") - .arg("--frozen"), @r" + .arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -2593,7 +2638,7 @@ fn version_set_workspace() -> Result<()> { // Confirm --no-sync get works fine uv_snapshot!(context.filters(), context.version() .arg("--package").arg("child1") - .arg("--no-sync"), @r" + .arg("--no-sync"), @" success: true exit_code: 0 ----- stdout ----- @@ -2606,7 +2651,7 @@ fn version_set_workspace() -> Result<()> { uv_snapshot!(context.filters(), context.version() .arg("--package").arg("child2") .arg("--frozen") - .arg("2.0.0"), @r" + .arg("2.0.0"), @" success: true exit_code: 0 ----- stdout ----- @@ -2619,7 +2664,7 @@ fn version_set_workspace() -> Result<()> { uv_snapshot!(context.filters(), context.version() .arg("--package").arg("child2") .arg("--frozen") - .arg("--bump").arg("patch"), @r" + .arg("--bump").arg("patch"), @" success: true exit_code: 0 ----- stdout ----- @@ -2631,7 +2676,7 @@ fn version_set_workspace() -> Result<()> { // Confirm --frozen get doesn't see the --frozen set or bump uv_snapshot!(context.filters(), context.version() .arg("--package").arg("child2") - .arg("--frozen"), @r" + .arg("--frozen"), @" success: true exit_code: 0 ----- stdout ----- @@ -2644,7 +2689,7 @@ fn version_set_workspace() -> Result<()> { uv_snapshot!(context.filters(), context.version() .arg("--package").arg("child1") .arg("--no-sync") - .arg("3.0.0"), @r" + .arg("3.0.0"), @" success: true exit_code: 0 ----- stdout ----- @@ -2697,7 +2742,7 @@ fn version_set_workspace() -> Result<()> { uv_snapshot!(context.filters(), context.version() .arg("--package").arg("child1") .arg("--locked") - .arg("3.0.0"), @r" + .arg("3.0.0"), @" success: true exit_code: 0 ----- stdout ----- @@ -2785,7 +2830,7 @@ fn version_set_evil_constraints() -> Result<()> { .touch()?; // sync all, creating the lock and initial sync - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -2871,7 +2916,7 @@ fn version_set_evil_constraints() -> Result<()> { .arg("2.0.0") .current_dir(&context.temp_dir); - uv_snapshot!(context.filters(), version_cmd, @r" + uv_snapshot!(context.filters(), version_cmd, @" success: true exit_code: 0 ----- stdout ----- @@ -2957,7 +3002,7 @@ fn version_set_evil_constraints() -> Result<()> { }); // however once we explicitly sync the change will go into effect - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -2988,7 +3033,7 @@ fn virtual_empty() -> Result<()> { // Get version (doesn't make sense) uv_snapshot!(context.filters(), context.version() - .arg("sortedcontainers"), @r" + .arg("sortedcontainers"), @" success: false exit_code: 2 ----- stdout ----- @@ -3012,7 +3057,7 @@ fn virtual_empty() -> Result<()> { // Set version (can make sense, but we should still refuse?) uv_snapshot!(context.filters(), context.version() - .arg("1.0.0"), @r" + .arg("1.0.0"), @" success: false exit_code: 2 ----- stdout ----- @@ -3053,7 +3098,7 @@ fn add_virtual_dependency_group() -> Result<()> { "#})?; // Get the version (doesn't make sense) - uv_snapshot!(context.filters(), context.version(), @r" + uv_snapshot!(context.filters(), context.version(), @" success: false exit_code: 2 ----- stdout ----- @@ -3079,7 +3124,7 @@ fn add_virtual_dependency_group() -> Result<()> { // Set the version (can make sense, we should refuse?) uv_snapshot!(context.filters(), context.version() - .arg("1.0.0"), @r" + .arg("1.0.0"), @" success: false exit_code: 2 ----- stdout ----- @@ -3132,7 +3177,7 @@ conflicts = [[{"extra" = "foo"}, {"extra" = "bar"}]] )?; uv_snapshot!(context.filters(), context.version() - .arg("--bump").arg("patch"), @r" + .arg("--bump").arg("patch"), @" success: true exit_code: 0 ----- stdout ----- @@ -3147,7 +3192,7 @@ conflicts = [[{"extra" = "foo"}, {"extra" = "bar"}]] context.sync().arg("--extra").arg("foo").assert().success(); uv_snapshot!(context.filters(), context.version() - .arg("--bump").arg("patch"), @r" + .arg("--bump").arg("patch"), @" success: true exit_code: 0 ----- stdout ----- diff --git a/crates/uv/tests/it/workflow.rs b/crates/uv/tests/it/workflow.rs index 15995fb02..2c506c8c5 100644 --- a/crates/uv/tests/it/workflow.rs +++ b/crates/uv/tests/it/workflow.rs @@ -8,7 +8,7 @@ fn packse_add_remove_one_package() { let context = TestContext::new("3.12"); context.copy_ecosystem_project("packse"); - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -207,7 +207,7 @@ fn packse_add_remove_one_package() { insta::with_settings!({ filters => context.filters(), }, { - assert_snapshot!(diff, @r###""###); + assert_snapshot!(diff, @""); }); } @@ -216,7 +216,7 @@ fn packse_add_remove_existing_package_noop() { let context = TestContext::new("3.12"); context.copy_ecosystem_project("packse"); - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -252,7 +252,7 @@ fn packse_promote_transitive_to_direct_then_remove() { let context = TestContext::new("3.12"); context.copy_ecosystem_project("packse"); - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -277,7 +277,7 @@ fn packse_promote_transitive_to_direct_then_remove() { insta::with_settings!({ filters => context.filters(), }, { - assert_snapshot!(diff, @r###" + assert_snapshot!(diff, @r#" --- old +++ new @@ -306,20 +306,21 @@ @@ -324,7 +324,7 @@ fn packse_promote_transitive_to_direct_then_remove() { { name = "psutil", specifier = ">=5.9.7" }, { name = "pytest", specifier = ">=7.4.3" }, { name = "syrupy", specifier = ">=4.6.0" }, - "###); + "#); }); let diff = context.diff_lock(|context| { @@ -335,7 +335,7 @@ fn packse_promote_transitive_to_direct_then_remove() { insta::with_settings!({ filters => context.filters(), }, { - assert_snapshot!(diff, @r###" + assert_snapshot!(diff, @r#" --- old +++ new @@ -306,21 +306,20 @@ @@ -382,7 +382,7 @@ fn packse_promote_transitive_to_direct_then_remove() { { name = "psutil", specifier = ">=5.9.7" }, { name = "pytest", specifier = ">=7.4.3" }, { name = "syrupy", specifier = ">=4.6.0" }, - "###); + "#); }); // Back to where we started. @@ -391,7 +391,7 @@ fn packse_promote_transitive_to_direct_then_remove() { insta::with_settings!({ filters => context.filters(), }, { - assert_snapshot!(diff, @r###""###); + assert_snapshot!(diff, @""); }); } @@ -410,14 +410,14 @@ fn jax_instability() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 8 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); insta::with_settings!({ diff --git a/crates/uv/tests/it/workspace.rs b/crates/uv/tests/it/workspace.rs index aee68d125..1eb293ed5 100644 --- a/crates/uv/tests/it/workspace.rs +++ b/crates/uv/tests/it/workspace.rs @@ -36,7 +36,7 @@ fn test_albatross_in_examples_bird_feeder() { .join("examples") .join("bird-feeder"); - uv_snapshot!(context.filters(), context.sync().current_dir(¤t_dir), @r" + uv_snapshot!(context.filters(), context.sync().current_dir(¤t_dir), @" success: true exit_code: 0 ----- stdout ----- @@ -53,7 +53,7 @@ fn test_albatross_in_examples_bird_feeder() { ); context.assert_file(current_dir.join("check_installed_bird_feeder.py")); - uv_snapshot!(context.filters(), context.sync().current_dir(¤t_dir), @r" + uv_snapshot!(context.filters(), context.sync().current_dir(¤t_dir), @" success: true exit_code: 0 ----- stdout ----- @@ -77,7 +77,7 @@ fn test_albatross_in_examples() { let current_dir = workspace.join("albatross-in-example"); - uv_snapshot!(context.filters(), context.sync().current_dir(¤t_dir), @r" + uv_snapshot!(context.filters(), context.sync().current_dir(¤t_dir), @" success: true exit_code: 0 ----- stdout ----- @@ -94,7 +94,7 @@ fn test_albatross_in_examples() { ); context.assert_file(current_dir.join("check_installed_albatross.py")); - uv_snapshot!(context.filters(), context.sync().current_dir(¤t_dir), @r" + uv_snapshot!(context.filters(), context.sync().current_dir(¤t_dir), @" success: true exit_code: 0 ----- stdout ----- @@ -118,7 +118,7 @@ fn test_albatross_just_project() { let current_dir = workspace.join("albatross-just-project"); - uv_snapshot!(context.filters(), context.sync().current_dir(¤t_dir), @r" + uv_snapshot!(context.filters(), context.sync().current_dir(¤t_dir), @" success: true exit_code: 0 ----- stdout ----- @@ -135,7 +135,7 @@ fn test_albatross_just_project() { ); context.assert_file(current_dir.join("check_installed_albatross.py")); - uv_snapshot!(context.filters(), context.sync().current_dir(¤t_dir), @r" + uv_snapshot!(context.filters(), context.sync().current_dir(¤t_dir), @" success: true exit_code: 0 ----- stdout ----- @@ -159,7 +159,7 @@ fn test_albatross_project_in_excluded() { let current_dir = workspace.join("albatross-project-in-excluded"); - uv_snapshot!(context.filters(), context.sync().current_dir(¤t_dir), @r" + uv_snapshot!(context.filters(), context.sync().current_dir(¤t_dir), @" success: true exit_code: 0 ----- stdout ----- @@ -180,7 +180,7 @@ fn test_albatross_project_in_excluded() { .join("excluded") .join("bird-feeder"); - uv_snapshot!(context.filters(), context.sync().current_dir(¤t_dir), @r" + uv_snapshot!(context.filters(), context.sync().current_dir(¤t_dir), @" success: true exit_code: 0 ----- stdout ----- @@ -197,7 +197,7 @@ fn test_albatross_project_in_excluded() { ); context.assert_file(current_dir.join("check_installed_bird_feeder.py")); - uv_snapshot!(context.filters(), context.sync().current_dir(¤t_dir), @r" + uv_snapshot!(context.filters(), context.sync().current_dir(¤t_dir), @" success: true exit_code: 0 ----- stdout ----- @@ -214,7 +214,7 @@ fn test_albatross_project_in_excluded() { .join("albatross-project-in-excluded") .join("packages") .join("seeds"); - uv_snapshot!(context.filters(), context.sync().current_dir(¤t_dir), @r" + uv_snapshot!(context.filters(), context.sync().current_dir(¤t_dir), @" success: false exit_code: 2 ----- stdout ----- @@ -235,7 +235,7 @@ fn test_albatross_root_workspace() { let current_dir = workspace.join("albatross-root-workspace"); - uv_snapshot!(context.filters(), context.sync().current_dir(¤t_dir), @r" + uv_snapshot!(context.filters(), context.sync().current_dir(¤t_dir), @" success: true exit_code: 0 ----- stdout ----- @@ -255,7 +255,7 @@ fn test_albatross_root_workspace() { ); context.assert_file(current_dir.join("check_installed_albatross.py")); - uv_snapshot!(context.filters(), context.sync().current_dir(¤t_dir), @r" + uv_snapshot!(context.filters(), context.sync().current_dir(¤t_dir), @" success: true exit_code: 0 ----- stdout ----- @@ -282,7 +282,7 @@ fn test_albatross_root_workspace_bird_feeder() { .join("packages") .join("bird-feeder"); - uv_snapshot!(context.filters(), context.sync().current_dir(¤t_dir), @r" + uv_snapshot!(context.filters(), context.sync().current_dir(¤t_dir), @" success: true exit_code: 0 ----- stdout ----- @@ -301,7 +301,7 @@ fn test_albatross_root_workspace_bird_feeder() { ); context.assert_file(current_dir.join("check_installed_bird_feeder.py")); - uv_snapshot!(context.filters(), context.sync().current_dir(¤t_dir), @r" + uv_snapshot!(context.filters(), context.sync().current_dir(¤t_dir), @" success: true exit_code: 0 ----- stdout ----- @@ -328,7 +328,7 @@ fn test_albatross_root_workspace_albatross() { .join("packages") .join("bird-feeder"); - uv_snapshot!(context.filters(), context.sync().current_dir(¤t_dir), @r" + uv_snapshot!(context.filters(), context.sync().current_dir(¤t_dir), @" success: true exit_code: 0 ----- stdout ----- @@ -347,7 +347,7 @@ fn test_albatross_root_workspace_albatross() { ); context.assert_file(current_dir.join("check_installed_albatross.py")); - uv_snapshot!(context.filters(), context.sync().current_dir(¤t_dir), @r" + uv_snapshot!(context.filters(), context.sync().current_dir(¤t_dir), @" success: true exit_code: 0 ----- stdout ----- @@ -374,7 +374,7 @@ fn test_albatross_virtual_workspace() { .join("packages") .join("bird-feeder"); - uv_snapshot!(context.filters(), context.sync().current_dir(¤t_dir), @r" + uv_snapshot!(context.filters(), context.sync().current_dir(¤t_dir), @" success: true exit_code: 0 ----- stdout ----- @@ -394,7 +394,7 @@ fn test_albatross_virtual_workspace() { ); context.assert_file(current_dir.join("check_installed_bird_feeder.py")); - uv_snapshot!(context.filters(), context.sync().current_dir(¤t_dir), @r" + uv_snapshot!(context.filters(), context.sync().current_dir(¤t_dir), @" success: true exit_code: 0 ----- stdout ----- @@ -432,7 +432,7 @@ fn test_uv_run_with_package_virtual_workspace() -> Result<()> { .arg("--package") .arg("bird-feeder") .arg("packages/bird-feeder/check_installed_bird_feeder.py") - .current_dir(&work_dir), @r" + .current_dir(&work_dir), @" success: true exit_code: 0 ----- stdout ----- @@ -458,7 +458,7 @@ fn test_uv_run_with_package_virtual_workspace() -> Result<()> { .arg("--package") .arg("albatross") .arg("packages/albatross/check_installed_albatross.py") - .current_dir(&work_dir), @r" + .current_dir(&work_dir), @" success: true exit_code: 0 ----- stdout ----- @@ -493,7 +493,7 @@ fn test_uv_run_virtual_workspace_root() -> Result<()> { uv_snapshot!(context.filters(), context .run() .arg("packages/albatross/check_installed_albatross.py") - .current_dir(&work_dir), @r" + .current_dir(&work_dir), @" success: true exit_code: 0 ----- stdout ----- @@ -539,7 +539,7 @@ fn test_uv_run_with_package_root_workspace() -> Result<()> { .arg("--package") .arg("bird-feeder") .arg("packages/bird-feeder/check_installed_bird_feeder.py") - .current_dir(&work_dir), @r" + .current_dir(&work_dir), @" success: true exit_code: 0 ----- stdout ----- @@ -564,7 +564,7 @@ fn test_uv_run_with_package_root_workspace() -> Result<()> { .arg("--package") .arg("albatross") .arg("check_installed_albatross.py") - .current_dir(&work_dir), @r" + .current_dir(&work_dir), @" success: true exit_code: 0 ----- stdout ----- @@ -603,7 +603,7 @@ fn test_uv_run_isolate() -> Result<()> { .arg("--package") .arg("albatross") .arg("check_installed_albatross.py") - .current_dir(&work_dir), @r" + .current_dir(&work_dir), @" success: true exit_code: 0 ----- stdout ----- @@ -632,7 +632,7 @@ fn test_uv_run_isolate() -> Result<()> { .arg("--package") .arg("bird-feeder") .arg("check_installed_albatross.py") - .current_dir(&work_dir), @r" + .current_dir(&work_dir), @" success: true exit_code: 0 ----- stdout ----- @@ -818,7 +818,7 @@ fn workspace_to_workspace_paths_dependencies() -> Result<()> { "#}; make_project(&other_workspace.join("packages").join("e"), "e", deps)?; - uv_snapshot!(context.filters(), context.lock().current_dir(&main_workspace), @r###" + uv_snapshot!(context.filters(), context.lock().current_dir(&main_workspace), @" success: true exit_code: 0 ----- stdout ----- @@ -826,13 +826,13 @@ fn workspace_to_workspace_paths_dependencies() -> Result<()> { ----- stderr ----- Using CPython 3.12.[X] interpreter at: [PYTHON-3.12] Resolved 4 packages in [TIME] - "### + " ); let lock: SourceLock = toml::from_str(&fs_err::read_to_string(main_workspace.join("uv.lock"))?)?; - assert_json_snapshot!(lock.sources(), @r###" + assert_json_snapshot!(lock.sources(), @r#" { "a": { "editable": "packages/a" @@ -847,7 +847,7 @@ fn workspace_to_workspace_paths_dependencies() -> Result<()> { "editable": "../other-workspace/packages/d" } } - "###); + "#); Ok(()) } @@ -881,14 +881,14 @@ fn workspace_empty_member() -> Result<()> { // ... and an empty c. fs_err::create_dir_all(workspace.join("packages").join("c"))?; - uv_snapshot!(context.filters(), context.lock().current_dir(&workspace), @r###" + uv_snapshot!(context.filters(), context.lock().current_dir(&workspace), @" success: false exit_code: 2 ----- stdout ----- ----- stderr ----- error: Workspace member `[TEMP_DIR]/workspace/packages/c` is missing a `pyproject.toml` (matches: `packages/*`) - "### + " ); Ok(()) @@ -923,7 +923,7 @@ fn workspace_hidden_files() -> Result<()> { // ... and a hidden c. fs_err::create_dir_all(workspace.join("packages").join(".c"))?; - uv_snapshot!(context.filters(), context.lock().current_dir(&workspace), @r###" + uv_snapshot!(context.filters(), context.lock().current_dir(&workspace), @" success: true exit_code: 0 ----- stdout ----- @@ -931,12 +931,12 @@ fn workspace_hidden_files() -> Result<()> { ----- stderr ----- Using CPython 3.12.[X] interpreter at: [PYTHON-3.12] Resolved 2 packages in [TIME] - "### + " ); let lock: SourceLock = toml::from_str(&fs_err::read_to_string(workspace.join("uv.lock"))?)?; - assert_json_snapshot!(lock.sources(), @r###" + assert_json_snapshot!(lock.sources(), @r#" { "a": { "editable": "packages/a" @@ -945,7 +945,7 @@ fn workspace_hidden_files() -> Result<()> { "editable": "packages/b" } } - "###); + "#); Ok(()) } @@ -986,7 +986,7 @@ fn workspace_hidden_member() -> Result<()> { "}; make_project(&workspace.join("packages").join(".c"), "c", deps)?; - uv_snapshot!(context.filters(), context.lock().current_dir(&workspace), @r###" + uv_snapshot!(context.filters(), context.lock().current_dir(&workspace), @" success: true exit_code: 0 ----- stdout ----- @@ -994,12 +994,12 @@ fn workspace_hidden_member() -> Result<()> { ----- stderr ----- Using CPython 3.12.[X] interpreter at: [PYTHON-3.12] Resolved 3 packages in [TIME] - "### + " ); let lock: SourceLock = toml::from_str(&fs_err::read_to_string(workspace.join("uv.lock"))?)?; - assert_json_snapshot!(lock.sources(), @r###" + assert_json_snapshot!(lock.sources(), @r#" { "a": { "editable": "packages/a" @@ -1011,7 +1011,7 @@ fn workspace_hidden_member() -> Result<()> { "editable": "packages/.c" } } - "###); + "#); Ok(()) } @@ -1050,7 +1050,7 @@ fn workspace_non_included_member() -> Result<()> { make_project(&workspace.join("c"), "c", deps)?; // Locking from `c` should not include any workspace members. - uv_snapshot!(context.filters(), context.lock().current_dir(workspace.join("c")), @r###" + uv_snapshot!(context.filters(), context.lock().current_dir(workspace.join("c")), @" success: true exit_code: 0 ----- stdout ----- @@ -1058,20 +1058,20 @@ fn workspace_non_included_member() -> Result<()> { ----- stderr ----- Using CPython 3.12.[X] interpreter at: [PYTHON-3.12] Resolved 1 package in [TIME] - "### + " ); let lock: SourceLock = toml::from_str(&fs_err::read_to_string( workspace.join("c").join("uv.lock"), )?)?; - assert_json_snapshot!(lock.sources(), @r###" + assert_json_snapshot!(lock.sources(), @r#" { "c": { "editable": "." } } - "###); + "#); Ok(()) } @@ -1131,7 +1131,7 @@ fn workspace_inherit_sources() -> Result<()> { library.child("src/__init__.py").touch()?; // As-is, resolving should fail. - uv_snapshot!(context.filters(), context.lock().arg("--offline").current_dir(&workspace), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--offline").current_dir(&workspace), @" success: false exit_code: 1 ----- stdout ----- @@ -1143,7 +1143,7 @@ fn workspace_inherit_sources() -> Result<()> { And because your workspace requires leaf, we can conclude that your workspace's requirements are unsatisfiable. hint: Packages were unavailable because the network was disabled. When the network is disabled, registry packages may only be read from the cache. - "### + " ); // Update the leaf to include the source. @@ -1163,7 +1163,7 @@ fn workspace_inherit_sources() -> Result<()> { leaf.child("src/__init__.py").touch()?; // Resolving should succeed. - uv_snapshot!(context.filters(), context.lock().arg("--offline").current_dir(&workspace), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--offline").current_dir(&workspace), @" success: true exit_code: 0 ----- stdout ----- @@ -1171,7 +1171,7 @@ fn workspace_inherit_sources() -> Result<()> { ----- stderr ----- Using CPython 3.12.[X] interpreter at: [PYTHON-3.12] Resolved 3 packages in [TIME] - "### + " ); // Revert that change. @@ -1206,7 +1206,7 @@ fn workspace_inherit_sources() -> Result<()> { "#})?; // Resolving should succeed. - uv_snapshot!(context.filters(), context.lock().arg("--offline").current_dir(&workspace), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--offline").current_dir(&workspace), @" success: true exit_code: 0 ----- stdout ----- @@ -1214,7 +1214,7 @@ fn workspace_inherit_sources() -> Result<()> { ----- stderr ----- Using CPython 3.12.[X] interpreter at: [PYTHON-3.12] Resolved 3 packages in [TIME] - "### + " ); let lock = fs_err::read_to_string(workspace.join("uv.lock")).unwrap(); @@ -1298,7 +1298,7 @@ fn workspace_inherit_sources() -> Result<()> { // Resolving should succeed; the member should still use the root's source, despite defining // some of its own - uv_snapshot!(context.filters(), context.lock().arg("--offline").current_dir(&workspace), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--offline").current_dir(&workspace), @" success: true exit_code: 0 ----- stdout ----- @@ -1306,7 +1306,7 @@ fn workspace_inherit_sources() -> Result<()> { ----- stderr ----- Using CPython 3.12.[X] interpreter at: [PYTHON-3.12] Resolved 3 packages in [TIME] - "### + " ); Ok(()) @@ -1351,7 +1351,7 @@ fn workspace_unsatisfiable_member_dependencies() -> Result<()> { leaf.child("src/__init__.py").touch()?; // Resolving should fail. - uv_snapshot!(context.filters(), context.lock().current_dir(&workspace), @r" + uv_snapshot!(context.filters(), context.lock().current_dir(&workspace), @" success: false exit_code: 1 ----- stdout ----- @@ -1419,7 +1419,7 @@ fn workspace_unsatisfiable_member_dependencies_conflicting() -> Result<()> { bar.child("src/__init__.py").touch()?; // Resolving should fail. - uv_snapshot!(context.filters(), context.lock().current_dir(&workspace), @r###" + uv_snapshot!(context.filters(), context.lock().current_dir(&workspace), @" success: false exit_code: 1 ----- stdout ----- @@ -1429,7 +1429,7 @@ fn workspace_unsatisfiable_member_dependencies_conflicting() -> Result<()> { × No solution found when resolving dependencies: ╰─▶ Because bar depends on anyio==4.2.0 and foo depends on anyio==4.1.0, we can conclude that bar and foo are incompatible. And because your workspace requires bar and foo, we can conclude that your workspace's requirements are unsatisfiable. - "### + " ); Ok(()) @@ -1502,7 +1502,7 @@ fn workspace_unsatisfiable_member_dependencies_conflicting_threeway() -> Result< bird.child("src/__init__.py").touch()?; // Resolving should fail. - uv_snapshot!(context.filters(), context.lock().current_dir(&workspace), @r###" + uv_snapshot!(context.filters(), context.lock().current_dir(&workspace), @" success: false exit_code: 1 ----- stdout ----- @@ -1512,7 +1512,7 @@ fn workspace_unsatisfiable_member_dependencies_conflicting_threeway() -> Result< × No solution found when resolving dependencies: ╰─▶ Because bird depends on anyio==4.3.0 and knot depends on anyio==4.2.0, we can conclude that bird and knot are incompatible. And because your workspace requires bird and knot, we can conclude that your workspace's requirements are unsatisfiable. - "### + " ); Ok(()) @@ -1572,7 +1572,7 @@ fn workspace_unsatisfiable_member_dependencies_conflicting_extra() -> Result<()> bar.child("src/__init__.py").touch()?; // Resolving should fail. - uv_snapshot!(context.filters(), context.lock().current_dir(&workspace), @r###" + uv_snapshot!(context.filters(), context.lock().current_dir(&workspace), @" success: false exit_code: 1 ----- stdout ----- @@ -1582,7 +1582,7 @@ fn workspace_unsatisfiable_member_dependencies_conflicting_extra() -> Result<()> × No solution found when resolving dependencies: ╰─▶ Because bar[some-extra] depends on anyio==4.2.0 and foo depends on anyio==4.1.0, we can conclude that foo and bar[some-extra] are incompatible. And because your workspace requires bar[some-extra] and foo, we can conclude that your workspace's requirements are unsatisfiable. - "### + " ); Ok(()) @@ -1642,7 +1642,7 @@ fn workspace_unsatisfiable_member_dependencies_conflicting_dev() -> Result<()> { bar.child("src/__init__.py").touch()?; // Resolving should fail. - uv_snapshot!(context.filters(), context.lock().current_dir(&workspace), @r" + uv_snapshot!(context.filters(), context.lock().current_dir(&workspace), @" success: false exit_code: 1 ----- stdout ----- @@ -1714,7 +1714,7 @@ fn workspace_member_name_shadows_dependencies() -> Result<()> { // We should fail // TODO(zanieb): This error message is bad? - uv_snapshot!(context.filters(), context.lock().current_dir(&workspace), @r###" + uv_snapshot!(context.filters(), context.lock().current_dir(&workspace), @" success: false exit_code: 1 ----- stdout ----- @@ -1724,7 +1724,7 @@ fn workspace_member_name_shadows_dependencies() -> Result<()> { × Failed to build `foo @ file://[TEMP_DIR]/workspace/packages/foo` ├─▶ Failed to parse entry: `anyio` ╰─▶ `anyio` is included as a workspace member, but is missing an entry in `tool.uv.sources` (e.g., `anyio = { workspace = true }`) - "### + " ); Ok(()) @@ -1758,7 +1758,7 @@ fn test_path_hopping() -> Result<()> { // ... that depends on bar, a stub project. make_project(&context.temp_dir.join("libs").join("bar"), "bar", "")?; - uv_snapshot!(context.filters(), context.lock().arg("--preview").current_dir(&main_project_dir), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--preview").current_dir(&main_project_dir), @" success: true exit_code: 0 ----- stdout ----- @@ -1766,12 +1766,12 @@ fn test_path_hopping() -> Result<()> { ----- stderr ----- Using CPython 3.12.[X] interpreter at: [PYTHON-3.12] Resolved 3 packages in [TIME] - "### + " ); let lock: SourceLock = toml::from_str(&fs_err::read_to_string(main_project_dir.join("uv.lock"))?)?; - assert_json_snapshot!(lock.sources(), @r###" + assert_json_snapshot!(lock.sources(), @r#" { "bar": { "editable": "../libs/bar" @@ -1783,7 +1783,7 @@ fn test_path_hopping() -> Result<()> { "editable": "." } } - "###); + "#); Ok(()) } @@ -1815,7 +1815,7 @@ fn transitive_dep_in_git_workspace_no_root() -> Result<()> { let lock1: SourceLock = toml::from_str(&fs_err::read_to_string(context.temp_dir.child("uv.lock"))?)?; - assert_json_snapshot!(lock1.sources(), @r###" + assert_json_snapshot!(lock1.sources(), @r#" { "a": { "virtual": "." @@ -1836,7 +1836,7 @@ fn transitive_dep_in_git_workspace_no_root() -> Result<()> { "registry": "https://pypi.org/simple" } } - "###); + "#); // Check that we don't report a conflict here either. pyproject_toml.write_str( @@ -1891,7 +1891,7 @@ fn transitive_dep_in_git_workspace_with_root() -> Result<()> { let lock1: SourceLock = toml::from_str(&fs_err::read_to_string(context.temp_dir.child("uv.lock"))?)?; - assert_json_snapshot!(lock1.sources(), @r###" + assert_json_snapshot!(lock1.sources(), @r#" { "git-with-root": { "virtual": "." @@ -1903,7 +1903,7 @@ fn transitive_dep_in_git_workspace_with_root() -> Result<()> { "git": "https://github.com/astral-sh/workspace-in-root-test?subdirectory=workspace-member-in-subdir&rev=d3ab48d2338296d47e28dbb2fb327c5e2ac4ac68#d3ab48d2338296d47e28dbb2fb327c5e2ac4ac68" } } - "###); + "#); // Check that we don't report a conflict here either pyproject_toml.write_str( @@ -1958,7 +1958,7 @@ fn workspace_members_with_leading_dot_slash() -> Result<()> { "}; make_project(&workspace.join("packages").join("bar"), "bar", deps)?; - uv_snapshot!(context.filters(), context.lock().current_dir(&workspace), @r###" + uv_snapshot!(context.filters(), context.lock().current_dir(&workspace), @" success: true exit_code: 0 ----- stdout ----- @@ -1966,12 +1966,12 @@ fn workspace_members_with_leading_dot_slash() -> Result<()> { ----- stderr ----- Using CPython 3.12.[X] interpreter at: [PYTHON-3.12] Resolved 2 packages in [TIME] - "### + " ); let lock: SourceLock = toml::from_str(&fs_err::read_to_string(workspace.join("uv.lock"))?)?; - assert_json_snapshot!(lock.sources(), @r###" + assert_json_snapshot!(lock.sources(), @r#" { "bar": { "editable": "packages/bar" @@ -1980,10 +1980,10 @@ fn workspace_members_with_leading_dot_slash() -> Result<()> { "editable": "packages/foo" } } - "###); + "#); // Test syncing from within foo works correctly - uv_snapshot!(context.filters(), context.sync().current_dir(workspace.join("packages").join("foo")), @r###" + uv_snapshot!(context.filters(), context.sync().current_dir(workspace.join("packages").join("foo")), @" success: true exit_code: 0 ----- stdout ----- @@ -1996,7 +1996,7 @@ fn workspace_members_with_leading_dot_slash() -> Result<()> { Installed 2 packages in [TIME] + bar==0.1.0 (from file://[TEMP_DIR]/workspace/packages/bar) + foo==0.1.0 (from file://[TEMP_DIR]/workspace/packages/foo) - "### + " ); Ok(()) @@ -2023,7 +2023,7 @@ fn workspace_members_with_parent_directory() -> Result<()> { deps, )?; - uv_snapshot!(context.filters(), context.lock().current_dir(&workspace), @r###" + uv_snapshot!(context.filters(), context.lock().current_dir(&workspace), @" success: true exit_code: 0 ----- stdout ----- @@ -2031,18 +2031,18 @@ fn workspace_members_with_parent_directory() -> Result<()> { ----- stderr ----- Using CPython 3.12.[X] interpreter at: [PYTHON-3.12] Resolved 1 package in [TIME] - "### + " ); let lock: SourceLock = toml::from_str(&fs_err::read_to_string(workspace.join("uv.lock"))?)?; - assert_json_snapshot!(lock.sources(), @r###" + assert_json_snapshot!(lock.sources(), @r#" { "external-package": { "editable": "../external-package" } } - "###); + "#); Ok(()) } @@ -2068,7 +2068,7 @@ fn workspace_members_with_complex_relative_paths() -> Result<()> { deps, )?; - uv_snapshot!(context.filters(), context.lock().current_dir(&workspace), @r###" + uv_snapshot!(context.filters(), context.lock().current_dir(&workspace), @" success: true exit_code: 0 ----- stdout ----- @@ -2076,18 +2076,18 @@ fn workspace_members_with_complex_relative_paths() -> Result<()> { ----- stderr ----- Using CPython 3.12.[X] interpreter at: [PYTHON-3.12] Resolved 1 package in [TIME] - "### + " ); let lock: SourceLock = toml::from_str(&fs_err::read_to_string(workspace.join("uv.lock"))?)?; - assert_json_snapshot!(lock.sources(), @r###" + assert_json_snapshot!(lock.sources(), @r#" { "sibling-package": { "editable": "../sibling-package" } } - "###); + "#); Ok(()) } diff --git a/crates/uv/tests/it/workspace_dir.rs b/crates/uv/tests/it/workspace_dir.rs index 424581a82..05e0e1ed9 100644 --- a/crates/uv/tests/it/workspace_dir.rs +++ b/crates/uv/tests/it/workspace_dir.rs @@ -16,7 +16,7 @@ fn workspace_dir_simple() { let workspace = context.temp_dir.child("foo"); - uv_snapshot!(context.filters(), context.workspace_dir().current_dir(&workspace), @r" + uv_snapshot!(context.filters(), context.workspace_dir().current_dir(&workspace), @" success: true exit_code: 0 ----- stdout ----- @@ -37,7 +37,7 @@ fn workspace_dir_specific_package() { let workspace = context.temp_dir.child("foo"); // root workspace - uv_snapshot!(context.filters(), context.workspace_dir().current_dir(&workspace), @r" + uv_snapshot!(context.filters(), context.workspace_dir().current_dir(&workspace), @" success: true exit_code: 0 ----- stdout ----- @@ -49,7 +49,7 @@ fn workspace_dir_specific_package() { ); // with --package bar - uv_snapshot!(context.filters(), context.workspace_dir().arg("--package").arg("bar").current_dir(&workspace), @r" + uv_snapshot!(context.filters(), context.workspace_dir().arg("--package").arg("bar").current_dir(&workspace), @" success: true exit_code: 0 ----- stdout ----- @@ -75,7 +75,7 @@ fn workspace_metadata_from_member() -> Result<()> { let member_dir = workspace.join("packages").join("bird-feeder"); - uv_snapshot!(context.filters(), context.workspace_dir().current_dir(&member_dir), @r" + uv_snapshot!(context.filters(), context.workspace_dir().current_dir(&member_dir), @" success: true exit_code: 0 ----- stdout ----- @@ -99,7 +99,7 @@ fn workspace_dir_package_doesnt_exist() { let workspace = context.temp_dir.child("foo"); - uv_snapshot!(context.filters(), context.workspace_dir().arg("--package").arg("bar").current_dir(&workspace), @r" + uv_snapshot!(context.filters(), context.workspace_dir().arg("--package").arg("bar").current_dir(&workspace), @" success: false exit_code: 2 ----- stdout ----- @@ -116,7 +116,7 @@ fn workspace_dir_package_doesnt_exist() { fn workspace_metadata_no_project() { let context = TestContext::new("3.12"); - uv_snapshot!(context.filters(), context.workspace_dir(), @r" + uv_snapshot!(context.filters(), context.workspace_dir(), @" success: false exit_code: 2 ----- stdout ----- diff --git a/crates/uv/tests/it/workspace_list.rs b/crates/uv/tests/it/workspace_list.rs index 96c88ea82..e120722db 100644 --- a/crates/uv/tests/it/workspace_list.rs +++ b/crates/uv/tests/it/workspace_list.rs @@ -14,7 +14,7 @@ fn workspace_list_simple() { let workspace = context.temp_dir.child("foo"); - uv_snapshot!(context.filters(), context.workspace_list().current_dir(&workspace), @r" + uv_snapshot!(context.filters(), context.workspace_list().current_dir(&workspace), @" success: true exit_code: 0 ----- stdout ----- @@ -25,7 +25,7 @@ fn workspace_list_simple() { " ); - uv_snapshot!(context.filters(), context.workspace_list().arg("--paths").current_dir(&workspace), @r" + uv_snapshot!(context.filters(), context.workspace_list().arg("--paths").current_dir(&workspace), @" success: true exit_code: 0 ----- stdout ----- @@ -50,7 +50,7 @@ fn workspace_list_root_workspace() -> Result<()> { &workspace, )?; - uv_snapshot!(context.filters(), context.workspace_list().current_dir(&workspace), @r" + uv_snapshot!(context.filters(), context.workspace_list().current_dir(&workspace), @" success: true exit_code: 0 ----- stdout ----- @@ -79,7 +79,7 @@ fn workspace_list_virtual_workspace() -> Result<()> { &workspace, )?; - uv_snapshot!(context.filters(), context.workspace_list().current_dir(&workspace), @r" + uv_snapshot!(context.filters(), context.workspace_list().current_dir(&workspace), @" success: true exit_code: 0 ----- stdout ----- @@ -110,7 +110,7 @@ fn workspace_list_from_member() -> Result<()> { let member_dir = workspace.join("packages").join("bird-feeder"); - uv_snapshot!(context.filters(), context.workspace_list().current_dir(&member_dir), @r" + uv_snapshot!(context.filters(), context.workspace_list().current_dir(&member_dir), @" success: true exit_code: 0 ----- stdout ----- @@ -151,7 +151,7 @@ fn workspace_list_multiple_members() { .assert() .success(); - uv_snapshot!(context.filters(), context.workspace_list().current_dir(&workspace_root), @r" + uv_snapshot!(context.filters(), context.workspace_list().current_dir(&workspace_root), @" success: true exit_code: 0 ----- stdout ----- @@ -164,7 +164,7 @@ fn workspace_list_multiple_members() { " ); - uv_snapshot!(context.filters(), context.workspace_list().arg("--paths").current_dir(&workspace_root), @r" + uv_snapshot!(context.filters(), context.workspace_list().arg("--paths").current_dir(&workspace_root), @" success: true exit_code: 0 ----- stdout ----- @@ -187,7 +187,7 @@ fn workspace_list_single_project() { let project = context.temp_dir.child("my-project"); - uv_snapshot!(context.filters(), context.workspace_list().current_dir(&project), @r" + uv_snapshot!(context.filters(), context.workspace_list().current_dir(&project), @" success: true exit_code: 0 ----- stdout ----- @@ -212,7 +212,7 @@ fn workspace_list_with_excluded() -> Result<()> { &workspace, )?; - uv_snapshot!(context.filters(), context.workspace_list().current_dir(&workspace), @r" + uv_snapshot!(context.filters(), context.workspace_list().current_dir(&workspace), @" success: true exit_code: 0 ----- stdout ----- @@ -231,7 +231,7 @@ fn workspace_list_with_excluded() -> Result<()> { fn workspace_list_no_project() { let context = TestContext::new("3.12"); - uv_snapshot!(context.filters(), context.workspace_list(), @r" + uv_snapshot!(context.filters(), context.workspace_list(), @" success: false exit_code: 2 ----- stdout ----- diff --git a/crates/uv/tests/it/workspace_metadata.rs b/crates/uv/tests/it/workspace_metadata.rs index 250ca9b68..0cc5b9faf 100644 --- a/crates/uv/tests/it/workspace_metadata.rs +++ b/crates/uv/tests/it/workspace_metadata.rs @@ -308,7 +308,7 @@ fn workspace_metadata_with_excluded() -> Result<()> { fn workspace_metadata_no_project() { let context = TestContext::new("3.12"); - uv_snapshot!(context.filters(), context.workspace_metadata(), @r" + uv_snapshot!(context.filters(), context.workspace_metadata(), @" success: false exit_code: 2 ----- stdout -----