File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,8 @@ def test_not_ppm(tmp_path):
5656 f .write (b"PyInvalid" )
5757
5858 with pytest .raises (UnidentifiedImageError ):
59- Image .open (path )
59+ with Image .open (path ):
60+ pass
6061
6162
6263def test_header_with_comments (tmp_path ):
@@ -74,7 +75,8 @@ def test_nondecimal_header(tmp_path):
7475 f .write (b"P6\n 128\x00 " )
7576
7677 with pytest .raises (ValueError ):
77- Image .open (path )
78+ with Image .open (path ):
79+ pass
7880
7981
8082def test_token_too_long (tmp_path ):
@@ -83,7 +85,8 @@ def test_token_too_long(tmp_path):
8385 f .write (b"P6\n 0123456789" )
8486
8587 with pytest .raises (ValueError ):
86- Image .open (path )
88+ with Image .open (path ):
89+ pass
8790
8891
8992def test_too_many_colors (tmp_path ):
@@ -92,7 +95,8 @@ def test_too_many_colors(tmp_path):
9295 f .write (b"P6\n 1 1\n 1000\n " )
9396
9497 with pytest .raises (ValueError ):
95- Image .open (path )
98+ with Image .open (path ):
99+ pass
96100
97101
98102def test_truncated_file (tmp_path ):
You can’t perform that action at this time.
0 commit comments