From 8836c8f480bef36dddc7e8f865b5eb1935d8aff9 Mon Sep 17 00:00:00 2001 From: tligui_y Date: Mon, 28 Jul 2025 22:28:55 +0200 Subject: [PATCH] Update tests/test_utils_npy.py --- tests/test_utils_npy.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_utils_npy.py b/tests/test_utils_npy.py index eefd18b94..de8799682 100644 --- a/tests/test_utils_npy.py +++ b/tests/test_utils_npy.py @@ -57,7 +57,7 @@ def test_nice_steps_left_aligned(start, stop, step, endpoint, expected): @pytest.mark.parametrize("start, stop, step, endpoint, expected", [ (0, 5, 2, True, np.array([6., 4., 2., 0.])), # Right-aligned, overshoots left (0, 5, 2, False, np.array([4., 2., 0.])), # Right-aligned, no endpoint - (-1, 2, 1.5, True, np.array([2., 0.5, -1.])), # Step doesn’t divide evenly, reverse it + (-1, 2, 1.5, True, np.array([2., 0.5, -1.])), # Step doesn t divide evenly, reverse it (-1, 2, 1.5, False, np.array([0.5, -1.])), # Without endpoint (5, 0, -2, True, np.array([5., 3., 1., -1.])), # Negative step, includes endpoint overshoot (5, 0, -2, False, np.array([3., 1., -1.])), # No endpoint, skips last one @@ -82,7 +82,7 @@ def test_within_scalar(val, vmin, vmax, expected): @pytest.mark.parametrize("data, vmin, vmax, expected", [ ([1, 2, 3, 4, 5], 2, 5, 0.6), ([10, 20, 30], 5, 25, 2/3), - ([1, 2, 3], None, 2, 2/3), + ([1, 2, 3], None, 2, 1/3), ([], 0, 1, 0), ]) def test_within_fraction(data, vmin, vmax, expected):