Skip to content

Commit 285f9cb

Browse files
authored
Merge pull request #6635 from radarhere/pilimage_import
2 parents fea604f + 92cb0af commit 285f9cb

1 file changed

Lines changed: 8 additions & 9 deletions

File tree

Tests/test_000_sanity.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
1-
import PIL
2-
import PIL.Image
1+
from PIL import Image
32

43

54
def test_sanity():
65
# Make sure we have the binary extension
7-
PIL.Image.core.new("L", (100, 100))
6+
Image.core.new("L", (100, 100))
87

98
# Create an image and do stuff with it.
10-
im = PIL.Image.new("1", (100, 100))
9+
im = Image.new("1", (100, 100))
1110
assert (im.mode, im.size) == ("1", (100, 100))
1211
assert len(im.tobytes()) == 1300
1312

1413
# Create images in all remaining major modes.
15-
PIL.Image.new("L", (100, 100))
16-
PIL.Image.new("P", (100, 100))
17-
PIL.Image.new("RGB", (100, 100))
18-
PIL.Image.new("I", (100, 100))
19-
PIL.Image.new("F", (100, 100))
14+
Image.new("L", (100, 100))
15+
Image.new("P", (100, 100))
16+
Image.new("RGB", (100, 100))
17+
Image.new("I", (100, 100))
18+
Image.new("F", (100, 100))

0 commit comments

Comments
 (0)