From 109057d75581b87b3313c5d29d859d6cc5393ed6 Mon Sep 17 00:00:00 2001 From: Alex Garcia Date: Sat, 24 Aug 2024 16:04:31 -0700 Subject: [PATCH] rel=1e-3 --- tests/test-loadable.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/test-loadable.py b/tests/test-loadable.py index 5f888df..602fffe 100644 --- a/tests/test-loadable.py +++ b/tests/test-loadable.py @@ -119,7 +119,9 @@ def test_lembed(): ).fetchone()[0] a = lembed("aaa", "alex garcia") assert len(a) == (384 * 4) - assert struct.unpack("1f", a[0:4])[0] == pytest.approx(-0.09205757826566696) + assert struct.unpack("1f", a[0:4])[0] == pytest.approx( + -0.09205757826566696, rel=1e-3 + ) with _raises( "Unknown model name 'aaaaaaaaa'. Was it registered with lembed_models?" @@ -135,7 +137,9 @@ def test_lembed(): ) a = lembed("alex garcia") assert len(a) == (384 * 4) - assert struct.unpack("1f", a[0:4])[0] == pytest.approx(-0.09205757826566696) + assert struct.unpack("1f", a[0:4])[0] == pytest.approx( + -0.09205757826566696, rel=1e-3 + ) @pytest.mark.skip(reason="TODO")