From d669250519b4dd4a11923968ddf62b4981be45da Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Tue, 22 Apr 2025 18:02:37 +0100 Subject: [PATCH] Add more pytest.approx calls These tests failed on Debian i386, probably due to x87 excess precision: https://bugs.debian.org/1103116 Fixes: #74 --- tests/test_haversine_vector.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/test_haversine_vector.py b/tests/test_haversine_vector.py index e10b080..3723a77 100644 --- a/tests/test_haversine_vector.py +++ b/tests/test_haversine_vector.py @@ -11,10 +11,11 @@ def test_pair(unit): def test_lyon_paris(unit): expected_lyon_paris = EXPECTED_LYON_PARIS[unit] - assert haversine_vector(LYON, PARIS, unit=unit) == expected_lyon_paris + assert haversine_vector( + LYON, PARIS, unit=unit) == pytest.approx(expected_lyon_paris) assert isinstance(unit.value, str) assert haversine_vector( - LYON, PARIS, unit=unit.value) == expected_lyon_paris + LYON, PARIS, unit=unit.value) == pytest.approx(expected_lyon_paris) return test_lyon_paris(unit)