@@ -196,7 +196,7 @@ def test_arange(dtype, data):
196196 out [0 ], xp .asarray (_start , dtype = out .dtype )
197197 ), f"out[0]={ out [0 ]} , but should be { _start } { f_func } "
198198 except Exception as exc :
199- exc .add_note (repro_snippet )
199+ ph .add_note (exc , repro_snippet )
200200 raise
201201
202202
@@ -257,7 +257,7 @@ def test_asarray_scalars(shape, data):
257257 v = scalar_type (out [idx ])
258258 ph .assert_scalar_equals ("asarray" , type_ = scalar_type , idx = idx , out = v , expected = v_expect , kw = kw )
259259 except Exception as exc :
260- exc .add_note (repro_snippet )
260+ ph .add_note (exc , repro_snippet )
261261 raise
262262
263263def scalar_eq (s1 : Scalar , s2 : Scalar ) -> bool :
@@ -323,7 +323,7 @@ def test_asarray_arrays(shape, dtypes, data):
323323 new_out_value , value
324324 ), f"{ f_out } , but should be { value } after x was mutated"
325325 except Exception as exc :
326- exc .add_note (repro_snippet )
326+ ph .add_note (exc , repro_snippet )
327327 raise
328328
329329
@@ -339,7 +339,7 @@ def test_empty(shape, kw):
339339 ph .assert_kw_dtype ("empty" , kw_dtype = kw ["dtype" ], out_dtype = out .dtype )
340340 ph .assert_shape ("empty" , out_shape = out .shape , expected = shape , kw = dict (shape = shape ))
341341 except Exception as exc :
342- exc .add_note (repro_snippet )
342+ ph .add_note (exc , repro_snippet )
343343 raise
344344
345345
@@ -357,7 +357,7 @@ def test_empty_like(x, kw):
357357 ph .assert_kw_dtype ("empty_like" , kw_dtype = kw ["dtype" ], out_dtype = out .dtype )
358358 ph .assert_shape ("empty_like" , out_shape = out .shape , expected = x .shape )
359359 except Exception as exc :
360- exc .add_note (repro_snippet )
360+ ph .add_note (exc , repro_snippet )
361361 raise
362362
363363@given (
@@ -387,7 +387,7 @@ def test_eye(n_rows, n_cols, kw):
387387 expected = xp .reshape (expected , (n_rows , _n_cols ))
388388 ph .assert_array_elements ("eye" , out = out , expected = expected , kw = kw )
389389 except Exception as exc :
390- exc .add_note (repro_snippet )
390+ ph .add_note (exc , repro_snippet )
391391 raise
392392
393393
@@ -455,7 +455,7 @@ def test_full(shape, fill_value, kw):
455455 ph .assert_shape ("full" , out_shape = out .shape , expected = shape , kw = dict (shape = shape ))
456456 ph .assert_fill ("full" , fill_value = fill_value , dtype = dtype , out = out , kw = dict (fill_value = fill_value ))
457457 except Exception as exc :
458- exc .add_note (repro_snippet )
458+ ph .add_note (exc , repro_snippet )
459459 raise
460460
461461
@@ -476,7 +476,7 @@ def test_full_like(kw, data):
476476 ph .assert_shape ("full_like" , out_shape = out .shape , expected = x .shape )
477477 ph .assert_fill ("full_like" , fill_value = fill_value , dtype = dtype , out = out , kw = dict (fill_value = fill_value ))
478478 except Exception as exc :
479- exc .add_note (repro_snippet )
479+ ph .add_note (exc , repro_snippet )
480480 raise
481481
482482finite_kw = {"allow_nan" : False , "allow_infinity" : False }
@@ -534,7 +534,7 @@ def test_linspace(num, dtype, endpoint, data):
534534 expected = expected [:- 1 ]
535535 ph .assert_array_elements ("linspace" , out = out , expected = expected )
536536 except Exception as exc :
537- exc .add_note (repro_snippet )
537+ ph .add_note (exc , repro_snippet )
538538 raise
539539
540540
@@ -563,7 +563,7 @@ def test_meshgrid(dtype, data):
563563 for i , x in enumerate (out ):
564564 ph .assert_dtype ("meshgrid" , in_dtype = dtype , out_dtype = x .dtype , repr_name = f"out[{ i } ].dtype" )
565565 except Exception as exc :
566- exc .add_note (repro_snippet )
566+ ph .add_note (exc , repro_snippet )
567567 raise
568568
569569
@@ -590,7 +590,7 @@ def test_ones(shape, kw):
590590 dtype = kw .get ("dtype" , None ) or dh .default_float
591591 ph .assert_fill ("ones" , fill_value = make_one (dtype ), dtype = dtype , out = out , kw = kw )
592592 except Exception as exc :
593- exc .add_note (repro_snippet )
593+ ph .add_note (exc , repro_snippet )
594594 raise
595595
596596
@@ -611,7 +611,7 @@ def test_ones_like(x, kw):
611611 ph .assert_fill ("ones_like" , fill_value = make_one (dtype ), dtype = dtype ,
612612 out = out , kw = kw )
613613 except Exception as exc :
614- exc .add_note (repro_snippet )
614+ ph .add_note (exc , repro_snippet )
615615 raise
616616
617617
@@ -638,7 +638,7 @@ def test_zeros(shape, kw):
638638 ph .assert_fill ("zeros" , fill_value = make_zero (dtype ), dtype = dtype , out = out ,
639639 kw = kw )
640640 except Exception as exc :
641- exc .add_note (repro_snippet )
641+ ph .add_note (exc , repro_snippet )
642642 raise
643643
644644
@@ -660,5 +660,5 @@ def test_zeros_like(x, kw):
660660 ph .assert_fill ("zeros_like" , fill_value = make_zero (dtype ), dtype = dtype ,
661661 out = out , kw = kw )
662662 except Exception as exc :
663- exc .add_note (repro_snippet )
663+ ph .add_note (exc , repro_snippet )
664664 raise
0 commit comments