diff --git a/Tests/test_image_convert.py b/Tests/test_image_convert.py index c0347179a..4d40e43b2 100644 --- a/Tests/test_image_convert.py +++ b/Tests/test_image_convert.py @@ -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))