(tool_name: str)
| 35 | |
| 36 | |
| 37 | def _get_function_span(tool_name: str) -> dict[str, Any]: |
| 38 | for span in SPAN_PROCESSOR_TESTING.get_ordered_spans(including_empty=True): |
| 39 | exported = span.export() |
| 40 | if not exported: |
| 41 | continue |
| 42 | span_data = exported.get("span_data") |
| 43 | if not isinstance(span_data, dict): |
| 44 | continue |
| 45 | if span_data.get("type") == "function" and span_data.get("name") == tool_name: |
| 46 | return exported |
| 47 | raise AssertionError(f"Function span for tool '{tool_name}' not found") |
| 48 | |
| 49 | |
| 50 | def _shell_call(call_id: str = "call_shell") -> dict[str, Any]: |
no test coverage detected