← Về thư mục
tests/test_artifact_manager.py
- ArtifactHarness · class · L27-L75 — class ArtifactHarness
- init · method · L28-L60 — def init(self, tmp_path: Path, *, trusted_delivery: bool = False) -> None
- count_environment_captures · method · L62-L75 — def count_environment_captures(self) -> None
- counting · function · L71-L73 — def counting(args, *kwargs)
- test_register_freezes_version_before_emitting_event · function · L78-L104 — def test_register_freezes_version_before_emitting_event(tmp_path)
- emit · function · L83-L87 — def emit(event)
- test_trusted_register_freezes_verified_snapshot_before_record · function · L107-L137 — def test_trusted_register_freezes_verified_snapshot_before_record( tmp_path, monkeypatch )
- record_after_freeze · function · L116-L123 — def record_after_freeze(**fields)
- test_trusted_same_bytes_reuse_head_but_record_each_cell_capture · function · L140-L166 — def test_trusted_same_bytes_reuse_head_but_record_each_cell_capture(tmp_path)
- test_parent_rewrite_after_child_capture_keeps_parent_production · function · L169-L210 — def test_parent_rewrite_after_child_capture_keeps_parent_production(tmp_path)
- test_capture_detects_same_length_rewrite_that_restores_mtime · function · L213-L238 — def test_capture_detects_same_length_rewrite_that_restores_mtime(tmp_path)
- test_trusted_register_rejects_mid_freeze_rewrite_with_restored_mtime · function · L241-L303 — def test_trusted_register_rejects_mid_freeze_rewrite_with_restored_mtime( tmp_path, monkeypatch )
- rewrite_after_first_source_read · function · L256-L273 — def rewrite_after_first_source_read(descriptor, size)
- test_child_claim_survives_every_nested_ancestor_sweep · function · L306-L366 — def test_child_claim_survives_every_nested_ancestor_sweep(tmp_path)
- test_failed_child_capture_cannot_be_laundered_by_parent_sweep · function · L369-L417 — def test_failed_child_capture_cannot_be_laundered_by_parent_sweep( tmp_path, monkeypatch )
- test_receipt_set_is_fully_verified_before_any_artifact_is_published · function · L420-L465 — def test_receipt_set_is_fully_verified_before_any_artifact_is_published(tmp_path)
- test_receipt_lineage_set_is_scoped_before_any_artifact_is_published · function · L469-L538 — def test_receipt_lineage_set_is_scoped_before_any_artifact_is_published( tmp_path, invalid_input )
- test_receipt_prefreeze_race_publishes_no_partial_artifacts · function · L541-L600 — def test_receipt_prefreeze_race_publishes_no_partial_artifacts(tmp_path, monkeypatch)
- freeze_then_race · function · L566-L570 — def freeze_then_race(filename, source_path)
- test_receipts_reuse_prefrozen_bytes_when_trusted_delivery_is_off · function · L603-L658 — def test_receipts_reuse_prefrozen_bytes_when_trusted_delivery_is_off( tmp_path, monkeypatch )
- register_then_race · function · L632-L636 — def register_then_race(session, path, cell_id, emit, args, *kwargs)
- test_duplicate_delegated_receipt_is_rejected_and_claimed_failed · function · L661-L708 — def test_duplicate_delegated_receipt_is_rejected_and_claimed_failed(tmp_path)
- test_delegated_claim_capacity_fails_closed_instead_of_evicting · function · L711-L793 — def test_delegated_claim_capacity_fails_closed_instead_of_evicting( tmp_path, monkeypatch )
- test_trusted_record_fault_removes_unreferenced_prefreeze · function · L796-L817 — def test_trusted_record_fault_removes_unreferenced_prefreeze(tmp_path, monkeypatch)
- fail_record · function · L802-L806 — def fail_record(**fields)
- test_trusted_snapshot_verification_failure_never_records_or_leaves_bytes · function · L820-L837 — def test_trusted_snapshot_verification_failure_never_records_or_leaves_bytes( tmp_path, monkeypatch )
- test_capture_finalizes_provenance_version_without_duplicating_it · function · L840-L933 — def test_capture_finalizes_provenance_version_without_duplicating_it(tmp_path)
- test_explicit_save_merges_provenance_and_capture_into_one_complete_version · function · L936-L1014 — def test_explicit_save_merges_provenance_and_capture_into_one_complete_version( tmp_path, )
- test_trusted_provenance_record_reuses_same_bytes_across_cells · function · L1017-L1057 — def test_trusted_provenance_record_reuses_same_bytes_across_cells(tmp_path)
- test_repeated_explicit_saves_remain_versions_and_capture_adds_no_third · function · L1060-L1101 — def test_repeated_explicit_saves_remain_versions_and_capture_adds_no_third(tmp_path)
- test_trusted_explicit_save_reuses_same_bytes_across_cells_with_observations · function · L1104-L1135 — def test_trusted_explicit_save_reuses_same_bytes_across_cells_with_observations( tmp_path, )
- test_protect_latest_backfills_live_bytes_for_legacy_version · function · L1138-L1156 — def test_protect_latest_backfills_live_bytes_for_legacy_version(tmp_path)
- test_restore_backfills_legacy_latest_before_broadcast · function · L1159-L1205 — def test_restore_backfills_legacy_latest_before_broadcast(tmp_path)
- broadcast · function · L1182-L1190 — def broadcast(frame_id, event)
- test_restore_carries_the_retrieval_provenance_forward · function · L1208-L1266 — def test_restore_carries_the_retrieval_provenance_forward(tmp_path)
- test_restore_rejects_corrupt_snapshot_and_workspace_drift · function · L1269-L1305 — def test_restore_rejects_corrupt_snapshot_and_workspace_drift(tmp_path)
- test_restore_expected_latest_cas_rolls_back_live_and_new_snapshot · function · L1308-L1359 — def test_restore_expected_latest_cas_rolls_back_live_and_new_snapshot( tmp_path, monkeypatch )
- race_then_record · function · L1325-L1342 — def race_then_record(**fields)
- test_python_capture_uses_one_environment_and_orders_figure_first · function · L1362-L1413 — def test_python_capture_uses_one_environment_and_orders_figure_first(tmp_path)
- run_system_cell · function · L1369-L1372 — def run_system_cell(code)
- drain_remote · function · L1374-L1377 — def drain_remote()
- emit · function · L1379-L1382 — def emit(event)
- _require_matplotlib_in_the_kernel · function · L1416-L1422 — def _require_matplotlib_in_the_kernel() -> None: #
find_spec, not importorskip: importing matplotlib into the test # process is the cost these tests are about, and not theirs to pay.
- test_figure_capture_never_imports_pyplot_for_a_cell_that_did_not · function · L1455-L1486 — def test_figure_capture_never_imports_pyplot_for_a_cell_that_did_not(tmp_path, cell)
- test_figure_capture_still_saves_and_closes_a_pyplot_figure · function · L1489-L1521 — def test_figure_capture_still_saves_and_closes_a_pyplot_figure(tmp_path)
- test_r_capture_never_runs_python_figure_probe · function · L1524-L1544 — def test_r_capture_never_runs_python_figure_probe(tmp_path)
- forbidden_probe · function · L1529-L1530 — def forbidden_probe(code)
- test_no_changes_skip_environment_and_remote_provenance · function · L1547-L1581 — def test_no_changes_skip_environment_and_remote_provenance(tmp_path)
- drain_remote · function · L1556-L1559 — def drain_remote()
- test_snapshot_ignores_hidden_junk_and_nested_git_repositories · function · L1584-L1597 — def test_snapshot_ignores_hidden_junk_and_nested_git_repositories(tmp_path)
- test_promote_cell_freezes_code_and_output_as_markdown_artifact · function · L1600-L1626 — def test_promote_cell_freezes_code_and_output_as_markdown_artifact(tmp_path)
- test_promote_cell_reuses_one_artifact_and_versions_on_change · function · L1629-L1647 — def test_promote_cell_reuses_one_artifact_and_versions_on_change(tmp_path)
- test_promote_cell_fences_longer_than_backtick_runs_in_output · function · L1650-L1665 — def test_promote_cell_fences_longer_than_backtick_runs_in_output(tmp_path)
- test_promote_cell_survives_symlinked_workspace_prefix · function · L1668-L1695 — def test_promote_cell_survives_symlinked_workspace_prefix(tmp_path)
- test_promote_cell_rejects_symlinked_output_directory · function · L1698-L1711 — def test_promote_cell_rejects_symlinked_output_directory(tmp_path)
- test_promote_cell_rejects_symlinked_output_file · function · L1714-L1728 — def test_promote_cell_rejects_symlinked_output_file(tmp_path)
- test_promote_cell_embeds_workspace_figures_as_safe_data_urls · function · L1731-L1747 — def test_promote_cell_embeds_workspace_figures_as_safe_data_urls(tmp_path)
- test_imported_session_snapshots_are_inside_trusted_storage · function · L1750-L1805 — def test_imported_session_snapshots_are_inside_trusted_storage(tmp_path)
- test_snapshot_survives_the_file_types_a_cell_can_leave_behind · function · L1809-L1868 — def test_snapshot_survives_the_file_types_a_cell_can_leave_behind( tmp_path, monkeypatch )
- test_the_content_digest_is_paid_only_where_the_ctime_can_lag · function · L1871-L1901 — def test_the_content_digest_is_paid_only_where_the_ctime_can_lag(tmp_path, monkeypatch)