Skip to content

Commit a899aee

Browse files
committed
Parametrize test - expose failure
1 parent 9aca7a1 commit a899aee

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

test/test_round.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,11 @@ def test_stochastic_rounding(
541541
np.testing.assert_allclose(count_v1, expected_up_count, atol=atol)
542542

543543

544-
def test_stochastic_rounding_scalar_eq_array() -> None:
544+
@pytest.mark.parametrize(
545+
"rnd",
546+
(RoundMode.Stochastic, RoundMode.StochasticFast, RoundMode.StochasticFastest),
547+
)
548+
def test_stochastic_rounding_scalar_eq_array(rnd) -> None:
545549
fi = format_info_p3109(3)
546550

547551
v0 = decode_ndarray(fi, np.arange(255))
@@ -558,7 +562,7 @@ def test_stochastic_rounding_scalar_eq_array() -> None:
558562
val_array = round_ndarray(
559563
fi,
560564
v,
561-
RoundMode.Stochastic,
565+
rnd,
562566
sat=False,
563567
srbits=np.asarray(srbits),
564568
srnumbits=srnumbits,
@@ -568,7 +572,7 @@ def test_stochastic_rounding_scalar_eq_array() -> None:
568572
round_float(
569573
fi,
570574
v,
571-
RoundMode.Stochastic,
575+
rnd,
572576
sat=False,
573577
srbits=srbits,
574578
srnumbits=srnumbits,

0 commit comments

Comments
 (0)