(self, tmp_path)
| 196 | |
| 197 | class TestProcessLocalFile: |
| 198 | def test_image_file(self, tmp_path): |
| 199 | img = tmp_path / "test.png" |
| 200 | img.write_bytes(b"\x89PNG\r\n\x1a\n" + b"\x00" * 100) |
| 201 | att = process_local_file(str(img)) |
| 202 | assert att.mime_type == "image/png" |
| 203 | assert att.display_name == "test.png" |
| 204 | assert att.size_bytes > 0 |
| 205 | assert len(att.content_blocks) == 1 |
| 206 | block = att.content_blocks[0] |
| 207 | assert block["type"] == "image_url" |
| 208 | assert block["image_url"]["url"].startswith("data:image/png;base64,") |
| 209 | |
| 210 | def test_text_file(self, tmp_path): |
| 211 | txt = tmp_path / "code.py" |
nothing calls this directly
no test coverage detected