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

Method test_write_event

tests/tool_tests/test_tracing.py:271–281  ·  view source on GitHub ↗

Test writing an event

(self, tmp_path)

Source from the content-addressed store, hash-verified

269 """Tests for TraceWriter class"""
270
271 def test_write_event(self, tmp_path):
272 """Test writing an event"""
273 path = tmp_path / "trace.jsonl"
274 writer = TraceWriter(path)
275
276 writer.write({"type": "test", "data": "value"})
277
278 with open(path) as f:
279 loaded = json.loads(f.readline())
280 assert loaded["type"] == "test"
281 assert loaded["data"] == "value"
282
283 def test_write_multiple_events(self, tmp_path):
284 """Test writing multiple events"""

Callers

nothing calls this directly

Calls 2

writeMethod · 0.95
TraceWriterClass · 0.90

Tested by

no test coverage detected