Option C Tools
Loading...
Searching...
No Matches
test_git.py File Reference

Go to the source code of this file.

Classes

class  tests_core.test_git._FakeCompleted

Namespaces

namespace  tests_core
namespace  tests_core.test_git

Functions

bool tests_core.test_git._platform_can_symlink ()
 tests_core.test_git.test_git_error_is_base_of_all_subclasses ()
 tests_core.test_git.test_git_command_error_preserves_context ()
 tests_core.test_git.test_redact_strips_http_creds ()
 tests_core.test_git.test_redact_strips_https_creds ()
 tests_core.test_git.test_redact_preserves_ssh_urls ()
 tests_core.test_git.test_redact_handles_empty_string ()
 tests_core.test_git.test_redact_handles_none_safely ()
 tests_core.test_git.test_redact_multiline_output ()
 tests_core.test_git.test_redact_preserves_non_url_content ()
 tests_core.test_git.test_redact_argv_redacts_url_elements ()
 tests_core.test_git.test_redact_argv_noop_for_plain_argv ()
 tests_core.test_git.test_git_run_dbg_does_not_leak_token (tmp_path, monkeypatch, caplog)
 tests_core.test_git.test_git_command_error_str_redacts_token_in_argv ()
 tests_core.test_git.test_timeout_message_redacts_token (tmp_path, monkeypatch)
 tests_core.test_git.test_git_run_rejects_non_list_argv (tmp_path)
 tests_core.test_git.test_git_run_happy_path (tmp_path, monkeypatch)
 tests_core.test_git.test_git_run_raises_git_not_found (tmp_path, monkeypatch)
 tests_core.test_git.test_git_run_raises_timeout (tmp_path, monkeypatch)
 tests_core.test_git.test_git_run_raises_on_nonzero_exit (tmp_path, monkeypatch)
 tests_core.test_git.test_git_run_nocheck_returns_process (tmp_path, monkeypatch)
 tests_core.test_git.test_git_run_redacts_stderr_on_error (tmp_path, monkeypatch)
 tests_core.test_git.test_git_run_redacts_stdout_on_success (tmp_path, monkeypatch)
 tests_core.test_git.test_is_git_repo_true_inside_repo (git_repo)
 tests_core.test_git.test_is_git_repo_false_outside_repo (tmp_path)
 tests_core.test_git.test_is_git_repo_false_when_git_missing (tmp_path, monkeypatch)
 tests_core.test_git.test_is_git_repo_false_on_any_exception (tmp_path, monkeypatch)
 tests_core.test_git.test_get_repo_root_returns_absolute_path (git_repo)
 tests_core.test_git.test_get_repo_root_raises_not_a_repo (tmp_path)
 tests_core.test_git.test_current_branch_returns_name (git_repo)
 tests_core.test_git.test_is_detached_head_false_on_branch (git_repo)
 tests_core.test_git.test_is_detached_head_true_after_checkout_sha (git_repo)
 tests_core.test_git.test_has_uncommitted_changes_false_on_clean_repo (git_repo)
 tests_core.test_git.test_has_uncommitted_changes_true_after_edit (git_repo)
 tests_core.test_git.test_has_untracked_files_false_on_fresh_repo (git_repo)
 tests_core.test_git.test_has_untracked_files_true_for_new_file (git_repo)
 tests_core.test_git.test_git_changed_files_returns_absolute_paths (git_repo)
 tests_core.test_git.test_git_changed_files_filters_by_extension (git_repo)
 tests_core.test_git.test_git_changed_files_empty_on_clean_repo (git_repo)
 tests_core.test_git.test_git_staged_files_only_returns_staged (git_repo)
 tests_core.test_git.test_last_commit_sha_empty_on_fresh_repo (git_repo)
 tests_core.test_git.test_last_commit_sha_full_and_short (git_repo)
 tests_core.test_git.test_last_commit_message_empty_on_fresh_repo (git_repo)
 tests_core.test_git.test_last_commit_message_returns_subject (git_repo)
 tests_core.test_git.test_remote_urls_empty_on_fresh_repo (git_repo)
 tests_core.test_git.test_remote_urls_redacts_http_creds (git_repo)
 tests_core.test_git.test_is_within_project_root_true_for_child (tmp_path)
 tests_core.test_git.test_is_within_project_root_true_for_self (tmp_path)
 tests_core.test_git.test_is_within_project_root_false_for_sibling (tmp_path)
 tests_core.test_git.test_is_within_project_root_handles_nonexistent_paths (tmp_path)
 tests_core.test_git.test_is_within_project_root_false_for_symlink_escape (tmp_path)
 tests_core.test_git.test_git_changed_files_filters_out_path_escapes (git_repo, tmp_path)
 tests_core.test_git.test_legacy_shim_returns_empty_on_missing_git (tmp_path, monkeypatch)
 tests_core.test_git.test_legacy_shim_returns_empty_on_not_a_repo (tmp_path, monkeypatch)
 tests_core.test_git.test_legacy_shim_returns_empty_on_command_error (tmp_path, monkeypatch)
 tests_core.test_git.test_legacy_shim_passes_py_extension_filter (tmp_path, monkeypatch)

Variables

bool tests_core.test_git._CAN_SYMLINK = _platform_can_symlink()
tuple tests_core.test_git._SYMLINK_SKIP_REASON
str tests_core.test_git._TOKEN_URL = "https://oauth2:ghp_SUPERSECRET@github.com/foo/bar.git"