Orchestrata Ultimate › Tests › Reference › scripts › test_check_worktree_envs

Tests reference — tests/scripts/test_check_worktree_envs.py

Module of tests/scripts, split out because the directory page would be too large.

Prose pending.

tests/scripts/test_check_worktree_envs.py

source · 41 tests · 711 lines

Tests for scripts/check_worktree_envs.py — the RUL-021 worktree-

Kind Name Line Description
function test_module_docstring_names_rul_021 80
function test_parse_worktree_list_multi_entry_and_detached 88
function test_parse_worktree_list_ignores_locked_and_prunable_annotations 117
function test_parse_worktree_list_empty_output 135
function test_check_venv_symlink_none_for_real_dir 142
function test_check_venv_missing_none_when_branch_is_none 148
function test_check_venv_missing_none_when_venv_present 153
function test_relative_vendor_paths_skips_absolute_non_vendor_and_non_path 159
function test_relative_vendor_paths_no_uv_sources_table 176
function test_relative_vendor_paths_sources_not_a_dict 180
function test_check_venv_symlink_reports_readlink_target 185
function test_check_merged_branch_returns_none_when_primary_path_missing 193 subprocess.run with a nonexistent cwd raises FileNotFoundError
function test_clean_worktree_passes 210
function test_symlinked_venv_fails 227
function test_check_env_missing_flags_a_branch_worktree_without_dotenv 247
function test_check_env_missing_none_when_dotenv_present 259
function test_check_env_missing_none_when_no_branch_checked_out 267
function test_missing_venv_fails 272
function test_unresolvable_vendor_wheel_fails 285
function test_unparseable_pyproject_reports_violation 302
function test_merged_branch_fails 316
function test_unmerged_branch_with_divergent_commit_is_not_flagged_as_merged 338
function test_detached_head_is_informational_not_a_violation 355
function test_non_git_directory_exits_zero 370
function test_run_check_skips_when_cwd_does_not_exist 381 git worktree list with a nonexistent cwd raises
function test_run_check_skips_for_bare_repo_with_no_worktrees 392
function test_fix_wheels_no_op_when_primary_also_missing_the_file 404
function test_fix_wheels_creates_hardlink_from_primary 423
function test_cli_json_output_on_non_git_dir 474
function test_cli_text_output_pass 485
function test_cli_text_output_fail_lists_violations 500
function test_main_direct_json_skip 516
function test_main_direct_text_skip 527
function test_main_direct_text_pass 537
function test_main_direct_text_fail_prints_informational_and_fixed_wheels 552 One repo, two non-primary worktrees: a clean detached one (drives the
function test_branch_level_with_master_is_new_work_not_stale 590 A branch created from master with no commits yet is NEW work.
function test_fix_wheels_replaces_a_broken_symlink_instead_of_crashing 615 --fix-wheels must survive a vendor path left as a broken symlink.
function test_checks_subset_venv_symlink_only_ignores_transient_states 657 A worktree between git worktree add and its uv sync (no .venv,
function test_checks_subset_still_catches_the_poison_class 678
function test_unknown_check_name_raises 692
function test_cli_checks_flag_selects_subset 697