File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change 77from PIL import BlpImagePlugin , Image
88
99from .helper import (
10- assert_image_equal ,
1110 assert_image_equal_tofile ,
12- assert_image_similar ,
11+ assert_image_similar_tofile ,
1312 hopper ,
1413)
1514
@@ -52,18 +51,16 @@ def test_save(tmp_path: Path) -> None:
5251 im = hopper ("P" )
5352 im .save (f , blp_version = version )
5453
55- with Image .open (f ) as reloaded :
56- assert_image_equal (im .convert ("RGB" ), reloaded )
54+ assert_image_equal_tofile (im .convert ("RGB" ), f )
5755
5856 with Image .open ("Tests/images/transparent.png" ) as im :
5957 f = tmp_path / "temp.blp"
6058 im .convert ("P" ).save (f , blp_version = version )
6159
62- with Image .open (f ) as reloaded :
63- assert_image_similar (im , reloaded , 8 )
60+ assert_image_similar_tofile (im , f , 8 )
6461
6562 im = hopper ()
66- with pytest .raises (ValueError ):
63+ with pytest .raises (ValueError , match = "Unsupported BLP image mode" ):
6764 im .save (f )
6865
6966
You can’t perform that action at this time.
0 commit comments