From 3ecb77b199d81479693d3ce9fdb02cfa64c4daff Mon Sep 17 00:00:00 2001 From: konsti Date: Mon, 2 Mar 2026 11:01:38 +0100 Subject: [PATCH] Normalize inline snapshots (#18183) I recreated all insta snapshots to reduce the churn in future PRs. ``` cargo insta test --force-update-snapshots --test-runner nextest ``` --- crates/uv-client/src/base_client.rs | 2 +- crates/uv/tests/it/auth.rs | 16 ++--- crates/uv/tests/it/lock.rs | 24 ++++---- crates/uv/tests/it/lock_conflict.rs | 6 +- .../tests/it/lock_exclude_newer_relative.rs | 4 +- crates/uv/tests/it/pip_compile.rs | 14 ++--- crates/uv/tests/it/pip_freeze.rs | 8 +-- crates/uv/tests/it/pip_install.rs | 22 +++---- crates/uv/tests/it/python_install.rs | 6 +- crates/uv/tests/it/run.rs | 8 +-- crates/uv/tests/it/sync.rs | 58 +++++++++---------- crates/uv/tests/it/tool_install.rs | 2 +- crates/uv/tests/it/tool_run.rs | 12 ++-- crates/uv/tests/it/venv.rs | 14 ++--- crates/uv/tests/it/workspace_dir.rs | 8 +-- crates/uv/tests/it/workspace_list.rs | 11 +--- 16 files changed, 101 insertions(+), 114 deletions(-) diff --git a/crates/uv-client/src/base_client.rs b/crates/uv-client/src/base_client.rs index 43161ddab..2087a3b69 100644 --- a/crates/uv-client/src/base_client.rs +++ b/crates/uv-client/src/base_client.rs @@ -1633,7 +1633,7 @@ mod tests { } } - assert_debug_snapshot!(retried, @r" + assert_debug_snapshot!(retried, @" [ 100, 102, diff --git a/crates/uv/tests/it/auth.rs b/crates/uv/tests/it/auth.rs index da34da9ef..31f7efba3 100644 --- a/crates/uv/tests/it/auth.rs +++ b/crates/uv/tests/it/auth.rs @@ -2166,7 +2166,7 @@ fn login_pyx_dev_with_custom_api_url() { .arg("testuser") .arg("--password") .arg("testpass") - .env(EnvVars::PYX_API_URL, "http://localhost:8000"), @r" + .env(EnvVars::PYX_API_URL, "http://localhost:8000"), @" success: false exit_code: 2 ----- stdout ----- @@ -2183,7 +2183,7 @@ fn login_pyx_dev_with_custom_api_url() { .arg("testuser") .arg("--password") .arg("testpass") - .env(EnvVars::PYX_API_URL, "http://localhost:8000"), @r" + .env(EnvVars::PYX_API_URL, "http://localhost:8000"), @" success: false exit_code: 2 ----- stdout ----- @@ -2201,7 +2201,7 @@ fn login_pyx_dev_with_custom_api_url() { .arg("testuser") .arg("--password") .arg("testpass") - .env(EnvVars::PYX_API_URL, "http://localhost:8000"), @r" + .env(EnvVars::PYX_API_URL, "http://localhost:8000"), @" success: true exit_code: 0 ----- stdout ----- @@ -2221,7 +2221,7 @@ fn logout_pyx_dev_with_custom_api_url() { // no credentials exist, but verifies it's recognized as pyx). uv_snapshot!(context.auth_logout() .arg("pyx.dev") - .env(EnvVars::PYX_API_URL, "http://localhost:8000"), @r" + .env(EnvVars::PYX_API_URL, "http://localhost:8000"), @" success: true exit_code: 0 ----- stdout ----- @@ -2242,7 +2242,7 @@ fn token_pyx_dev_with_custom_api_url() { .arg("pyx.dev") .arg("--username") .arg("testuser") - .env(EnvVars::PYX_API_URL, "http://localhost:8000"), @r" + .env(EnvVars::PYX_API_URL, "http://localhost:8000"), @" success: false exit_code: 2 ----- stdout ----- @@ -2264,7 +2264,7 @@ fn token_pyx_staging_without_env_var() { // Without PYX_API_URL set, staging pyx URLs are NOT recognized as pyx domains. // They fall through to the normal credential store lookup. uv_snapshot!(context.auth_token() - .arg("https://astral-sh-staging-api.pyx.dev"), @r" + .arg("https://astral-sh-staging-api.pyx.dev"), @" success: false exit_code: 2 ----- stdout ----- @@ -2288,7 +2288,7 @@ fn login_pyx_staging_with_env_var() { .arg("testuser") .arg("--password") .arg("testpass") - .env(EnvVars::PYX_API_URL, "https://astral-sh-staging-api.pyx.dev"), @r" + .env(EnvVars::PYX_API_URL, "https://astral-sh-staging-api.pyx.dev"), @" success: false exit_code: 2 ----- stdout ----- @@ -2306,7 +2306,7 @@ fn login_pyx_staging_with_env_var() { .arg("testuser") .arg("--password") .arg("testpass") - .env(EnvVars::PYX_API_URL, "https://astral-sh-staging-api.pyx.dev"), @r" + .env(EnvVars::PYX_API_URL, "https://astral-sh-staging-api.pyx.dev"), @" success: false exit_code: 2 ----- stdout ----- diff --git a/crates/uv/tests/it/lock.rs b/crates/uv/tests/it/lock.rs index 153b76875..b956fdb6d 100644 --- a/crates/uv/tests/it/lock.rs +++ b/crates/uv/tests/it/lock.rs @@ -13815,14 +13815,14 @@ fn lock_no_sources_package() -> Result<()> { )?; // Lock with sources disabled only for anyio - uv_snapshot!(context.filters(), context.lock().arg("--no-sources-package").arg("anyio"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--no-sources-package").arg("anyio"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 5 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -13922,14 +13922,14 @@ fn lock_no_sources_package_multiple() -> Result<()> { )?; // Lock with sources disabled for two packages - uv_snapshot!(context.filters(), context.lock().arg("--no-sources-package").arg("anyio typing-extensions"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--no-sources-package").arg("anyio typing-extensions"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 6 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -14039,14 +14039,14 @@ fn lock_no_sources_with_no_sources_package() -> Result<()> { // Lock with both --no-sources and --no-sources-package // --no-sources should take precedence and disable all sources - uv_snapshot!(context.filters(), context.lock().arg("--no-sources").arg("--no-sources-package").arg("iniconfig"), @r###" + uv_snapshot!(context.filters(), context.lock().arg("--no-sources").arg("--no-sources-package").arg("iniconfig"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 5 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -14148,14 +14148,14 @@ fn lock_no_sources_package_env_var() -> Result<()> { )?; // Lock with UV_NO_SOURCES_PACKAGE environment variable - uv_snapshot!(context.filters(), context.lock().env("UV_NO_SOURCES_PACKAGE", "anyio iniconfig"), @r###" + uv_snapshot!(context.filters(), context.lock().env("UV_NO_SOURCES_PACKAGE", "anyio iniconfig"), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- Resolved 5 packages in [TIME] - "###); + "); let lock = context.read("uv.lock"); @@ -19013,7 +19013,7 @@ fn lock_unnamed_explicit_index() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r#" + uv_snapshot!(context.filters(), context.lock(), @" success: false exit_code: 2 ----- stdout ----- @@ -19032,7 +19032,7 @@ fn lock_unnamed_explicit_index() -> Result<()> { 8 | [[tool.uv.index]] | ^^^^^^^^^^^^^^^^^ An index with `explicit = true` requires a `name`: https://test.pypi.org/simple - "#); + "); Ok(()) } @@ -19508,7 +19508,7 @@ fn lock_multiple_default_indexes() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @r###" + uv_snapshot!(context.filters(), context.lock(), @" success: false exit_code: 2 ----- stdout ----- @@ -19520,7 +19520,7 @@ fn lock_multiple_default_indexes() -> Result<()> { 8 | [[tool.uv.index]] | ^^^^^^^^^^^^^^^^^ found multiple indexes with `default = true`; only one index may be marked as default - "###); + "); Ok(()) } diff --git a/crates/uv/tests/it/lock_conflict.rs b/crates/uv/tests/it/lock_conflict.rs index 1f30e34b0..44c8da1b8 100644 --- a/crates/uv/tests/it/lock_conflict.rs +++ b/crates/uv/tests/it/lock_conflict.rs @@ -15178,7 +15178,7 @@ fn conflict_item_unknown_field() -> Result<()> { "#, )?; - uv_snapshot!(context.filters(), context.lock(), @" + uv_snapshot!(context.filters(), context.lock(), @r#" success: false exit_code: 2 ----- stdout ----- @@ -15187,10 +15187,10 @@ fn conflict_item_unknown_field() -> Result<()> { error: Failed to parse: `pyproject.toml` Caused by: TOML parse error at line 10, column 17 | - 10 | { name = \"foo\", extra = \"extra1\" }, + 10 | { name = "foo", extra = "extra1" }, | ^^^^ unknown field `name`, expected one of `package`, `extra`, `group` - "); + "#); Ok(()) } diff --git a/crates/uv/tests/it/lock_exclude_newer_relative.rs b/crates/uv/tests/it/lock_exclude_newer_relative.rs index 7a23aba58..78c7dfab6 100644 --- a/crates/uv/tests/it/lock_exclude_newer_relative.rs +++ b/crates/uv/tests/it/lock_exclude_newer_relative.rs @@ -1111,7 +1111,7 @@ fn lock_exclude_newer_relative_values() -> Result<()> { uv_snapshot!(context.filters(), context .lock() .arg("--exclude-newer") - .arg("P4Z"), @r#" + .arg("P4Z"), @" success: false exit_code: 2 ----- stdout ----- @@ -1120,7 +1120,7 @@ fn lock_exclude_newer_relative_values() -> Result<()> { error: invalid value 'P4Z' for '--exclude-newer ': `P4Z` could not be parsed as an ISO 8601 duration: expected to find date unit designator suffix (`Y`, `M`, `W` or `D`), but found `Z` instead For more information, try '--help'. - "#); + "); uv_snapshot!(context.filters(), context .lock() diff --git a/crates/uv/tests/it/pip_compile.rs b/crates/uv/tests/it/pip_compile.rs index 8577a5a9f..b92cbd2b9 100644 --- a/crates/uv/tests/it/pip_compile.rs +++ b/crates/uv/tests/it/pip_compile.rs @@ -3525,7 +3525,7 @@ fn compile_exclude_newer() -> Result<()> { .env_remove(EnvVars::UV_EXCLUDE_NEWER) .arg("requirements.in") .arg("--exclude-newer") - .arg("2022-04-04T26:00:00+00"), @r" + .arg("2022-04-04T26:00:00+00"), @" success: false exit_code: 2 ----- stdout ----- @@ -18263,7 +18263,7 @@ fn compile_missing_python_version() -> Result<()> { uv_snapshot!(context .pip_compile() .arg("--python-version").arg("3.13") - .arg("requirements.in"), @r" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -18301,7 +18301,7 @@ fn compile_missing_python_version_patch_fallback() -> Result<()> { uv_snapshot!(context.filters(), context .pip_compile() .arg("--python-version").arg("3.13.99") - .arg("requirements.in"), @r" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -18337,7 +18337,7 @@ fn compile_missing_python_version_default_fallback() -> Result<()> { .pip_compile() .env(EnvVars::UV_MANAGED_PYTHON, "1") .arg("--python-version").arg("3.99.99") - .arg("requirements.in"), @r" + .arg("requirements.in"), @" success: true exit_code: 0 ----- stdout ----- @@ -18388,7 +18388,7 @@ async fn compile_missing_python_download_error_warning() { .env("ALL_PROXY", server.uri()) .env(EnvVars::UV_HTTP_RETRIES, "0") .env(EnvVars::UV_TEST_NO_HTTP_RETRY_DELAY, "true") - .arg("requirements.in"), @r" + .arg("requirements.in"), @" success: false exit_code: 2 ----- stdout ----- @@ -18413,7 +18413,7 @@ async fn compile_missing_python_download_error_warning() { .env("ALL_PROXY", server.uri()) .env(EnvVars::UV_HTTP_RETRIES, "0") .env(EnvVars::UV_TEST_NO_HTTP_RETRY_DELAY, "true") - .arg("requirements.in"), @r" + .arg("requirements.in"), @" success: false exit_code: 2 ----- stdout ----- @@ -18438,7 +18438,7 @@ async fn compile_missing_python_download_error_warning() { .env("ALL_PROXY", server.uri()) .env(EnvVars::UV_HTTP_RETRIES, "0") .env(EnvVars::UV_TEST_NO_HTTP_RETRY_DELAY, "true") - .arg("requirements.in"), @r" + .arg("requirements.in"), @" 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 e27a407a7..2e38d0163 100644 --- a/crates/uv/tests/it/pip_freeze.rs +++ b/crates/uv/tests/it/pip_freeze.rs @@ -592,23 +592,23 @@ fn freeze_exclude() { .success(); // Run `pip freeze --exclude MarkupSafe`. - uv_snapshot!(context.filters(), context.pip_freeze().arg("--exclude").arg("MarkupSafe").arg("--prefix").arg(prefix.path()), @r###" + uv_snapshot!(context.filters(), context.pip_freeze().arg("--exclude").arg("MarkupSafe").arg("--prefix").arg(prefix.path()), @" success: true exit_code: 0 ----- stdout ----- tomli==2.0.1 ----- stderr ----- - "### + " ); // Run `pip freeze --exclude MarkupSafe --exclude tomli`. - uv_snapshot!(context.filters(), context.pip_freeze().arg("--exclude").arg("MarkupSafe").arg("--exclude").arg("tomli").arg("--prefix").arg(prefix.path()), @r###" + uv_snapshot!(context.filters(), context.pip_freeze().arg("--exclude").arg("MarkupSafe").arg("--exclude").arg("tomli").arg("--prefix").arg(prefix.path()), @" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- - "### + " ); } diff --git a/crates/uv/tests/it/pip_install.rs b/crates/uv/tests/it/pip_install.rs index bac1c7ba2..347be1b83 100644 --- a/crates/uv/tests/it/pip_install.rs +++ b/crates/uv/tests/it/pip_install.rs @@ -11129,7 +11129,7 @@ fn pip_install_no_sources_package() -> Result<()> { uv_snapshot!(context.filters(), context.pip_install() .arg("--no-sources-package") .arg("anyio") - .arg("."), @r###" + .arg("."), @" success: true exit_code: 0 ----- stdout ----- @@ -11143,7 +11143,7 @@ fn pip_install_no_sources_package() -> Result<()> { + iniconfig==2.0.0 (from git+https://github.com/pytest-dev/iniconfig@93f5930e668c0d1ddf4597e38dd0dea4e2665e7a) + project==0.1.0 (from file://[TEMP_DIR]/) + sniffio==1.3.1 - "###); + "); Ok(()) } @@ -13151,7 +13151,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 ----- @@ -13184,7 +13184,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 ----- @@ -13203,7 +13203,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 ----- @@ -14037,7 +14037,7 @@ fn build_backend_wrong_wheel_platform() -> Result<()> { .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 ----- @@ -14232,7 +14232,7 @@ fn abi_compatibility_on_freethreaded_python() { uv_snapshot!(context.filters(), context.pip_install() .arg("--python-platform").arg("linux") - .arg(wheel_path), @r" + .arg(wheel_path), @" success: false exit_code: 2 ----- stdout ----- @@ -14252,7 +14252,7 @@ fn abi_compatibility_on_freethreaded_python() { uv_snapshot!(context.filters(), context.pip_install() .arg("--python-platform").arg("linux") - .arg(wheel_path), @r" + .arg(wheel_path), @" success: false exit_code: 2 ----- stdout ----- @@ -14272,7 +14272,7 @@ fn abi_compatibility_on_freethreaded_python() { uv_snapshot!(context.filters(), context.pip_install() .arg("--python-platform").arg("linux") - .arg(wheel_path), @r" + .arg(wheel_path), @" success: true exit_code: 0 ----- stdout ----- @@ -14293,7 +14293,7 @@ fn warn_on_bz2_wheel() { context.filters(), context.pip_install() .arg("futzed_bz2 @ https://github.com/astral-sh/futzed-wheels/releases/download/v2026.02.09.2/futzed_bz2-0.1.0-py3-none-any.whl"), - @r" + @" success: true exit_code: 0 ----- stdout ----- @@ -14316,7 +14316,7 @@ fn warn_on_lzma_wheel() { context.filters(), context.pip_install() .arg("futzed_lzma @ https://github.com/astral-sh/futzed-wheels/releases/download/v2026.02.09.2/futzed_lzma-0.1.0-py3-none-any.whl"), - @r" + @" success: false exit_code: 1 ----- stdout ----- diff --git a/crates/uv/tests/it/python_install.rs b/crates/uv/tests/it/python_install.rs index b710fa551..da295a38a 100644 --- a/crates/uv/tests/it/python_install.rs +++ b/crates/uv/tests/it/python_install.rs @@ -3795,7 +3795,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 ----- @@ -4338,7 +4338,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 ----- @@ -4361,7 +4361,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/run.rs b/crates/uv/tests/it/run.rs index 5a6e4f31b..58b656771 100644 --- a/crates/uv/tests/it/run.rs +++ b/crates/uv/tests/it/run.rs @@ -519,7 +519,7 @@ fn run_pep723_script_requires_python() -> Result<()> { // The `.python-version` (3.11) is incompatible with the script's `requires-python` (>=3.12), // so uv should ignore it and discover a compatible Python (3.12) instead. - 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 ----- @@ -531,7 +531,7 @@ fn run_pep723_script_requires_python() -> Result<()> { // Deleting the `.python-version` file should not change the behavior. 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 ----- @@ -565,7 +565,7 @@ fn run_pep723_script_requires_python_compatible() -> Result<()> { // The `.python-version` (3.11) is compatible with the script's `requires-python` (>=3.11), // so it should be used. - 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 ----- @@ -597,7 +597,7 @@ fn run_pep723_script_requires_python_incompatible_range() -> 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 ----- diff --git a/crates/uv/tests/it/sync.rs b/crates/uv/tests/it/sync.rs index 5a0f7c9f8..99cecfdcf 100644 --- a/crates/uv/tests/it/sync.rs +++ b/crates/uv/tests/it/sync.rs @@ -1965,7 +1965,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 ----- @@ -1978,7 +1978,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 ----- @@ -2006,7 +2006,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 ----- @@ -2074,7 +2074,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 ----- @@ -2109,7 +2109,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 ----- @@ -2201,7 +2201,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 ----- @@ -2307,7 +2307,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 ----- @@ -2381,7 +2381,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 ----- @@ -2516,7 +2516,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 ----- @@ -2535,7 +2535,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 ----- @@ -2612,7 +2612,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 ----- @@ -2719,7 +2719,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 ----- @@ -2785,7 +2785,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 ----- @@ -8946,7 +8946,7 @@ fn sync_no_sources_package() -> Result<()> { )?; // First lock the project - uv_snapshot!(context.filters(), context.lock(), @r" + uv_snapshot!(context.filters(), context.lock(), @" success: true exit_code: 0 ----- stdout ----- @@ -8956,7 +8956,7 @@ fn sync_no_sources_package() -> Result<()> { "); // Sync with sources disabled for anyio only - uv_snapshot!(context.filters(), context.sync().arg("--no-sources-package").arg("anyio"), @r" + uv_snapshot!(context.filters(), context.sync().arg("--no-sources-package").arg("anyio"), @" success: true exit_code: 0 ----- stdout ----- @@ -9103,7 +9103,7 @@ fn sync_ignores_incompatible_global_python_version() -> Result<()> { let context = uv_test::test_context_with_versions!(&["3.10", "3.11"]); // Create a global pin before creating the project (to avoid pin compatibility check) - uv_snapshot!(context.filters(), context.python_pin().arg("--global").arg("3.10"), @r" + uv_snapshot!(context.filters(), context.python_pin().arg("--global").arg("3.10"), @" success: true exit_code: 0 ----- stdout ----- @@ -9123,7 +9123,7 @@ fn sync_ignores_incompatible_global_python_version() -> Result<()> { "#})?; // Ensure sync succeeds and uses a compatible interpreter (ignoring the conflicting global pin) - uv_snapshot!(context.filters(), context.sync(), @r" + uv_snapshot!(context.filters(), context.sync(), @" success: true exit_code: 0 ----- stdout ----- @@ -9442,7 +9442,7 @@ fn sync_extra_comma_separated() -> Result<()> { context.lock().assert().success(); - uv_snapshot!(context.filters(), context.sync().arg("--extra").arg("types,async"), @r#" + uv_snapshot!(context.filters(), context.sync().arg("--extra").arg("types,async"), @" success: true exit_code: 0 ----- stdout ----- @@ -9455,7 +9455,7 @@ fn sync_extra_comma_separated() -> Result<()> { + idna==3.6 + sniffio==1.3.1 + typing-extensions==4.10.0 - "#); + "); Ok(()) } @@ -13816,7 +13816,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 ----- @@ -13848,7 +13848,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 ----- @@ -13867,7 +13867,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 ----- @@ -13912,7 +13912,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 ----- @@ -13941,7 +13941,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 ----- @@ -14110,7 +14110,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 ----- @@ -14580,7 +14580,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 ----- @@ -14671,7 +14671,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 ----- @@ -14685,7 +14685,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 ----- @@ -14710,7 +14710,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 ----- diff --git a/crates/uv/tests/it/tool_install.rs b/crates/uv/tests/it/tool_install.rs index 2f0f8b3d1..7d3897fc1 100644 --- a/crates/uv/tests/it/tool_install.rs +++ b/crates/uv/tests/it/tool_install.rs @@ -221,7 +221,7 @@ fn tool_install_python_from_global_version_file() { "); // It should use the version from the global file - 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 ----- diff --git a/crates/uv/tests/it/tool_run.rs b/crates/uv/tests/it/tool_run.rs index fa5aa2822..27c42f73d 100644 --- a/crates/uv/tests/it/tool_run.rs +++ b/crates/uv/tests/it/tool_run.rs @@ -2411,7 +2411,7 @@ fn tool_run_python_from_global_version_file() { uv_snapshot!(context.filters(), context.tool_run() .arg("python") - .arg("--version"), @r###" + .arg("--version"), @" success: true exit_code: 0 ----- stdout ----- @@ -2420,7 +2420,7 @@ fn tool_run_python_from_global_version_file() { ----- stderr ----- Resolved in [TIME] Audited in [TIME] - "###); + "); } #[test] @@ -2440,7 +2440,7 @@ fn tool_run_python_version_overrides_global_pin() { // Explicitly request python3.12, should override global pin uv_snapshot!(context.filters(), context.tool_run() .arg("python3.12") - .arg("--version"), @r###" + .arg("--version"), @" success: true exit_code: 0 ----- stdout ----- @@ -2449,7 +2449,7 @@ fn tool_run_python_version_overrides_global_pin() { ----- stderr ----- Resolved in [TIME] Audited in [TIME] - "###); + "); } #[test] @@ -2471,7 +2471,7 @@ fn tool_run_python_with_explicit_default_bypasses_global_pin() { .arg("--python") .arg("default") .arg("python") - .arg("--version"), @r###" + .arg("--version"), @" success: true exit_code: 0 ----- stdout ----- @@ -2480,7 +2480,7 @@ fn tool_run_python_with_explicit_default_bypasses_global_pin() { ----- stderr ----- Resolved in [TIME] Audited in [TIME] - "###); + "); } #[test] diff --git a/crates/uv/tests/it/venv.rs b/crates/uv/tests/it/venv.rs index 279afe931..6e19d9fcc 100644 --- a/crates/uv/tests/it/venv.rs +++ b/crates/uv/tests/it/venv.rs @@ -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: false exit_code: 2 ----- stdout ----- @@ -221,7 +221,7 @@ fn virtual_empty() -> Result<()> { wow = "someconfig" "#})?; - uv_snapshot!(context.filters(), context.venv().arg("--clear"), @r" + uv_snapshot!(context.filters(), context.venv().arg("--clear"), @" success: true exit_code: 0 ----- stdout ----- @@ -249,7 +249,7 @@ fn virtual_dependency_group() -> Result<()> { dev = ["sniffio"] "#})?; - uv_snapshot!(context.filters(), context.venv().arg("--clear"), @r" + uv_snapshot!(context.filters(), context.venv().arg("--clear"), @" success: true exit_code: 0 ----- stdout ----- @@ -1508,7 +1508,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: false exit_code: 2 ----- stdout ----- @@ -1531,7 +1531,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: false exit_code: 2 ----- stdout ----- @@ -1653,7 +1653,7 @@ fn create_venv_symlink_recreate_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 ----- @@ -1717,7 +1717,7 @@ fn create_venv_nested_symlink_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 ----- diff --git a/crates/uv/tests/it/workspace_dir.rs b/crates/uv/tests/it/workspace_dir.rs index d064f7d16..426124fe6 100644 --- a/crates/uv/tests/it/workspace_dir.rs +++ b/crates/uv/tests/it/workspace_dir.rs @@ -21,7 +21,6 @@ fn workspace_dir_simple() { [TEMP_DIR]/foo ----- stderr ----- - " ); } @@ -42,7 +41,6 @@ fn workspace_dir_specific_package() { [TEMP_DIR]/foo ----- stderr ----- - " ); @@ -54,7 +52,6 @@ fn workspace_dir_specific_package() { [TEMP_DIR]/foo/bar ----- stderr ----- - " ); } @@ -80,7 +77,6 @@ fn workspace_metadata_from_member() -> Result<()> { [TEMP_DIR]/workspace ----- stderr ----- - " ); @@ -97,7 +93,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 ----- @@ -113,7 +109,7 @@ fn workspace_dir_package_doesnt_exist() { fn workspace_metadata_no_project() { let context = uv_test::test_context!("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 6aede5adb..6f670954f 100644 --- a/crates/uv/tests/it/workspace_list.rs +++ b/crates/uv/tests/it/workspace_list.rs @@ -21,7 +21,6 @@ fn workspace_list_simple() { foo ----- stderr ----- - " ); @@ -32,7 +31,6 @@ fn workspace_list_simple() { [TEMP_DIR]/foo ----- stderr ----- - " ); } @@ -59,7 +57,6 @@ fn workspace_list_root_workspace() -> Result<()> { seeds ----- stderr ----- - " ); @@ -88,7 +85,6 @@ fn workspace_list_virtual_workspace() -> Result<()> { seeds ----- stderr ----- - " ); @@ -119,7 +115,6 @@ fn workspace_list_from_member() -> Result<()> { seeds ----- stderr ----- - " ); @@ -160,7 +155,6 @@ fn workspace_list_multiple_members() { pkg-c ----- stderr ----- - " ); @@ -173,7 +167,6 @@ fn workspace_list_multiple_members() { [TEMP_DIR]/pkg-a/pkg-c ----- stderr ----- - " ); } @@ -194,7 +187,6 @@ fn workspace_list_single_project() { my-project ----- stderr ----- - " ); } @@ -219,7 +211,6 @@ fn workspace_list_with_excluded() -> Result<()> { albatross ----- stderr ----- - " ); @@ -231,7 +222,7 @@ fn workspace_list_with_excluded() -> Result<()> { fn workspace_list_no_project() { let context = uv_test::test_context!("3.12"); - uv_snapshot!(context.filters(), context.workspace_list(), @r" + uv_snapshot!(context.filters(), context.workspace_list(), @" success: false exit_code: 2 ----- stdout -----