From 986071197bf1c7f2f997b1bfb69f2c94486d915c Mon Sep 17 00:00:00 2001 From: Nicolas Patry Date: Fri, 16 Aug 2024 13:20:53 +0200 Subject: [PATCH] Fix the condition. --- integration-tests/conftest.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/integration-tests/conftest.py b/integration-tests/conftest.py index e283ee50..15af1cad 100644 --- a/integration-tests/conftest.py +++ b/integration-tests/conftest.py @@ -118,8 +118,7 @@ class ResponseComparator(JSONSnapshotExtension): and token.text == other.text and ( self.ignore_logprob - or token.logprob == other.logprob - and token.logprob is None + or (token.logprob == other.logprob and token.logprob is None) or math.isclose(token.logprob, other.logprob, rel_tol=self.rtol) ) and token.special == other.special