1212# basic cases not working.
1313
1414
15- def test_is_close_to_zero_default_tolerance () -> None :
15+ def test_default_tolerance () -> None :
1616 """Test the is_close_to_zero function with the default tolerance."""
1717 assert is_close_to_zero (0.0 )
1818 assert is_close_to_zero (1e-10 )
1919 assert not is_close_to_zero (1e-8 )
2020
2121
22- def test_is_close_to_zero_custom_tolerance () -> None :
22+ def test_custom_tolerance () -> None :
2323 """Test the is_close_to_zero function with a custom tolerance."""
2424 assert is_close_to_zero (0.0 , abs_tol = 1e-8 )
2525 assert is_close_to_zero (1e-8 , abs_tol = 1e-8 )
2626 assert not is_close_to_zero (1e-7 , abs_tol = 1e-8 )
2727
2828
29- def test_is_close_to_zero_negative_values () -> None :
29+ def test_negative_values () -> None :
3030 """Test the is_close_to_zero function with negative values."""
3131 assert is_close_to_zero (- 1e-10 )
3232 assert not is_close_to_zero (- 1e-8 )
3333
3434
3535@given (st .floats (allow_nan = False , allow_infinity = False ))
36- def test_is_close_to_zero_default_tolerance_hypothesis (value : float ) -> None :
36+ def test_default_tolerance_hypothesis (value : float ) -> None :
3737 """Test the is_close_to_zero function with the default tolerance for many values."""
3838 if - 1e-9 <= value <= 1e-9 :
3939 assert is_close_to_zero (value )
@@ -45,9 +45,7 @@ def test_is_close_to_zero_default_tolerance_hypothesis(value: float) -> None:
4545 st .floats (allow_nan = False , allow_infinity = False ),
4646 st .floats (allow_nan = False , allow_infinity = False , min_value = 0.0 , max_value = 2.0 ),
4747)
48- def test_is_close_to_zero_custom_tolerance_hypothesis (
49- value : float , abs_tol : float
50- ) -> None :
48+ def test_custom_tolerance_hypothesis (value : float , abs_tol : float ) -> None :
5149 """Test the is_close_to_zero function with a custom tolerance with many values/tolerance."""
5250 if - abs_tol <= value <= abs_tol :
5351 assert is_close_to_zero (value , abs_tol = abs_tol )
0 commit comments