diff --git a/crates/uv/tests/pip_install.rs b/crates/uv/tests/pip_install.rs index 11ae2289a..6e2693ceb 100644 --- a/crates/uv/tests/pip_install.rs +++ b/crates/uv/tests/pip_install.rs @@ -319,38 +319,12 @@ fn respect_installed_and_reinstall() -> Result<()> { /// Respect installed versions when resolving. #[test] -#[cfg(not(windows))] fn reinstall_extras() -> Result<()> { let context = TestContext::new("3.12"); - // Install anyio. + // Install httpx. let requirements_txt = context.temp_dir.child("requirements.txt"); - requirements_txt.write_str("anyio")?; - - uv_snapshot!(command(&context) - .arg("-r") - .arg("requirements.txt") - .arg("--strict"), @r###" - success: true - exit_code: 0 - ----- stdout ----- - - ----- stderr ----- - Resolved 3 packages in [TIME] - Downloaded 3 packages in [TIME] - Installed 3 packages in [TIME] - + anyio==4.0.0 - + idna==3.4 - + sniffio==1.3.0 - "### - ); - - context.assert_command("import anyio").success(); - - // Re-install anyio, with an extra. - let requirements_txt = context.temp_dir.child("requirements.txt"); - requirements_txt.touch()?; - requirements_txt.write_str("anyio[trio]")?; + requirements_txt.write_str("httpx")?; uv_snapshot!(command(&context) .arg("-r") @@ -362,16 +336,44 @@ fn reinstall_extras() -> Result<()> { ----- stderr ----- Resolved 7 packages in [TIME] - Downloaded 4 packages in [TIME] - Installed 4 packages in [TIME] - + attrs==23.1.0 - + outcome==1.3.0.post0 - + sortedcontainers==2.4.0 - + trio==0.23.1 + Downloaded 7 packages in [TIME] + Installed 7 packages in [TIME] + + anyio==4.0.0 + + certifi==2023.11.17 + + h11==0.14.0 + + httpcore==1.0.2 + + httpx==0.25.1 + + idna==3.4 + + sniffio==1.3.0 "### ); - context.assert_command("import anyio").success(); + context.assert_command("import httpx").success(); + + // Re-install httpx, with an extra. + let requirements_txt = context.temp_dir.child("requirements.txt"); + requirements_txt.touch()?; + requirements_txt.write_str("httpx[http2]")?; + + uv_snapshot!(command(&context) + .arg("-r") + .arg("requirements.txt") + .arg("--strict"), @r###" + success: true + exit_code: 0 + ----- stdout ----- + + ----- stderr ----- + Resolved 10 packages in [TIME] + Downloaded 3 packages in [TIME] + Installed 3 packages in [TIME] + + h2==4.1.0 + + hpack==4.0.0 + + hyperframe==6.0.1 + "### + ); + + context.assert_command("import httpx").success(); Ok(()) }