mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-10 19:56:47 +03:00
Fix test
This commit is contained in:
parent
2e716de63d
commit
64c08f4dba
|
@ -34,14 +34,14 @@ def test_aspect():
|
|||
im.thumbnail((100, 100))
|
||||
assert im.size == (100, 50)
|
||||
|
||||
im = Image.new("L", (256, 128))
|
||||
im.thumbnail((100, 50))
|
||||
assert im.size == (100, 50)
|
||||
|
||||
im = Image.new("L", (64, 64))
|
||||
im.thumbnail((100, 100))
|
||||
assert im.size == (64, 64)
|
||||
|
||||
im = Image.new("L", (128, 128))
|
||||
im.thumbnail((100, 100))
|
||||
assert im.size == (100, 100)
|
||||
|
||||
im = Image.new("L", (256, 162)) # ratio is 1.5802469136
|
||||
im.thumbnail((33, 33))
|
||||
assert im.size == (33, 21) # ratio is 1.5714285714
|
||||
|
@ -52,7 +52,7 @@ def test_aspect():
|
|||
|
||||
im = Image.new("L", (145, 100)) # ratio is 1.45
|
||||
im.thumbnail((50, 50))
|
||||
assert im.size ==(50, 34) # ratio is 1.47058823529
|
||||
assert im.size == (50, 34) # ratio is 1.47058823529
|
||||
|
||||
im = Image.new("L", (100, 145)) # ratio is 0.689655172414
|
||||
im.thumbnail((50, 50))
|
||||
|
@ -62,7 +62,7 @@ def test_aspect():
|
|||
def test_float():
|
||||
im = Image.new("L", (128, 128))
|
||||
im.thumbnail((99.9, 99.9))
|
||||
assert im.size == (100, 100)
|
||||
assert im.size == (99, 99)
|
||||
|
||||
|
||||
def test_no_resize():
|
||||
|
|
Loading…
Reference in New Issue
Block a user