← Về thư mục
tests/test_kernel.py
- _echo_dispatcher · function · L23-L28 — def _echo_dispatcher(method, args)
- _authorized_bash_dispatcher · function · L31-L48 — def _authorized_bash_dispatcher(tmp_path)
- test_print_capture · function · L51-L55 — def test_print_capture()
- test_persistent_namespace · function · L58-L62 — def test_persistent_namespace()
- test_kernel_survives_the_request_thread_that_created_it · function · L74-L97 — def test_kernel_survives_the_request_thread_that_created_it(tmp_path)
- test_files_read_are_runtime_observations_not_source_guesses · function · L100-L116 — def test_files_read_are_runtime_observations_not_source_guesses(tmp_path)
- test_files_read_normalize_workspace_paths_and_exclude_external_reads · function · L119-L134 — def test_files_read_normalize_workspace_paths_and_exclude_external_reads(tmp_path)
- test_file_read_path_normalization_uses_windows_rules_without_posix_imports · function · L137-L154 — def test_file_read_path_normalization_uses_windows_rules_without_posix_imports()
- relative · function · L138-L147 — def relative(raw_path, *, cwd=r"C:\Workspace\analysis")
- test_variable_inspector_reads_only_safe_builtins_without_repr_hooks · function · L157-L198 — def test_variable_inspector_reads_only_safe_builtins_without_repr_hooks()
- test_variable_inspector_hides_the_skill_bootstrap_it_did_not_author · function · L201-L227 — def test_variable_inspector_hides_the_skill_bootstrap_it_did_not_author(tmp_path)
- test_variable_inspector_fails_busy_without_competing_frame_reader · function · L230-L255 — def test_variable_inspector_fails_busy_without_competing_frame_reader()
- run · function · L235-L239 — def run()
- test_variable_inspector_limit_validation_is_local · function · L258-L264 — def test_variable_inspector_limit_validation_is_local()
- _InitializationFailureTransport · class · L267-L300 — class _InitializationFailureTransport
- init · method · L270-L276 — def init(self, failure: str) -> None
- write_line · method · L278-L280 — def write_line(self, _line: str) -> None
- read_line · method · L282-L286 — def read_line(self) -> str
- alive · method · L288-L289 — def alive(self) -> bool
- interrupt · method · L291-L292 — def interrupt(self) -> bool
- kill · method · L294-L296 — def kill(self) -> None
- close · method · L298-L300 — def close(self, *, graceful: bool = True) -> None
- test_attestation_initialization_errors_close_the_transport · function · L304-L309 — def test_attestation_initialization_errors_close_the_transport(failure)
- test_attestation_initialization_deadline_kills_the_blocked_transport · function · L312-L320 — def test_attestation_initialization_deadline_kills_the_blocked_transport( monkeypatch, )
- test_kernel_child_environment_is_rebuilt_from_strict_allowlist · function · L323-L406 — def test_kernel_child_environment_is_rebuilt_from_strict_allowlist(tmp_path)
- test_the_kernel_interpreter_bin_dir_leads_path_when_no_env_is_selected · function · L409-L455 — def test_the_kernel_interpreter_bin_dir_leads_path_when_no_env_is_selected(tmp_path)
- test_an_r_worker_path_is_not_given_the_daemon_python · function · L458-L480 — def test_an_r_worker_path_is_not_given_the_daemon_python(monkeypatch, tmp_path)
- child_env · function · L466-L475 — def child_env(argv)
- test_host_bash_python_is_the_kernel_interpreter_in_a_non_activated_launch · function · L483-L505 — def test_host_bash_python_is_the_kernel_interpreter_in_a_non_activated_launch( monkeypatch, tmp_path )
- test_python_kernel_and_its_subprocesses_cannot_inherit_host_api_key · function · L508-L536 — def test_python_kernel_and_its_subprocesses_cannot_inherit_host_api_key( monkeypatch, tmp_path )
- test_expr_echo · function · L539-L542 — def test_expr_echo()
- test_error_lineno · function · L545-L550 — def test_error_lineno()
- test_usage_accounting · function · L553-L558 — def test_usage_accounting()
- test_host_call_roundtrip · function · L561-L564 — def test_host_call_roundtrip()
- test_host_call_with_args · function · L567-L570 — def test_host_call_with_args()
- test_host_call_error_propagates · function · L573-L581 — def test_host_call_error_propagates()
- _contract_dispatcher · function · L590-L600 — def _contract_dispatcher(method, args)
- test_response_frame_shape · function · L603-L630 — def test_response_frame_shape()
- test_stderr_captured_separately · function · L633-L638 — def test_stderr_captured_separately()
- test_stdout_chunks_stream_via_on_chunk · function · L641-L648 — def test_stdout_chunks_stream_via_on_chunk()
- test_explicit_cell_id_roundtrips_through_worker_response · function · L651-L660 — def test_explicit_cell_id_roundtrips_through_worker_response()
- test_save_artifact_host_call_carries_canonical_and_declared_cell_ids · function · L663-L709 — def test_save_artifact_host_call_carries_canonical_and_declared_cell_ids()
- dispatcher · function · L666-L668 — def dispatcher(method, args)
- _require_matplotlib_in_the_kernel · function · L712-L718 — def _require_matplotlib_in_the_kernel() -> None: #
find_spec, not importorskip: importing matplotlib into the test # process is exactly the cost these tests are about, and not theirs to pay.
- test_a_cell_that_never_plots_never_loads_matplotlib · function · L734-L760 — def test_a_cell_that_never_plots_never_loads_matplotlib( tmp_path, monkeypatch, mode, guards_off )
- _figure_lineage_dispatcher · function · L763-L772 — def _figure_lineage_dispatcher(records)
- dispatcher · function · L764-L770 — def dispatcher(method, args)
- test_figure_savefig_lineage_survives_a_matplotlib_imported_after_install · function · L785-L814 — def test_figure_savefig_lineage_survives_a_matplotlib_imported_after_install( tmp_path, same_cell )
- test_host_call_soft_fail_single_key_error_dict · function · L817-L829 — def test_host_call_soft_fail_single_key_error_dict()
- test_host_call_error_key_with_siblings_is_plain_data · function · L832-L839 — def test_host_call_error_key_with_siblings_is_plain_data()
- test_host_call_none_data_roundtrips · function · L842-L845 — def test_host_call_none_data_roundtrips()
- test_host_call_without_dispatcher_errors · function · L848-L856 — def test_host_call_without_dispatcher_errors()
- test_system_exit_is_trapped_and_worker_survives · function · L859-L869 — def test_system_exit_is_trapped_and_worker_survives()
- test_restart_bumps_generation_and_resets_namespace · function · L872-L880 — def test_restart_bumps_generation_and_resets_namespace()
- test_host_call_wire_cap_rejects_oversized_payload · function · L890-L906 — def test_host_call_wire_cap_rejects_oversized_payload()
- test_host_ack_and_bounded_discard_recovery · function · L909-L932 — def test_host_ack_and_bounded_discard_recovery()
- noisy · function · L917-L927 — def noisy(frame): # correct-id ack: the "keep waiting" signal, never a discard
- test_host_call_desync_over_budget_raises_and_kernel_survives · function · L935-L959 — def test_host_call_desync_over_budget_raises_and_kernel_survives()
- flood · function · L942-L945 — def flood(frame)
- test_sigint_interrupt_reports_interrupted_true_lineno_none · function · L962-L1009 — def test_sigint_interrupt_reports_interrupted_true_lineno_none()
- dispatcher · function · L981-L984 — def dispatcher(method, args)
- run · function · L990-L993 — def run()
- test_interrupt_stops_a_cell_whose_helper_threads_could_eat_the_signal · function · L1012-L1059 — def test_interrupt_stops_a_cell_whose_helper_threads_could_eat_the_signal()
- dispatcher · function · L1029-L1032 — def dispatcher(method, args)
- run · function · L1037-L1045 — def run()
- test_tgkill_helper_reaches_the_calling_threads_own_process · function · L1062-L1086 — def test_tgkill_helper_reaches_the_calling_threads_own_process()
- _interrupt_diagnosis · function · L1089-L1115 — def _interrupt_diagnosis(kernel) -> str
- test_kernel_children_start_with_default_sigint_even_when_spawner_ignores_it · function · L1119-L1174 — def test_kernel_children_start_with_default_sigint_even_when_spawner_ignores_it()
- spawn_and_read · function · L1150-L1157 — def spawn_and_read() -> str
- test_a_chunk_from_another_cell_is_not_this_cell_s_output · function · L1177-L1209 — def test_a_chunk_from_another_cell_is_not_this_cell_s_output(monkeypatch)
- readline_once_from_another_cell · function · L1192-L1200 — def readline_once_from_another_cell()
- test_user_raised_keyboardinterrupt_is_normal_error_with_lineno · function · L1212-L1221 — def test_user_raised_keyboardinterrupt_is_normal_error_with_lineno()
- sigint_probe · function · L1225-L1257 — def sigint_probe(monkeypatch)
- fake_signal · function · L1238-L1242 — def fake_signal(signum, handler)
- test_a_sigint_that_beats_user_code_is_owed_not_dropped · function · L1260-L1285 — def test_a_sigint_that_beats_user_code_is_owed_not_dropped(sigint_probe)
- test_arming_a_cell_clears_a_signal_owed_to_the_previous_one · function · L1288-L1301 — def test_arming_a_cell_clears_a_signal_owed_to_the_previous_one(sigint_probe)
- test_a_sigint_during_a_protocol_write_still_finishes_the_frame · function · L1304-L1365 — def test_a_sigint_during_a_protocol_write_still_finishes_the_frame(monkeypatch)
- _SignallingSink · class · L1328-L1336 — class _SignallingSink
- write · method · L1331-L1333 — def write(self, text)
- flush · method · L1335-L1336 — def flush(self)
- test_an_interrupt_inside_a_host_call_leaves_the_kernel_usable · function · L1368-L1402 — def test_an_interrupt_inside_a_host_call_leaves_the_kernel_usable()
- dispatcher · function · L1385-L1391 — def dispatcher(method, args)
- test_a_worker_diagnostic_is_retained_rather_than_dropped · function · L1405-L1425 — def test_a_worker_diagnostic_is_retained_rather_than_dropped(monkeypatch)
- readline_once_with_a_diagnostic · function · L1415-L1419 — def readline_once_with_a_diagnostic()
- test_arming_failure_is_announced_instead_of_returning_silently · function · L1428-L1447 — def test_arming_failure_is_announced_instead_of_returning_silently(monkeypatch)
- refuse · function · L1438-L1439 — def refuse(*_args)
- test_the_worker_runs_in_its_own_session · function · L1451-L1463 — def test_the_worker_runs_in_its_own_session()
- test_killing_the_worker_also_ends_what_the_cell_started · function · L1467-L1534 — def test_killing_the_worker_also_ends_what_the_cell_started()
- test_an_idle_worker_survives_an_interrupt_before_its_first_cell · function · L1537-L1553 — def test_an_idle_worker_survives_an_interrupt_before_its_first_cell()
- test_host_bash_is_kernel_local_and_never_rpcs · function · L1556-L1583 — def test_host_bash_is_kernel_local_and_never_rpcs(tmp_path)
- no_bash_dispatcher · function · L1563-L1566 — def no_bash_dispatcher(method, args)
- test_host_bash_capability_is_bound_to_exact_worker_spawn · function · L1586-L1610 — def test_host_bash_capability_is_bound_to_exact_worker_spawn(tmp_path)
- inspect_binding · function · L1591-L1593 — def inspect_binding(spec)
- test_host_bash_static_precheck_blocks_catastrophe · function · L1613-L1622 — def test_host_bash_static_precheck_blocks_catastrophe(tmp_path)
- test_one_print_cannot_put_an_unbounded_frame_on_the_protocol_pipe · function · L1629-L1660 — def test_one_print_cannot_put_an_unbounded_frame_on_the_protocol_pipe()