MCPcopy Create free account
hub / github.com/AgentOps-AI/agentops / test_end_trace

Function test_end_trace

tests/unit/test_session.py:168–176  ·  view source on GitHub ↗

Test ending a trace

(mock_tracing_core, mock_trace_context)

Source from the content-addressed store, hash-verified

166
167
168def 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
179def test_session_decorator_creates_trace(mock_tracing_core, mock_api_client, mock_trace_context, reset_client):

Callers

nothing calls this directly

Calls 1

end_traceMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…