Test that empty lines are skipped
(self, tmp_path)
| 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""" |
nothing calls this directly
no test coverage detected