Test ending a trace
(mock_tracing_core, mock_trace_context)
| 166 | |
| 167 | |
| 168 | def test_end_trace(mock_tracing_core, mock_trace_context): |
| 169 | """Test ending a trace""" |
| 170 | import agentops |
| 171 | |
| 172 | # End the trace |
| 173 | agentops.end_trace(mock_trace_context, end_state="Success") |
| 174 | |
| 175 | # Verify end_trace was called on global tracer |
| 176 | mock_tracing_core.end_trace.assert_called_once_with(trace_context=mock_trace_context, end_state="Success") |
| 177 | |
| 178 | |
| 179 | def test_session_decorator_creates_trace(mock_tracing_core, mock_api_client, mock_trace_context, reset_client): |
nothing calls this directly
no test coverage detected
searching dependent graphs…