@@ -195,7 +195,7 @@ def test_reducing_gap_1(self, gradients_image, box, epsilon):
195195 (52 , 34 ), Image .Resampling .BICUBIC , box = box , reducing_gap = 1.0
196196 )
197197
198- with pytest .raises (AssertionError ):
198+ with pytest .raises (pytest . fail . Exception ):
199199 assert_image_equal (ref , im )
200200
201201 assert_image_similar (ref , im , epsilon )
@@ -210,7 +210,7 @@ def test_reducing_gap_2(self, gradients_image, box, epsilon):
210210 (52 , 34 ), Image .Resampling .BICUBIC , box = box , reducing_gap = 2.0
211211 )
212212
213- with pytest .raises (AssertionError ):
213+ with pytest .raises (pytest . fail . Exception ):
214214 assert_image_equal (ref , im )
215215
216216 assert_image_similar (ref , im , epsilon )
@@ -225,7 +225,7 @@ def test_reducing_gap_3(self, gradients_image, box, epsilon):
225225 (52 , 34 ), Image .Resampling .BICUBIC , box = box , reducing_gap = 3.0
226226 )
227227
228- with pytest .raises (AssertionError ):
228+ with pytest .raises (pytest . fail . Exception ):
229229 assert_image_equal (ref , im )
230230
231231 assert_image_similar (ref , im , epsilon )
0 commit comments