From 77489379b1eb5c20682c8f23f119078155a0ae9e Mon Sep 17 00:00:00 2001 From: Ben Beasley Date: Sun, 8 Mar 2026 15:55:34 +0000 Subject: [PATCH] Conditionalize two new tests on the test-pypi feature (#18369) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary Both `build_backend::tool_uv_build_backend_without_build_backend` and `build_backend::tool_uv_build_backend_wrong_build_backend` fail in offline environments because they try to download a build backend from PyPI. This PR conditionalizes both tests on the existing `test-pypi` feature. ## Test Plan Applied as a downstream patch to Fedora’s `uv` package. --- crates/uv/tests/it/build_backend.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/uv/tests/it/build_backend.rs b/crates/uv/tests/it/build_backend.rs index a01705a67..454f2b1ad 100644 --- a/crates/uv/tests/it/build_backend.rs +++ b/crates/uv/tests/it/build_backend.rs @@ -1449,6 +1449,7 @@ fn build_with_all_metadata() -> Result<()> { /// Warn for cases where `tool.uv.build-backend` is used without the corresponding build backend /// entry. #[test] +#[cfg(feature = "test-pypi")] fn tool_uv_build_backend_without_build_backend() -> Result<()> { let context = uv_test::test_context!("3.12"); @@ -1512,6 +1513,7 @@ fn tool_uv_build_backend_without_build_backend() -> Result<()> { /// Warn for cases where `tool.uv.build-backend` is used without the corresponding build backend /// entry. #[test] +#[cfg(feature = "test-pypi")] fn tool_uv_build_backend_wrong_build_backend() -> Result<()> { let context = uv_test::test_context!("3.12");