← Về thư mục
tests/test_env_generations.py
- _spec · function · L35-L38 — def _spec(tmp_path: Path, name: str = "python", body: str = "numpy\n") -> Path
- _completed · function · L41-L44 — def _completed(returncode: int = 0, stderr: bytes = b"")
- store · function · L48-L58 — def store(tmp_path)
- runner · function · L51-L56 — def runner(argv, cwd): # argv[-1] is the prefix this build was asked to create.
- _build · function · L61-L66 — def _build(prefix: Path, staged_spec: Path): #
staged_spec is the immutable copy taken under the apply lock, not the # caller's path: the manifest's hash has to describe the bytes that were # actually built from, and a live path can be edited after the hash.
- _verify · function · L69-L71 — def _verify(prefix: Path)
- _apply · function · L74-L76 — def _apply(store, spec, name="python")
- test_a_plan_reports_a_create_and_changes_nothing · function · L84-L92 — def test_a_plan_reports_a_create_and_changes_nothing(store, tmp_path)
- test_an_unchanged_spec_plans_to_do_nothing · function · L95-L101 — def test_an_unchanged_spec_plans_to_do_nothing(store, tmp_path)
- test_a_current_rollback_eligible_superseded_generation_can_be_a_noop · function · L104-L123 — def test_a_current_rollback_eligible_superseded_generation_can_be_a_noop( store, tmp_path )
- test_an_explicit_repair_replaces_even_when_the_spec_is_unchanged · function · L126-L135 — def test_an_explicit_repair_replaces_even_when_the_spec_is_unchanged(store, tmp_path)
- test_an_explicit_repair_converges_from_a_broken_current_pointer · function · L139-L170 — def test_an_explicit_repair_converges_from_a_broken_current_pointer( store, tmp_path, damage )
- test_repair_refuses_when_a_broken_pointer_changes_after_planning · function · L173-L192 — def test_repair_refuses_when_a_broken_pointer_changes_after_planning(store, tmp_path)
- test_apply_never_follows_a_managed_layout_symlink_outside_the_store · function · L196-L222 — def test_apply_never_follows_a_managed_layout_symlink_outside_the_store( store, tmp_path, symlink_layer )
- test_plan_refuses_an_existing_managed_layout_symlink · function · L225-L235 — def test_plan_refuses_an_existing_managed_layout_symlink(store, tmp_path)
- test_a_changed_spec_plans_a_replacement · function · L238-L246 — def test_a_changed_spec_plans_a_replacement(store, tmp_path)
- test_apply_creates_a_generation_and_points_at_it · function · L254-L262 — def test_apply_creates_a_generation_and_points_at_it(store, tmp_path)
- test_a_second_apply_leaves_the_first_generation_on_disk · function · L265-L275 — def test_a_second_apply_leaves_the_first_generation_on_disk(store, tmp_path)
- test_the_pointer_only_ever_names_a_ready_generation · function · L278-L281 — def test_the_pointer_only_ever_names_a_ready_generation(store, tmp_path)
- test_a_failed_build_leaves_the_current_environment_untouched · function · L289-L316 — def test_a_failed_build_leaves_the_current_environment_untouched(tmp_path)
- flaky · function · L295-L302 — def flaky(argv, cwd)
- test_a_failed_build_never_becomes_a_generation · function · L319-L335 — def test_a_failed_build_never_becomes_a_generation(tmp_path)
- test_a_verify_that_refuses_fails_the_apply · function · L338-L352 — def test_a_verify_that_refuses_fails_the_apply(tmp_path)
- empty_build · function · L342-L344 — def empty_build(argv, cwd)
- test_standard_verification_requires_the_complete_shipped_package_set · function · L359-L393 — def test_standard_verification_requires_the_complete_shipped_package_set( tmp_path, monkeypatch, name, language, required_count )
- scan · function · L378-L380 — def scan(candidate, *, language)
- test_a_repair_with_missing_standard_packages_keeps_the_old_pointer · function · L396-L430 — def test_a_repair_with_missing_standard_packages_keeps_the_old_pointer( store, tmp_path, monkeypatch )
- test_a_build_that_raises_before_running_still_reports · function · L433-L452 — def test_a_build_that_raises_before_running_still_reports(tmp_path)
- exploding_build · function · L444-L445 — def exploding_build(_prefix, _staged_spec)
- test_two_concurrent_applies_cannot_both_land · function · L460-L503 — def test_two_concurrent_applies_cannot_both_land(tmp_path)
- slow · function · L466-L474 — def slow(argv, cwd)
- run · function · L482-L490 — def run()
- test_an_apply_planned_against_a_stale_current_is_refused · function · L506-L514 — def test_an_apply_planned_against_a_stale_current_is_refused(store, tmp_path)
- test_a_leftover_lock_file_does_not_block_a_fresh_apply · function · L517-L527 — def test_a_leftover_lock_file_does_not_block_a_fresh_apply(store, tmp_path)
- test_rollback_moves_the_pointer_and_rebuilds_nothing · function · L535-L552 — def test_rollback_moves_the_pointer_and_rebuilds_nothing(store, tmp_path)
- counting_runner · function · L543-L545 — def counting_runner(argv, cwd)
- test_rollback_refuses_a_generation_that_never_finished · function · L555-L558 — def test_rollback_refuses_a_generation_that_never_finished(store, tmp_path)
- test_rollback_refuses_when_the_prefix_is_gone · function · L561-L573 — def test_rollback_refuses_when_the_prefix_is_gone(store, tmp_path)
- test_rolling_forward_again_works · function · L576-L584 — def test_rolling_forward_again_works(store, tmp_path)
- test_an_applied_generation_may_not_be_modified · function · L592-L595 — def test_an_applied_generation_may_not_be_modified(store, tmp_path)
- test_superseding_a_generation_does_not_rewrite_its_manifest · function · L598-L617 — def test_superseding_a_generation_does_not_rewrite_its_manifest(store, tmp_path)
- test_discard_refuses_to_touch_a_generation · function · L620-L625 — def test_discard_refuses_to_touch_a_generation(store, tmp_path)
- test_discard_refuses_a_path_outside_the_environment · function · L628-L631 — def test_discard_refuses_a_path_outside_the_environment(store, tmp_path)
- test_a_restart_finds_the_current_generation_intact · function · L639-L644 — def test_a_restart_finds_the_current_generation_intact(store, tmp_path)
- test_a_restart_reports_a_build_that_died_mid_flight · function · L647-L661 — def test_a_restart_reports_a_build_that_died_mid_flight(store, tmp_path)
- test_an_abandoned_build_can_be_discarded · function · L664-L671 — def test_an_abandoned_build_can_be_discarded(store, tmp_path)
- test_the_history_records_what_happened · function · L674-L682 — def test_the_history_records_what_happened(store, tmp_path)
- _cli_module · function · L690-L695 — def _cli_module()
- _cli · function · L698-L700 — def _cli(argv, capsys)
- test_the_cli_plans_without_creating_anything · function · L703-L710 — def test_the_cli_plans_without_creating_anything(tmp_path, monkeypatch, capsys)
- test_the_cli_apply_dry_run_changes_nothing · function · L713-L719 — def test_the_cli_apply_dry_run_changes_nothing(tmp_path, monkeypatch, capsys)
- test_the_cli_repair_flag_plans_and_applies_a_fresh_generation · function · L722-L753 — def test_the_cli_repair_flag_plans_and_applies_a_fresh_generation( tmp_path, monkeypatch, capsys )
- runner · function · L727-L731 — def runner(argv, cwd)
- test_the_cli_reports_a_failed_apply_without_moving_the_pointer · function · L756-L771 — def test_the_cli_reports_a_failed_apply_without_moving_the_pointer( tmp_path, monkeypatch, capsys )
- test_the_cli_lists_generations_and_the_current_one · function · L774-L795 — def test_the_cli_lists_generations_and_the_current_one(tmp_path, monkeypatch, capsys)
- runner · function · L777-L781 — def runner(argv, cwd)
- test_two_threads_contending_a_leftover_lock_do_not_both_run · function · L803-L840 — def test_two_threads_contending_a_leftover_lock_do_not_both_run(tmp_path)
- contend · function · L815-L826 — def contend(tag)
- test_the_lock_is_released_on_exit_and_the_file_persists · function · L843-L863 — def test_the_lock_is_released_on_exit_and_the_file_persists(tmp_path)
- test_a_no_op_apply_is_refused_when_the_spec_changed_since_the_plan · function · L866-L877 — def test_a_no_op_apply_is_refused_when_the_spec_changed_since_the_plan(store, tmp_path)
- test_a_no_op_apply_is_refused_when_the_pointer_moved_since_the_plan · function · L880-L895 — def test_a_no_op_apply_is_refused_when_the_pointer_moved_since_the_plan( store, tmp_path )
- test_a_held_lock_cannot_be_displaced_by_another_applier · function · L904-L925 — def test_a_held_lock_cannot_be_displaced_by_another_applier(tmp_path)
- test_a_transient_lock_hold_does_not_spuriously_reject_an_apply · function · L928-L960 — def test_a_transient_lock_hold_does_not_spuriously_reject_an_apply(tmp_path)
- transient_holder · function · L943-L950 — def transient_holder()
- test_three_concurrent_applies_with_a_leftover_lock_yield_exactly_one · function · L963-L1009 — def test_three_concurrent_applies_with_a_leftover_lock_yield_exactly_one(tmp_path)
- slow · function · L970-L975 — def slow(argv, cwd)
- run · function · L989-L997 — def run()
- test_recover_does_not_report_a_build_an_apply_is_still_writing · function · L1012-L1042 — def test_recover_does_not_report_a_build_an_apply_is_still_writing(tmp_path)
- test_a_spec_edited_between_the_apply_hash_and_the_copy_is_rejected · function · L1045-L1077 — def test_a_spec_edited_between_the_apply_hash_and_the_copy_is_rejected(tmp_path)
- runner · function · L1051-L1055 — def runner(argv, cwd)
- swap_then_copy · function · L1063-L1066 — def swap_then_copy(src, dst, a, *k): # Simulate an editor replacing the live spec after the apply-time hash.
- _foreign_generation · function · L1085-L1102 — def _foreign_generation(root: Path, env: str, gid: str) -> Path
- test_a_rollback_id_cannot_traverse_into_another_environment · function · L1105-L1125 — def test_a_rollback_id_cannot_traverse_into_another_environment(store, tmp_path)
- test_a_manifest_that_names_another_environment_is_not_this_environment · function · L1128-L1142 — def test_a_manifest_that_names_another_environment_is_not_this_environment( store, tmp_path )
- test_a_manifest_whose_prefix_escapes_its_generation_is_refused · function · L1145-L1169 — def test_a_manifest_whose_prefix_escapes_its_generation_is_refused(store, tmp_path)
- test_the_pointer_is_never_written_with_anything_but_a_bare_id · function · L1172-L1178 — def test_the_pointer_is_never_written_with_anything_but_a_bare_id(store, tmp_path)
- test_a_pointer_holding_a_traversal_does_not_resolve · function · L1181-L1189 — def test_a_pointer_holding_a_traversal_does_not_resolve(store, tmp_path)