← Về thư mục
tests/arbor/test_scripts.py
- ArborRunTestCase · class · L36-L71 — class ArborRunTestCase(unittest.TestCase)
- setUp · method · L39-L43 — def setUp(self) -> None
- run_command · method · L45-L51 — def run_command(self, *argv: str) -> tuple[str, str]
- init · method · L53-L63 — def init(self, **overrides: str) -> None
- tree · method · L66-L67 — def tree(self) -> dict
- run_config · method · L70-L71 — def run_config(self) -> dict
- InitTests · class · L74-L127 — class InitTests(ArborRunTestCase)
- test_init_creates_both_state_files_with_a_root_node · method · L75-L86 — def test_init_creates_both_state_files_with_a_root_node(self) -> None
- test_run_config_records_the_budget_and_starts_unspent · method · L88-L96 — def test_run_config_records_the_budget_and_starts_unspent(self) -> None
- test_init_refuses_to_erase_an_existing_run · method · L98-L102 — def test_init_refuses_to_erase_an_existing_run(self) -> None
- test_force_overwrites_and_resets_the_counter · method · L104-L122 — def test_force_overwrites_and_resets_the_counter(self) -> None
- test_commands_before_init_explain_how_to_start · method · L124-L127 — def test_commands_before_init_explain_how_to_start(self) -> None
- NodeTests · class · L130-L180 — class NodeTests(ArborRunTestCase)
- setUp · method · L131-L133 — def setUp(self) -> None
- test_ids_are_sequential_and_depth_is_derived_from_the_parent · method · L135-L145 — def test_ids_are_sequential_and_depth_is_derived_from_the_parent(self) -> None
- test_new_nodes_start_pending_with_empty_evidence · method · L147-L153 — def test_new_nodes_start_pending_with_empty_evidence(self) -> None
- test_depth_one_is_a_direction_and_deeper_is_an_intervention · method · L155-L159 — def test_depth_one_is_a_direction_and_deeper_is_an_intervention(self) -> None
- test_exceeding_max_depth_warns_but_still_records · method · L161-L166 — def test_exceeding_max_depth_warns_but_still_records(self) -> None
- test_an_unknown_parent_is_refused_with_a_pointer_to_status · method · L168-L171 — def test_an_unknown_parent_is_refused_with_a_pointer_to_status(self) -> None
- test_status_must_come_from_the_documented_set · method · L173-L180 — def test_status_must_come_from_the_documented_set(self) -> None
- EvidenceTests · class · L183-L227 — class EvidenceTests(ArborRunTestCase)
- setUp · method · L184-L188 — def setUp(self) -> None
- test_evidence_defaults_the_status_to_executed · method · L190-L197 — def test_evidence_defaults_the_status_to_executed(self) -> None
- test_an_explicit_status_overrides_the_default · method · L199-L203 — def test_an_explicit_status_overrides_the_default(self) -> None
- test_a_partial_update_leaves_untouched_fields_alone · method · L205-L218 — def test_a_partial_update_leaves_untouched_fields_alone(self) -> None
- test_a_leaf_with_ancestors_is_reminded_to_propagate · method · L220-L223 — def test_a_leaf_with_ancestors_is_reminded_to_propagate(self) -> None
- test_a_zero_dev_score_is_recorded_rather_than_treated_as_absent · method · L225-L227 — def test_a_zero_dev_score_is_recorded_rather_than_treated_as_absent(self) -> None
- PropagateTests · class · L230-L266 — class PropagateTests(ArborRunTestCase)
- setUp · method · L231-L235 — def setUp(self) -> None
- test_default_propagation_reaches_only_the_immediate_parent · method · L237-L241 — def test_default_propagation_reaches_only_the_immediate_parent(self) -> None
- test_to_root_reaches_every_ancestor · method · L243-L249 — def test_to_root_reaches_every_ancestor(self) -> None
- test_insights_accumulate_rather_than_overwrite · method · L251-L257 — def test_insights_accumulate_rather_than_overwrite(self) -> None
- test_every_line_records_which_node_it_came_from · method · L259-L261 — def test_every_line_records_which_node_it_came_from(self) -> None
- test_the_root_has_no_ancestors_to_propagate_to · method · L263-L266 — def test_the_root_has_no_ancestors_to_propagate_to(self) -> None
- PruneTests · class · L269-L304 — class PruneTests(ArborRunTestCase)
- setUp · method · L270-L275 — def setUp(self) -> None
- test_pruning_takes_the_whole_subtree · method · L277-L283 — def test_pruning_takes_the_whole_subtree(self) -> None
- test_the_reason_is_recorded_on_the_target_only · method · L285-L289 — def test_the_reason_is_recorded_on_the_target_only(self) -> None
- test_a_merged_node_survives_a_prune_of_its_ancestor · method · L291-L300 — def test_a_merged_node_survives_a_prune_of_its_ancestor(self) -> None: # A merged node is already in M_best; pruning its parent must not # retroactively mark the promoted work as a dead end.
- test_pruning_the_root_is_a_no_op · method · L302-L304 — def test_pruning_the_root_is_a_no_op(self) -> None
- MergeGateTests · class · L307-L361 — class MergeGateTests(ArborRunTestCase)
- _prepare · method · L308-L311 — def _prepare(self, direction: str = "max") -> None
- test_the_first_candidate_always_passes · method · L313-L322 — def test_the_first_candidate_always_passes(self) -> None
- test_a_worse_candidate_is_rejected_and_leaves_m_best_alone · method · L324-L334 — def test_a_worse_candidate_is_rejected_and_leaves_m_best_alone(self) -> None
- test_minimisation_runs_invert_the_comparison · method · L336-L342 — def test_minimisation_runs_invert_the_comparison(self) -> None
- test_an_exact_tie_does_not_displace_the_incumbent · method · L344-L349 — def test_an_exact_tie_does_not_displace_the_incumbent(self) -> None
- test_the_node_branch_ref_is_used_when_none_is_supplied · method · L351-L355 — def test_the_node_branch_ref_is_used_when_none_is_supplied(self) -> None
- test_a_negative_score_can_still_be_the_first_best · method · L357-L361 — def test_a_negative_score_can_still_be_the_first_best(self) -> None: #
better() special-cases only old is None, not falsiness.
- CycleTests · class · L364-L379 — class CycleTests(ArborRunTestCase)
- test_cycles_count_up_and_report_the_remainder · method · L365-L372 — def test_cycles_count_up_and_report_the_remainder(self) -> None
- test_the_counter_keeps_going_past_the_budget · method · L374-L379 — def test_the_counter_keeps_going_past_the_budget(self) -> None
- ValidateTests · class · L382-L421 — class ValidateTests(ArborRunTestCase)
- setUp · method · L383-L386 — def setUp(self) -> None
- _write_tree · method · L388-L389 — def _write_tree(self, tree: dict) -> None
- test_a_healthy_tree_validates · method · L391-L394 — def test_a_healthy_tree_validates(self) -> None
- test_a_dangling_parent_is_caught · method · L396-L401 — def test_a_dangling_parent_is_caught(self) -> None
- test_an_invalid_status_is_caught · method · L403-L408 — def test_an_invalid_status_is_caught(self) -> None
- test_a_best_node_that_was_never_merged_is_caught · method · L410-L415 — def test_a_best_node_that_was_never_merged_is_caught(self) -> None
- test_a_merged_best_node_validates · method · L417-L421 — def test_a_merged_best_node_validates(self) -> None
- ProjectionTests · class · L424-L441 — class ProjectionTests(ArborRunTestCase)
- test_observe_reports_the_objective_and_every_node · method · L425-L433 — def test_observe_reports_the_objective_and_every_node(self) -> None
- test_status_renders_the_tree_without_mutating_it · method · L435-L441 — def test_status_renders_the_tree_without_mutating_it(self) -> None
- PersistenceTests · class · L444-L457 — class PersistenceTests(ArborRunTestCase)
- test_writes_leave_no_temporary_file_behind · method · L445-L451 — def test_writes_leave_no_temporary_file_behind(self) -> None: # _save writes to a .tmp sibling and replaces, so a crash cannot leave # a half-written tree.json -- but it must also clean up on success.
- test_state_survives_a_fresh_read · method · L453-L457 — def test_state_survives_a_fresh_read(self) -> None