From d6b61caaaf7346a6475a2fd47a90faeb255b6cf9 Mon Sep 17 00:00:00 2001 From: Florian Schepers Date: Tue, 23 Apr 2024 09:52:24 +0200 Subject: [PATCH] fix: Make flaky tests stable by rounding score values --- tests/core/test_text_highlight.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/core/test_text_highlight.py b/tests/core/test_text_highlight.py index 7d78bc71d..4b01563e6 100644 --- a/tests/core/test_text_highlight.py +++ b/tests/core/test_text_highlight.py @@ -309,4 +309,5 @@ def test_highlight_clamps_end_correctly( # then assert result.highlights[0].start == start assert result.highlights[0].end == end - assert result.highlights[0].score == score + assert abs(result.highlights[0].score - score) <= 0.005 +