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

Method test_skip_empty_lines

tests/tool_tests/test_tracing.py:95–107  ·  view source on GitHub ↗

Test that empty lines are skipped

(self, tmp_path)

Source from the content-addressed store, hash-verified

93 assert result == events
94
95 def test_skip_empty_lines(self, tmp_path):
96 """Test that empty lines are skipped"""
97 path = tmp_path / "trace.jsonl"
98
99 with open(path, "w") as f:
100 f.write('{"id": 1}\n')
101 f.write("\n") # Empty line
102 f.write('{"id": 2}\n')
103 f.write(" \n") # Whitespace-only line
104 f.write('{"id": 3}\n')
105
106 result = list(iter_jsonl(path))
107 assert len(result) == 3
108
109 def test_empty_file(self, tmp_path):
110 """Test reading empty file"""

Callers

nothing calls this directly

Calls 2

iter_jsonlFunction · 0.90
writeMethod · 0.80

Tested by

no test coverage detected