Skip to content

Commit 03facac

Browse files
test: use pytest.approx for logprob list comparison
Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 1f29d58 commit 03facac

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tests/test_fireworks_v1_completions_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ def _fail_tokenizer():
184184
result = asyncio.run(client.create_completion_from_prompt_ids(prompt_token_ids=[1, 2]))
185185
assert "return_token_ids" not in captured
186186
assert result["completion_ids"] == [271, 248068, 26108]
187-
assert result["completion_logprobs"] == [-0.05483185, -0.0014, -1.0]
187+
assert result["completion_logprobs"] == pytest.approx([-0.05483185, -0.0014, -1.0])
188188
assert len(result["completion_ids"]) == len(result["completion_logprobs"])
189189
asyncio.run(client.close())
190190

0 commit comments

Comments
 (0)