Test saving empty list.
(self, jsonl_format, temp_dir)
| 262 | assert "unicode test value" in content |
| 263 | |
| 264 | def test_save_empty_list(self, jsonl_format, temp_dir): |
| 265 | """Test saving empty list.""" |
| 266 | filepath = os.path.join(temp_dir, "empty.jsonl") |
| 267 | jsonl_format.save([], filepath) |
| 268 | |
| 269 | with open(filepath, "r") as f: |
| 270 | content = f.read() |
| 271 | assert content == "" or content == "\n" |
| 272 | |
| 273 | |
| 274 | class TestFormatRegistry: |