|
1 | | -import PIL |
2 | | -import PIL.Image |
| 1 | +from PIL import Image |
3 | 2 |
|
4 | 3 |
|
5 | 4 | def test_sanity(): |
6 | 5 | # Make sure we have the binary extension |
7 | | - PIL.Image.core.new("L", (100, 100)) |
| 6 | + Image.core.new("L", (100, 100)) |
8 | 7 |
|
9 | 8 | # Create an image and do stuff with it. |
10 | | - im = PIL.Image.new("1", (100, 100)) |
| 9 | + im = Image.new("1", (100, 100)) |
11 | 10 | assert (im.mode, im.size) == ("1", (100, 100)) |
12 | 11 | assert len(im.tobytes()) == 1300 |
13 | 12 |
|
14 | 13 | # 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