We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d699a1d commit 58c6303Copy full SHA for 58c6303
Tests/test_tiff_palette.py
@@ -1,13 +1,14 @@
1
+from __future__ import annotations
2
+
3
import io
-import pytest
4
5
from PIL import Image, ImageDraw
6
7
8
def test_tiff_palette() -> None:
- image = Image.new('P', (3, 1))
9
+ image = Image.new("P", (3, 1))
10
file = io.BytesIO()
- image.save(file, 'tiff')
11
+ image.save(file, "tiff")
12
13
image = Image.open(file)
14
draw = ImageDraw.Draw(image)
@@ -18,7 +19,7 @@ def test_tiff_palette() -> None:
18
19
draw.point((1, 0), fill=COLOR_1)
20
draw.point((2, 0), fill=COLOR_2)
21
- converted_data = list(image.convert('RGB').getdata())
22
+ converted_data = list(image.convert("RGB").getdata())
23
assert len(converted_data) == 3
24
assert converted_data[0] == COLOR_0
25
assert converted_data[1] == COLOR_1
0 commit comments