fix(checkpoint): use tolerant float comparison to fix test failing on x86_64 architecture (#6157)

### Description

`test_embed_with_path` was failing on x86_64 architecture due to numeric
precision differences. `pytest.approx` was already used later on in this
test for float comparison, so this PR just updates a missed assertion.

Fixes https://github.com/langchain-ai/langgraph/issues/5845
This commit is contained in:
Caspar Broekhuizen
2025-09-16 16:42:20 -07:00
committed by GitHub
parent 5a36229e38
commit 2d05a17dfb
+1 -1
View File
@@ -950,8 +950,8 @@ async def test_embed_with_path(fake_embeddings: CharacterEmbeddings) -> None:
assert results[0].key != results[1].key
ascore = results[0].score
bscore = results[1].score
assert ascore == bscore
assert ascore is not None and bscore is not None
assert ascore == pytest.approx(bscore, abs=1e-5)
results = await store.asearch(("test",), query="uuu")
assert len(results) == 2