Orchestrata Ultimate › Tests › Reference › scripts › test_ast_callgraph_deadparams
Tests reference — tests/scripts/test_ast_callgraph_deadparams.py
Module of tests/scripts, split out because the directory page would be too large.
Prose pending.
tests/scripts/test_ast_callgraph_deadparams.py
source · 23 tests · 389 lines
Tests for the AST tool's
call-graph(TYPE-RESOLVED),dead-params, and
| Kind | Name | Line | Description |
|---|---|---|---|
| function | test_call_graph_resolves_by_type_not_name |
51 | Two classes share method name run; only the caller whose receiver is |
| function | test_call_graph_resolves_constructor_local |
69 | |
| function | test_call_graph_resolves_field_annotation |
82 | A class field annotation (pydantic/dataclass style) lets self.x.m() |
| function | test_call_graph_callees_are_qualified |
98 | |
| function | test_call_graph_untyped_receiver_is_unresolved_not_matched |
110 | An untyped receiver b.run() must NOT be attributed to A.run — it is |
| function | test_call_graph_missing_function_returns_none |
125 | |
| function | test_dead_params_flags_unused_and_spares_used |
134 | |
| function | test_dead_params_spares_protocol_interface_methods |
147 | A Protocol method's parameters are a contract, not dead code — an |
| function | test_dead_params_spares_abstractmethod |
161 | |
| function | test_dead_params_kwonly_method_qualname |
175 | |
| function | test_untyped_flags_missing_params_and_return |
189 | |
| function | test_untyped_clean_when_annotated |
197 | |
| function | test_untyped_no_return_needed_when_no_value_returned |
212 | |
| function | test_untyped_skips_generated_protobuf_files |
219 | Generated *_pb2_grpc.py stubs are not hand-edited, so they're excluded. |
| function | test_untyped_skips_generated_header |
228 | |
| function | test_untyped_max_ratchet_cli_exit_codes |
234 | --max N exits non-zero only when the count EXCEEDS N (ratchet). |
| function | test_untyped_flags_untyped_nested_function |
271 | An untyped closure inside a fully-typed function is now flagged (depth-1 |
| function | test_untyped_flags_untyped_inner_class_method |
290 | A method on a class nested inside another class is now scanned. |
| function | test_dead_params_flags_nested_function |
307 | |
| function | test_dead_params_flags_inner_class_method |
322 | |
| function | test_call_graph_attributes_nested_call_to_inner_not_outer |
336 | A call inside a nested function is attributed to the nested function |
| function | test_call_graph_finds_inner_class_method_caller |
356 | |
| function | test_call_graph_callees_exclude_nested_function_calls |
373 | A call made by target's OWN nested helper is the helper's callee, not |