diff --git a/Tests/test_file_png.py b/Tests/test_file_png.py index 73a3fff15..07e7e5385 100644 --- a/Tests/test_file_png.py +++ b/Tests/test_file_png.py @@ -255,22 +255,22 @@ def test_save_icc_profile_none(): # check saving files with an ICC profile set to None (omit profile) in_file = "Tests/images/icc_profile_none.png" im = Image.open(in_file) - assert im.info['icc_profile'] is None + assert_equal(im.info['icc_profile'], None) - file = tempfile("temp.png") - assert_no_exception(lambda: im.save(file)) - im = Image.open(file) - assert 'icc_profile' not in im.info + f = tempfile("temp.png") + assert_no_exception(lambda: im.save(f)) + im = Image.open(f) + assert_false('icc_profile' in im.info) def test_save_icc_profile_exists(): # check icc profile is kept during save() in_file = "Tests/images/trollface.png" im = Image.open(in_file) orig_profile = im.info['icc_profile'] - assert len(orig_profile) == 6636 + assert_equal(len(orig_profile), 6636) - file = tempfile("temp.png") - assert_no_exception(lambda: im.save(file)) + f = tempfile("temp.png") + assert_no_exception(lambda: im.save(f)) - im = Image.open(file) - assert im.info['icc_profile'] == orig_profile + im = Image.open(f) + assert_equal(im.info['icc_profile'], orig_profile)