mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-12 10:16:17 +03:00
Trapping warnings
This commit is contained in:
parent
4877d52cf4
commit
182e7782fa
|
@ -84,7 +84,8 @@ def test_trns_l():
|
|||
assert_true('transparency' in p.info)
|
||||
assert_no_exception(lambda: p.save(f))
|
||||
|
||||
p = im.convert('P', palette = Image.ADAPTIVE)
|
||||
p = assert_warning(UserWarning,
|
||||
lambda: im.convert('P', palette = Image.ADAPTIVE))
|
||||
assert_false('transparency' in p.info)
|
||||
assert_no_exception(lambda: p.save(f))
|
||||
|
||||
|
@ -103,7 +104,8 @@ def test_trns_RGB():
|
|||
assert_true('transparency' in p.info)
|
||||
assert_no_exception(lambda: p.save(f))
|
||||
|
||||
p = im.convert('P', palette = Image.ADAPTIVE)
|
||||
p = assert_warning(UserWarning,
|
||||
lambda: im.convert('P', palette = Image.ADAPTIVE))
|
||||
assert_false('transparency' in p.info)
|
||||
assert_no_exception(lambda: p.save(f))
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user