From 727eae8053b0e76d629281836fa98ee9f3bdd0f9 Mon Sep 17 00:00:00 2001 From: Alden Date: Mon, 13 Feb 2023 01:56:56 -0500 Subject: [PATCH] check more cases --- test/hypothesis/error_hunt.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/hypothesis/error_hunt.py b/test/hypothesis/error_hunt.py index 7523551..d8be7ee 100644 --- a/test/hypothesis/error_hunt.py +++ b/test/hypothesis/error_hunt.py @@ -39,11 +39,12 @@ def assert_matches(x, mpfunc, jsfunc=None): integers(min_value=-99, max_value=99), ).map(lambda tup: tup[0] * Decimal(10) ** tup[1]) ) +@settings(max_examples=1000) def test_matches(x, fn): assert_matches(x, fn) -@pytest.mark.parametrize("fn", "ln log10".split()) +@pytest.mark.parametrize("fn", "ln log10 sqrt".split()) @given( x=tuples( decimals( @@ -56,6 +57,7 @@ def test_matches(x, fn): integers(min_value=-99, max_value=99), ).map(lambda tup: tup[0] * Decimal(10) ** tup[1]) ) +@settings(max_examples=1000) def test_positive_domain(x, fn): assert_matches(x, fn) @@ -66,11 +68,12 @@ def test_positive_domain(x, fn): allow_nan=False, allow_infinity=False, min_value=-1, max_value=1, places=14 ) ) +@settings(max_examples=1000) def test_inverse_trig(x, fn): assert_matches(x, fn) -@pytest.mark.parametrize("fn", "sinh cosh tanh".split()) +@pytest.mark.parametrize("fn", "sinh cosh tanh exp".split()) @given( x=tuples( decimals( @@ -79,5 +82,6 @@ def test_inverse_trig(x, fn): integers(min_value=-99, max_value=3), ).map(lambda tup: tup[0] * Decimal(10) ** tup[1]) ) +@settings(max_examples=1000) def test_small_domain(x, fn): assert_matches(x, fn)