Skip to content

Commit d3f3ef3

Browse files
authored
Update perturbIC_test.py
It was failing dues to hypothesis.errors.InvalidArgument:
1 parent e4e7ad9 commit d3f3ef3

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

Diff for: tests/perturbIC_test.py

+10-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,16 @@
2525
# Hypothesis settings to reuse in multiple tests
2626
ARRAY_SHAPES = stnp.array_shapes(min_dims=2, max_dims=2, min_side=1, max_side=200)
2727
ARRAY_DTYPES = stnp.floating_dtypes(sizes=(32, 64))
28-
ARRAY_ELEMENTS = st.floats(min_value=-1e10, max_value=1e10) # Set to avoid overflow
28+
# Set to avoid overflow
29+
ARRAY_ELEMENTS = st.floats(
30+
min_value=-1e10,
31+
max_value=1e10,
32+
allow_nan=False, # Disallow NaN
33+
allow_infinity=False, # Disallow Infinity
34+
allow_subnormal=False, # Disallow subnormal floats
35+
width=32 # Ensure compatibility with float32 or float64
36+
)
37+
2938
# Set max examples for hypothesis globally
3039
settings.register_profile("default", max_examples=30)
3140
settings.load_profile("default")

0 commit comments

Comments
 (0)