Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename 16-bit RGB rawmodes #8158

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
2 changes: 1 addition & 1 deletion Tests/test_file_tga.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def test_rgba_16() -> None:
with Image.open("Tests/images/rgba16.tga") as im:
assert im.mode == "RGBA"

assert im.getpixel((0, 0)) == (172, 0, 255, 255)
assert im.getpixel((0, 0)) == (173, 0, 255, 255)
assert im.getpixel((1, 0)) == (0, 255, 82, 0)


Expand Down
6 changes: 6 additions & 0 deletions Tests/test_imagepalette.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,12 @@ def test_rawmode_valueerrors(tmp_path: Path) -> None:
palette.save(f)


@pytest.mark.parametrize("rawmode", Image._DEPRECATED_RAWMODES)
def test_rawmode_deprecated(rawmode: str) -> None:
with pytest.warns(DeprecationWarning):
ImagePalette.raw(rawmode, b"")


def test_getdata() -> None:
# Arrange
data_in = list(range(256)) * 3
Expand Down
Loading
Loading