Orchestrata Ultimate › Tests › Reference › scripts › test_check_graph_write_swallow

Tests reference — tests/scripts/test_check_graph_write_swallow.py

Module of tests/scripts, split out because the directory page would be too large.

Prose pending.

tests/scripts/test_check_graph_write_swallow.py

source · 48 tests · 820 lines

Tests for scripts/check_graph_write_swallow.py — the gate that fails a

Kind Name Line Description
function test_log_only_handler_over_execute_write_is_flagged 55
function test_print_only_handler_is_flagged 76
function test_reraising_handler_is_not_flagged 92
function test_handler_setting_failure_flag_is_not_flagged 110
function test_handler_appending_to_errors_collection_is_not_flagged 126
function test_handler_returning_falsy_signal_is_not_flagged 142 The exemption text: 'returns a falsy/None-vs-value signal ... is
function test_non_write_try_with_log_only_handler_is_not_flagged 162 Ordinary error handling unrelated to a graph write must never fire —
function test_augassign_on_name_returned_by_function_is_not_flagged 181 DEFECT 1 (conversation_consumer.flush): a counter bound before the
function test_augassign_on_name_never_used_again_is_still_flagged 204 A bare AugAssign to a throwaway local that is neither bound before
function test_session_run_read_only_query_is_not_flagged 223 DEFECT 2 (semantic_bridge._query_memgraph_chunks): a session.run call
function test_session_run_detach_delete_is_flagged 247 A session.run call whose resolved Cypher IS a mutating clause stays
function test_session_run_unresolvable_argument_stays_conservative 264 A session.run call whose Cypher argument can't be resolved statically
function test_execute_write_stays_unconditional_write_regardless_of_content 282 execute_write's method name IS the contract — a read-only-looking
function test_execute_autocommit_read_only_is_not_flagged 301 execute_autocommit is content-classified the same as session.run.
function test_execute_autocommit_write_is_flagged 317
function test_session_run_with_no_args_stays_conservative 332 A session.run call with no positional Cypher argument at all has
function test_session_run_concatenation_with_unresolvable_part_stays_conservative 350 A + concatenation where one side is a call result (not a
function test_session_run_explicit_string_concatenation_read_is_not_flagged 370 An explicit + concatenation of two resolvable literal parts must
function test_session_run_ignores_a_reassignment_after_the_call 389 The variable resolver only considers assignments at or before the
function test_augassign_on_for_loop_variable_is_not_flagged 409 A for-loop target bound before the try is a pre-existing binding the
function test_augassign_on_function_parameter_is_not_flagged 429 A function parameter is bound before any statement in its body,
function test_session_run_call_is_detected 447
function test_cypher_literal_without_call_is_detected 462 A DETACH DELETE literal in the try body, reached via a plain helper
function test_gate_ok_with_reason_directly_above_waives 485
function test_bare_gate_ok_does_not_waive 502
function test_finding_id_uses_path_scope_ordinal_not_line_number 524
function test_two_findings_in_same_scope_get_sequential_ordinals 541
function test_check_exits_0_when_finding_is_baselined 578
function test_check_exits_1_on_new_finding_not_in_baseline 596
function test_list_reports_findings_and_always_exits_0 612
function test_list_with_no_findings_reports_none_and_exits_0 623
function test_default_invocation_with_no_mode_flag_is_a_check 638
function test_main_list_mode_in_process 651
function test_main_list_mode_with_no_findings_in_process 659
function test_main_update_baseline_then_check_in_process 667
function test_main_check_reports_new_findings_in_process 682
function test_main_explicit_baseline_path_flag 691 --baseline overrides the <repo-root>/reports default path.
function test_scan_skips_a_missing_root 718
function test_write_baseline_then_load_baseline_roundtrip 723
function test_load_baseline_missing_file_returns_empty_set 735
function test_scan_file_skips_syntax_error 739
function test_scan_file_skips_dangling_symlink 746
function test_scan_file_skips_invalid_utf8 756
function test_is_session_like_false_for_non_name_non_attribute 764
function test_global_statement_in_handler_informs_caller 773
function test_except_star_trystar_is_detected 790
function test_live_repo_finds_cxp_auditor_swallow 812
function test_live_repo_check_passes_against_the_committed_baseline 818