From 47d3d0c6e10eb2d98ad1c0cb0be3cc8d1c3b2799 Mon Sep 17 00:00:00 2001 From: Ben Beasley Date: Thu, 15 Jan 2026 10:40:18 +0000 Subject: [PATCH] Gate some tests added in 0.9.23 on the pypi feature (#17481) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary Makes it easier to run integration tests in offline environments by gating four new tests on the `pypi` feature. All of these tests fail in offline environments when they try to make HTTPS requests to PyPI. ## Test Plan Applied as a patch to Fedora’s [`uv` package](https://src.fedoraproject.org/rpms/uv); built and ran integration tests in an offline environment. --- crates/uv/tests/it/network.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/uv/tests/it/network.rs b/crates/uv/tests/it/network.rs index a180c7223..e01e00402 100644 --- a/crates/uv/tests/it/network.rs +++ b/crates/uv/tests/it/network.rs @@ -708,6 +708,7 @@ async fn proxy_invalid_url_not_a_url_in_uv_toml() { } /// Test that valid proxy URL in uv.toml routes requests through the proxy. +#[cfg(feature = "pypi")] #[tokio::test] async fn proxy_valid_url_in_uv_toml() { let context = TestContext::new("3.12"); @@ -766,6 +767,7 @@ async fn proxy_valid_url_in_uv_toml() { } /// Test that https-proxy in uv.toml routes HTTPS requests through a CONNECT tunnel proxy. +#[cfg(feature = "pypi")] #[test] fn proxy_https_proxy_in_uv_toml() { let context = TestContext::new("3.12"); @@ -802,6 +804,7 @@ fn proxy_https_proxy_in_uv_toml() { } /// Test that no-proxy in uv.toml bypasses the proxy for specified hosts. +#[cfg(feature = "pypi")] #[tokio::test] async fn proxy_no_proxy_in_uv_toml() { let context = TestContext::new("3.12"); @@ -869,6 +872,7 @@ no-proxy = ["{target_host}"] } /// Test that proxy URLs without a scheme in uv.toml default to http://. +#[cfg(feature = "pypi")] #[tokio::test] async fn proxy_schemeless_url_in_uv_toml() { let context = TestContext::new("3.12");