mirror of https://github.com/astral-sh/uv
Add missing `git` feature flag to various tests (#10873)
This commit is contained in:
parent
b1e4bc779c
commit
d09be14679
|
|
@ -2254,6 +2254,7 @@ fn init_failure() -> Result<()> {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(feature = "git")]
|
||||
fn init_git() -> Result<()> {
|
||||
let context = TestContext::new("3.12");
|
||||
|
||||
|
|
@ -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");
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
@ -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);
|
||||
|
|
@ -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);
|
||||
|
|
@ -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");
|
||||
|
||||
|
|
@ -19363,6 +19367,7 @@ fn lock_group_workspace() -> Result<()> {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(feature = "git")]
|
||||
fn lock_transitive_git() -> Result<()> {
|
||||
let context = TestContext::new("3.12");
|
||||
|
||||
|
|
@ -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");
|
||||
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
||||
|
|
@ -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");
|
||||
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -189,6 +189,7 @@ fn list_outdated_freeze() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(feature = "git")]
|
||||
fn list_outdated_git() -> Result<()> {
|
||||
let context = TestContext::new("3.12");
|
||||
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
||||
|
|
@ -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");
|
||||
|
||||
|
|
@ -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");
|
||||
|
||||
|
|
@ -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");
|
||||
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
||||
|
|
@ -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");
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue