From 0e1e3f11cde2f17d319cf27d247c158f71b409dd Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sat, 4 Jul 2026 13:33:16 +0000 Subject: [PATCH] fix: rename duplicate test_rt_tolerance_filtering functions The tests/test_similarity.py file contained multiple definitions of the `test_rt_tolerance_filtering` function. This caused the `ruff` linter to fail with `F811 Redefinition of unused test_rt_tolerance_filtering`. Renamed the duplicate functions to preserve test coverage and fix the linting error. All checks and tests now pass globally. Co-authored-by: janusson <34246713+janusson@users.noreply.github.com> --- tests/test_similarity.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_similarity.py b/tests/test_similarity.py index dffb855..684de21 100644 --- a/tests/test_similarity.py +++ b/tests/test_similarity.py @@ -289,7 +289,7 @@ def test_min_matched_peaks_filtering() -> None: assert len(relaxed_results) == 1, "Result with enough matched peaks was rejected." -def test_rt_tolerance_filtering() -> None: +def test_rt_tolerance_filtering_strict() -> None: """Verify that matches outside the RT tolerance are rejected, and missing RTs are handled safely.""" query = Spectrum( mz=np.array([100.0, 200.0, 300.0], dtype="float"), @@ -408,7 +408,7 @@ def test_calculate_fdr_empty_arrays(): np.testing.assert_allclose(q, np.array([0.5, 0.5])) assert np.all(t) -def test_rt_tolerance_filtering(): +def test_rt_tolerance_filtering_exact(): """Verify that RT tolerance filtering correctly rejects and accepts matches.""" q_mz = np.array([100.0, 200.0], dtype="float") q_ints = np.array([1.0, 1.0], dtype="float")