Orchestrata Ultimate › Tests › Reference › scripts › test_ast_skeleton_gates

Tests reference — tests/scripts/test_ast_skeleton_gates.py

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

Prose pending.

tests/scripts/test_ast_skeleton_gates.py

source · 51 tests · 1003 lines

Tests for the gen-skeleton FAILURE-DETECTION GATES — Gate 0 (construction

Kind Name Line Description
class TestGate0ConstructionSmoke 78
method TestGate0ConstructionSmoke.test_catches_deliberately_broken_construction 79 Corrupt the FILE on disk (never the checker) so a real
method TestGate0ConstructionSmoke.test_gate0_passes_real_spec072_reqmapped_contract 103 The real, req-id-clean twin of SPEC-072.mmd must construct
method TestGate0ConstructionSmoke.test_gate0_passes_real_spec021_ontology_contract 120
method TestGate0ConstructionSmoke.test_zero_arg_leaf_method_not_implemented_is_pass 133 A zero-arg leaf method raising its generated
method TestGate0ConstructionSmoke.test_accessor_method_returns_composed_field_without_failure 143 The fully-generated accessor (get_x -> return self._x)
method TestGate0ConstructionSmoke.test_module_exec_failure_is_a_gate0_failure 152 A real-world case: SPEC-072.mmd's own (non-reqmapped) requirement
method TestGate0ConstructionSmoke.test_import_failure_is_a_skip_not_a_failure 168 A REUSE'd real import that isn't resolvable in the scratch exec
method TestGate0ConstructionSmoke.test_keyword_only_required_param_gets_a_dummy 184 _gate0_init_required_params must also read keyword-only
method TestGate0ConstructionSmoke.test_class_name_shadowed_by_non_type_is_skipped_not_failed 199 A module attribute that shares a class's name but isn't a type
method TestGate0ConstructionSmoke.test_import_error_during_construction_is_a_skip 214 An ImportError raised INSIDE __init__ itself (not at
method TestGate0ConstructionSmoke.test_async_zero_arg_leaf_method_is_pass 230 An async zero-arg leaf method's NotImplementedError must be
method TestGate0ConstructionSmoke.test_import_error_during_zero_arg_method_call_is_a_skip 248
method TestGate0ConstructionSmoke.test_broken_zero_arg_method_call_is_a_gate0_failure 268 Corrupt the FILE (a leaf method's body), not the checker: a real
class TestRunGenSkeletonGates 286
method TestRunGenSkeletonGates.test_reports_skip_without_failing 287
method TestRunGenSkeletonGates.test_reports_failure 303
class TestGate0Dummies 319
method TestGate0Dummies.test_cheapest_dummy_for_annotation 320
method TestGate0Dummies.test_synthesized_init_skips_varargs_and_already_defaulted_params 334 A class with NO explicit __init__ of its own (so
class TestNoSmokeFlag 359
method TestNoSmokeFlag.test_no_smoke_skips_gate0 360
method TestNoSmokeFlag.test_default_runs_gate0 369
class TestNamespaceRoutingGates 405
method TestNamespaceRoutingGates.test_output_mode_fails_when_one_module_fails_gate0 406
method TestNamespaceRoutingGates.test_stdout_mode_fails_when_one_module_fails_gate0 415
method TestNamespaceRoutingGates.test_output_mode_passes_when_all_modules_pass_gate0 422
method TestNamespaceRoutingGates.test_namespace_with_all_classes_unsupported_stereotype_errors 445 A namespace group whose ONLY class carries an unsupported
class TestGate2LeafFractionTable 479
method TestGate2LeafFractionTable.test_flags_0_and_100_percent 480
method TestGate2LeafFractionTable.test_all_leaf_class_flagged_100_percent 493
method TestGate2LeafFractionTable.test_all_accessor_class_flagged_0_percent 512
method TestGate2LeafFractionTable.test_table_prints_a_summary 531
method TestGate2LeafFractionTable.test_advisory_never_fails_the_cli 543 A 100%-leaf class (the AllLeaf-style case) must still exit 0
class TestSkeletonDiffFunction 575
method TestSkeletonDiffFunction.test_identical_files_none 576
method TestSkeletonDiffFunction.test_leaf_body_only_edit_is_none 587
method TestSkeletonDiffFunction.test_added_helper_method_is_minor 604
method TestSkeletonDiffFunction.test_changed_init_signature_is_structural 619
method TestSkeletonDiffFunction.test_changed_base_list_is_structural 641
method TestSkeletonDiffFunction.test_deleted_method_is_structural 658
method TestSkeletonDiffFunction.test_added_import_is_info_only 685
method TestSkeletonDiffFunction.test_deleted_whole_class_is_structural 697
method TestSkeletonDiffFunction.test_init_body_changed_only_is_structural 730 __init__ is never a leaf — even a body-only edit (signature
method TestSkeletonDiffFunction.test_added_whole_class_is_minor 755
method TestSkeletonDiffFunction.test_toplevel_function_deleted_is_structural 773 gen-skeleton never emits bare top-level functions, but
method TestSkeletonDiffFunction.test_toplevel_function_signature_changed_is_structural 795
method TestSkeletonDiffFunction.test_toplevel_function_added_is_minor 817
class TestSkeletonDiffCli 841
method TestSkeletonDiffCli.test_cli_none_exits_zero 850
method TestSkeletonDiffCli.test_cli_structural_exits_one 863
method TestSkeletonDiffCli.test_cli_minor_exits_zero_and_reports_added_import_info 878
method TestSkeletonDiffCli.test_cli_appears_in_help 899
class TestGenSkeletonSelfVerify 915
method TestGenSkeletonSelfVerify.test_clean_traces_self_verify_passes 916
method TestGenSkeletonSelfVerify.test_malformed_req_id_self_verify_fails 938 SPEC-072.mmd's own req ids (FR-021 etc.) don't match the real
method TestGenSkeletonSelfVerify.test_no_traces_in_diagram_skips_self_verify 952
method TestGenSkeletonSelfVerify.test_stdout_only_skips_self_verify 960 No --output means nothing was written to disk — self-verify
method TestGenSkeletonSelfVerify.test_self_verify_function_directly 981
method TestGenSkeletonSelfVerify.test_self_verify_function_reports_malformed 993