← Về thư mục
tests/test_mcp_lifecycle.py
- _answer · function · L62-L68 — def _answer(indent: str = " ") -> str
- _server · function · L71-L91 — def _server( tmp_path, name: str, *, body: str, preamble: str = "", handshake: bool = True, ) -> dict
- _pids · function · L94-L95 — def _pids(config: dict) -> list[int]
- _wait_gone · function · L98-L111 — def _wait_gone(pid: int, timeout: float = 20.0) -> bool
- _reader_threads · function · L114-L119 — def _reader_threads() -> set[threading.Thread]
- test_a_failed_handshake_leaves_no_process_and_no_reader_threads · function · L137-L161 — def test_a_failed_handshake_leaves_no_process_and_no_reader_threads( tmp_path, name, body )
- test_a_failed_handshake_carries_the_connector_stderr_out_with_the_error · function · L164-L184 — def test_a_failed_handshake_carries_the_connector_stderr_out_with_the_error(tmp_path)
- test_a_server_that_closes_stdout_is_replaced_on_the_next_call · function · L188-L223 — def test_a_server_that_closes_stdout_is_replaced_on_the_next_call(tmp_path)
- test_a_timed_out_connector_is_dropped_so_the_next_call_gets_a_new_pid · function · L226-L260 — def test_a_timed_out_connector_is_dropped_so_the_next_call_gets_a_new_pid( tmp_path, monkeypatch )
- test_a_tool_level_error_does_not_restart_the_server · function · L263-L286 — def test_a_tool_level_error_does_not_restart_the_server(tmp_path)
- test_eviction_spares_a_newer_connection_for_the_same_connector_id · function · L289-L309 — def test_eviction_spares_a_newer_connection_for_the_same_connector_id(tmp_path)
- test_datapro_sessions_are_partitioned_by_live_store_generation · function · L313-L406 — def test_datapro_sessions_are_partitioned_by_live_store_generation( tmp_path, monkeypatch )
- Connection · class · L335-L359 — class Connection
- init · method · L338-L342 — def init(self, config: dict, ordinal: int)
- faulted · method · L344-L345 — def faulted(self) -> bool
- list_tools · method · L347-L352 — def list_tools(self) -> list[dict]
- close · method · L354-L356 — def close(self) -> bool
- failure · method · L358-L359 — def failure(self)
- connect · function · L361-L364 — def connect(config: dict)
- test_store_close_drops_only_its_datapro_scope_and_secret_state · function · L410-L493 — def test_store_close_drops_only_its_datapro_scope_and_secret_state( tmp_path, monkeypatch )
- Connection · class · L423-L448 — class Connection
- init · method · L426-L430 — def init(self, config: dict)
- faulted · method · L432-L433 — def faulted(self) -> bool
- list_tools · method · L435-L439 — def list_tools(self) -> list[dict]
- close · method · L441-L445 — def close(self) -> bool
- failure · method · L447-L448 — def failure(self)
- connect · function · L450-L453 — def connect(config: dict)
- test_closing_store_without_mcp_use_does_not_create_manager · function · L497-L507 — def test_closing_store_without_mcp_use_does_not_create_manager(tmp_path, monkeypatch)
- test_scoped_disconnect_rejects_only_that_store_inflight_connection · function · L511-L579 — def test_scoped_disconnect_rejects_only_that_store_inflight_connection(monkeypatch)
- Connection · class · L522-L540 — class Connection
- init · method · L525-L527 — def init(self, scope: str)
- faulted · method · L529-L530 — def faulted(self) -> bool
- list_tools · method · L532-L533 — def list_tools(self) -> list[dict]
- close · method · L535-L537 — def close(self) -> bool
- failure · method · L539-L540 — def failure(self)
- connect · function · L542-L548 — def connect(config: dict)
- connect_first · function · L553-L557 — def connect_first() -> None
- _swallow · function · L583-L592 — def _swallow(connection: MCPConnection)
- run · function · L586-L590 — def run() -> None
- test_abandoned_ids_and_in_flight_requests_are_both_capped · function · L595-L636 — def test_abandoned_ids_and_in_flight_requests_are_both_capped(tmp_path, monkeypatch)
- test_a_huge_stderr_line_is_truncated_while_it_is_read · function · L640-L676 — def test_a_huge_stderr_line_is_truncated_while_it_is_read(tmp_path)
- test_close_kills_a_wrapped_servers_real_worker_without_hanging · function · L680-L725 — def test_close_kills_a_wrapped_servers_real_worker_without_hanging(tmp_path)
- close_it · function · L708-L710 — def close_it() -> None
- test_a_child_that_ignores_every_signal_is_reported_not_assumed_dead · function · L728-L754 — def test_a_child_that_ignores_every_signal_is_reported_not_assumed_dead( tmp_path, monkeypatch )
- _ChunkStream · class · L760-L776 — class _ChunkStream
- init · method · L763-L767 — def init(self, payload: bytes, chunk: int = 7) -> None
- read · method · L769-L776 — def read(self, size: int) -> bytes
- test_the_line_reader_counts_bytes_not_characters · function · L779-L795 — def test_the_line_reader_counts_bytes_not_characters()
- test_an_over_budget_frame_is_dropped_and_the_next_one_still_parses · function · L798-L817 — def test_an_over_budget_frame_is_dropped_and_the_next_one_still_parses()
- test_a_line_split_across_reads_is_reassembled · function · L820-L831 — def test_a_line_split_across_reads_is_reassembled()
- test_a_trailing_line_with_no_newline_is_still_delivered · function · L834-L838 — def test_a_trailing_line_with_no_newline_is_still_delivered()
- test_a_slow_connect_does_not_stall_a_different_connector · function · L844-L889 — def test_a_slow_connect_does_not_stall_a_different_connector()
- _Slow · class · L860-L865 — class _Slow
- faulted · method · L861-L862 — def faulted(self)
- close · method · L864-L865 — def close(self)
- connect · function · L867-L871 — def connect(config)
- test_two_callers_for_the_same_connector_produce_one_child · function · L892-L928 — def test_two_callers_for_the_same_connector_produce_one_child()
- _Conn · class · L898-L903 — class _Conn
- faulted · method · L899-L900 — def faulted(self)
- close · method · L902-L903 — def close(self)
- connect · function · L905-L910 — def connect(config)
- test_a_connector_that_never_reads_its_stdin_does_not_hang_the_caller · function · L931-L974 — def test_a_connector_that_never_reads_its_stdin_does_not_hang_the_caller()
- _FullPipe · class · L955-L963 — class _FullPipe
- fileno · method · L956-L957 — def fileno(self)
- write · method · L959-L960 — def write(self, view): # pragma: no cover - must never be reached
- flush · method · L962-L963 — def flush(self): # pragma: no cover
- test_the_documented_deadline_override_exists_and_is_clamped · function · L980-L1008 — def test_the_documented_deadline_override_exists_and_is_clamped(monkeypatch)
- test_the_override_reaches_a_connection_and_an_argument_still_wins · function · L1011-L1025 — def test_the_override_reaches_a_connection_and_an_argument_still_wins(monkeypatch)
- test_the_dead_timeout_constant_is_gone · function · L1028-L1036 — def test_the_dead_timeout_constant_is_gone()
- test_a_frame_too_large_is_reported_as_refused_not_as_a_deadline · function · L1048-L1070 — def test_a_frame_too_large_is_reported_as_refused_not_as_a_deadline(tmp_path)
- test_a_silent_connector_is_still_a_deadline · function · L1073-L1092 — def test_a_silent_connector_is_still_a_deadline(tmp_path)
- test_a_connector_that_overflowed_is_not_torn_down · function · L1095-L1114 — def test_a_connector_that_overflowed_is_not_torn_down(tmp_path)
- test_the_refusal_state_is_a_sibling_of_the_deadline_state · function · L1117-L1129 — def test_the_refusal_state_is_a_sibling_of_the_deadline_state(tmp_path)
- test_a_server_answering_ids_nobody_asked_for_is_dropped · function · L1150-L1179 — def test_a_server_answering_ids_nobody_asked_for_is_dropped(tmp_path)
- test_the_desynchronised_connector_does_not_survive_the_verdict · function · L1182-L1195 — def test_the_desynchronised_connector_does_not_survive_the_verdict(tmp_path)
- test_a_few_unrequested_ids_are_not_a_desynchronised_channel · function · L1198-L1212 — def test_a_few_unrequested_ids_are_not_a_desynchronised_channel(tmp_path)
- test_an_abandoned_request_answered_late_does_not_count_against_the_budget · function · L1215-L1266 — def test_an_abandoned_request_answered_late_does_not_count_against_the_budget( tmp_path, )
- test_a_flood_of_late_answers_to_abandoned_ids_is_not_desynchronisation · function · L1269-L1327 — def test_a_flood_of_late_answers_to_abandoned_ids_is_not_desynchronisation( tmp_path, monkeypatch )
- test_a_kernel_flooding_its_own_stderr_stays_bounded_and_keeps_serving · function · L1333-L1369 — def test_a_kernel_flooding_its_own_stderr_stays_bounded_and_keeps_serving(tmp_path)