Orchestrata Ultimate › Tests › Reference › claude › test_test_run_context
Tests reference — tests/claude/test_test_run_context.py
Module of tests/claude, split out because the directory page would be too large.
Prose pending.
tests/claude/test_test_run_context.py
source · 30 tests · 866 lines
Tests for
claude/hooks/test_run_context.py.
| Kind | Name | Line | Description |
|---|---|---|---|
| function | test_live_run_tree_leaves_no_child_behind |
146 | Q8 continuation §2 — the fixture's child never outlives the block. |
| function | test_a_run_is_reported_once_not_once_per_process |
165 | The tree collapses to its root. |
| function | test_two_checkouts_of_one_project_share_a_name_but_not_a_root |
204 | The collision itself, on real directories. |
| function | test_repo_root_is_empty_when_no_marker_is_found |
221 | An unidentifiable root must never be assumed to be ours. |
| function | test_another_checkouts_run_is_not_counted_as_ours |
284 | |
| function | test_uid_is_read_off_real_processes |
295 | The signal that survives the boundary cwd does not. |
| function | test_a_run_under_another_uid_is_foreign_even_with_an_unknown_root |
304 | The CI case: root unreadable across users, so uid is the only ground. |
| function | test_an_unknown_owner_is_never_assumed_foreign |
321 | Unreadable inputs keep a run visible as ours — the safe direction. |
| function | test_another_checkouts_run_is_still_reported_as_contention |
332 | Not ours, but it saturates the same CPUs — hiding it is the worse bug. |
| function | test_context_block_names_the_run_in_flight |
342 | Whichever run owns the tree, the block names it and only it. |
| function | test_a_heavy_command_is_denied_while_a_run_is_in_flight |
355 | |
| function | test_a_light_command_is_never_denied |
381 | Blocking cheap commands would train me to work around the hook. |
| function | test_observing_a_run_is_never_denied |
400 | Watching the guarded work must never be blocked by the guard. |
| function | test_waiting_for_a_run_to_finish_is_never_denied |
434 | The sanctioned way to wait must not be what the guard blocks. |
| function | test_a_pipe_inside_quotes_does_not_split_a_segment |
465 | A quoted argument is one word, and the splitter has to agree. |
| function | test_a_redirection_ampersand_does_not_split_a_segment |
489 | 2>&1 is one token, not two commands. |
| function | test_ranged_reads_and_text_tools_are_observation |
519 | sed -n '400,455p' file reads bytes already on disk; it starts nothing. |
| function | test_a_sequencing_ampersand_still_splits |
545 | The deny half — without it, the relaxation is a universal bypass. |
| function | test_a_heavy_command_after_a_keyword_is_still_denied |
571 | Skipping keywords must not become a way to smuggle work past the guard. |
| function | test_a_heavy_command_hiding_behind_an_observation_is_still_denied |
597 | One non-observation segment re-arms the matcher — fail closed. |
| function | test_the_override_lets_deliberate_work_through |
614 | A guard with no override is a trap, and traps get removed. |
| function | test_an_aborted_run_is_not_reported_as_a_result |
634 | passed: 0 on an aborted run is not "0 passed" — it is no result. |
| function | test_a_report_with_nothing_measured_says_nothing |
656 | |
| function | test_a_real_result_is_reported |
667 | |
| function | test_a_missing_report_is_not_an_error |
683 | |
| function | test_capacity_is_the_cpus_this_process_may_use |
687 | Affinity, not cpu_count: a pinned box must not read as idle. |
| function | test_cmdline_is_read_across_nul_separators |
698 | /proc cmdline is NUL-separated; matching raw text misses across args. |
| function | test_a_dispatcher_whose_prompt_quotes_pytest_is_not_a_run |
763 | P1 — the §1.3 incident: pid 930286, an opencode dispatcher whose |
| function | test_a_real_python_m_pytest_run_appears_in_the_context |
807 | P2 — the narrowing that fixes P1 must not lose a REAL run: an actual |
| function | test_a_venv_pytest_script_path_appears_in_the_context |
842 | P3 — an argv element whose BASENAME is pytest (the venv's |