(tmp_path: Path)
| 45 | |
| 46 | |
| 47 | def test_multispectral_tiff_float32(tmp_path: Path) -> None: |
| 48 | arr = np.random.rand(64, 64, 5).astype(np.float32) * 0.5 |
| 49 | path = tmp_path / "multispectral.tif" |
| 50 | tifffile.imwrite(str(path), arr) |
| 51 | |
| 52 | data = read_image_file(filename=str(path)) |
| 53 | assert data[:2] == b"\xff\xd8" |
| 54 | |
| 55 | img = PIL.Image.open(io.BytesIO(data)) |
| 56 | assert img.mode == "RGB" |
| 57 | assert img.size == (64, 64) |
| 58 | |
| 59 | |
| 60 | def test_grayscale_tiff_float32(tmp_path: Path) -> None: |
nothing calls this directly
no test coverage detected