mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-14 05:36:48 +03:00
15 lines
288 B
Python
15 lines
288 B
Python
from __future__ import annotations
|
|
|
|
from pathlib import Path
|
|
|
|
import pytest
|
|
|
|
from PIL import Image
|
|
|
|
|
|
def test_j2k_overflow(tmp_path: Path) -> None:
|
|
im = Image.new("RGBA", (1024, 131584))
|
|
target = str(tmp_path / "temp.jpc")
|
|
with pytest.raises(OSError):
|
|
im.save(target)
|