Skip to content

Commit

Permalink
Add missing git feature flag to various tests (#10873)
Browse files Browse the repository at this point in the history
  • Loading branch information
zanieb authored Jan 22, 2025
1 parent b1e4bc7 commit d09be14
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crates/uv/tests/it/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2254,6 +2254,7 @@ fn init_failure() -> Result<()> {
}

#[test]
#[cfg(feature = "git")]
fn init_git() -> Result<()> {
let context = TestContext::new("3.12");

Expand Down Expand Up @@ -2314,6 +2315,7 @@ fn init_vcs_none() {

/// Run `uv init` from within a Git repository. Do not try to reinitialize one.
#[test]
#[cfg(feature = "git")]
fn init_inside_git_repo() {
let context = TestContext::new("3.12");

Expand Down
6 changes: 6 additions & 0 deletions crates/uv/tests/it/lock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7765,6 +7765,7 @@ fn lock_redact_https() -> Result<()> {
}

#[test]
#[cfg(feature = "git")]
fn lock_redact_git_pep508() -> Result<()> {
let context = TestContext::new("3.12").with_filtered_link_mode_warning();
let token = decode_token(common::READ_ONLY_GITHUB_TOKEN);
Expand Down Expand Up @@ -7853,6 +7854,7 @@ fn lock_redact_git_pep508() -> Result<()> {
}

#[test]
#[cfg(feature = "git")]
fn lock_redact_git_sources() -> Result<()> {
let context = TestContext::new("3.12").with_filtered_link_mode_warning();
let token = decode_token(common::READ_ONLY_GITHUB_TOKEN);
Expand Down Expand Up @@ -7944,6 +7946,7 @@ fn lock_redact_git_sources() -> Result<()> {
}

#[test]
#[cfg(feature = "git")]
fn lock_redact_git_pep508_non_project() -> Result<()> {
let context = TestContext::new("3.12").with_filtered_link_mode_warning();
let token = decode_token(common::READ_ONLY_GITHUB_TOKEN);
Expand Down Expand Up @@ -16597,6 +16600,7 @@ fn lock_dependency_metadata() -> Result<()> {
}

#[test]
#[cfg(feature = "git")]
fn lock_dependency_metadata_git() -> Result<()> {
let context = TestContext::new("3.12");

Expand Down Expand Up @@ -19363,6 +19367,7 @@ fn lock_group_workspace() -> Result<()> {
}

#[test]
#[cfg(feature = "git")]
fn lock_transitive_git() -> Result<()> {
let context = TestContext::new("3.12");

Expand Down Expand Up @@ -22095,6 +22100,7 @@ fn lock_split_on_windows() -> Result<()> {
}

#[test]
#[cfg(feature = "git")]
fn lock_missing_git_prefix() -> Result<()> {
let context = TestContext::new("3.12");

Expand Down
3 changes: 3 additions & 0 deletions crates/uv/tests/it/pip_compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1949,6 +1949,7 @@ fn compile_git_mismatched_name() -> Result<()> {
/// Resolve a specific Git dependency with a subdirectory, where the root directory contains a
/// static `pyproject.toml` file.
#[test]
#[cfg(feature = "git")]
fn compile_git_subdirectory_static_metadata() -> Result<()> {
let context = TestContext::new("3.12");

Expand Down Expand Up @@ -4534,6 +4535,7 @@ fn generate_hashes_built_distribution_url() -> Result<()> {

/// Given a VCS dependency, include hashes for its dependencies, but not the repository itself.
#[test]
#[cfg(feature = "git")]
fn generate_hashes_git() -> Result<()> {
let context = TestContext::new("3.12");
let requirements_in = context.temp_dir.child("requirements.in");
Expand Down Expand Up @@ -11032,6 +11034,7 @@ fn unnamed_path_requirement() -> Result<()> {

/// Detect the package name from an unnamed Git requirement.
#[test]
#[cfg(feature = "git")]
fn unnamed_git_requirement() -> Result<()> {
let context = TestContext::new("3.12");
let requirements_in = context.temp_dir.child("requirements.in");
Expand Down
1 change: 1 addition & 0 deletions crates/uv/tests/it/pip_install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8032,6 +8032,7 @@ fn missing_git_prefix() -> Result<()> {
}

#[test]
#[cfg(feature = "git")]
fn missing_subdirectory_git() -> Result<()> {
let context = TestContext::new("3.12");
let requirements_txt = context.temp_dir.child("requirements.txt");
Expand Down
1 change: 1 addition & 0 deletions crates/uv/tests/it/pip_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ fn list_outdated_freeze() {
}

#[test]
#[cfg(feature = "git")]
fn list_outdated_git() -> Result<()> {
let context = TestContext::new("3.12");

Expand Down
4 changes: 4 additions & 0 deletions crates/uv/tests/it/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5380,6 +5380,7 @@ fn sync_stale_egg_info() -> Result<()> {

/// See: <https://github.com/astral-sh/uv/issues/8887>
#[test]
#[cfg(feature = "git")]
fn sync_git_repeated_member_static_metadata() -> Result<()> {
let context = TestContext::new("3.13");

Expand Down Expand Up @@ -5472,6 +5473,7 @@ fn sync_git_repeated_member_static_metadata() -> Result<()> {

/// See: <https://github.com/astral-sh/uv/issues/8887>
#[test]
#[cfg(feature = "git")]
fn sync_git_repeated_member_dynamic_metadata() -> Result<()> {
let context = TestContext::new("3.13");

Expand Down Expand Up @@ -5589,6 +5591,7 @@ fn sync_git_repeated_member_dynamic_metadata() -> Result<()> {

/// See: <https://github.com/astral-sh/uv/issues/8887>
#[test]
#[cfg(feature = "git")]
fn sync_git_repeated_member_backwards_path() -> Result<()> {
let context = TestContext::new("3.13");

Expand Down Expand Up @@ -5770,6 +5773,7 @@ fn mismatched_name_cached_wheel() -> Result<()> {
///
/// See: <https://github.com/astral-sh/uv/issues/9516>
#[test]
#[cfg(feature = "git")]
fn sync_git_path_dependency() -> Result<()> {
let context = TestContext::new("3.13");

Expand Down
2 changes: 2 additions & 0 deletions crates/uv/tests/it/workspace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1765,6 +1765,7 @@ fn test_path_hopping() -> Result<()> {
/// are correctly resolving `d` to a git dependency with a subdirectory and not relative to the
/// checkout directory.
#[test]
#[cfg(feature = "git")]
fn transitive_dep_in_git_workspace_no_root() -> Result<()> {
let context = TestContext::new("3.12");

Expand Down Expand Up @@ -1839,6 +1840,7 @@ fn transitive_dep_in_git_workspace_no_root() -> Result<()> {
/// to `uv-git-workspace-in-root`. Check that we are correctly resolving `uv-git-workspace-in-root`
/// to a git dependency without a subdirectory and not relative to the checkout directory.
#[test]
#[cfg(feature = "git")]
fn transitive_dep_in_git_workspace_with_root() -> Result<()> {
let context = TestContext::new("3.12");

Expand Down

0 comments on commit d09be14

Please sign in to comment.