MCPcopy Create free account
hub / github.com/ScaleML/AgentSPEX / test_from_file

Method test_from_file

tests/tool_tests/test_tracing.py:146–163  ·  view source on GitHub ↗

Test creating replayer from file

(self, tmp_path)

Source from the content-addressed store, hash-verified

144 """Tests for TraceReplayer class"""
145
146 def test_from_file(self, tmp_path):
147 """Test creating replayer from file"""
148 path = tmp_path / "trace.jsonl"
149 events = [
150 {
151 "type": "llm_response",
152 "step_id": "1",
153 "iteration": 0,
154 "content": "Hello",
155 },
156 ]
157
158 with open(path, "w") as f:
159 for event in events:
160 f.write(json.dumps(event) + "\n")
161
162 replayer = TraceReplayer.from_file(path)
163 assert replayer._events == events
164
165 def test_next_llm_message(self, tmp_path):
166 """Test getting next LLM message"""

Callers

nothing calls this directly

Calls 2

writeMethod · 0.80
from_fileMethod · 0.80

Tested by

no test coverage detected