From e405d1459df2ec019ce11db47da8a65467cfbfe3 Mon Sep 17 00:00:00 2001 From: Matthew Brett Date: Sat, 4 Nov 2017 03:07:42 +0000 Subject: [PATCH] TST: relax test precision a little for 32-bit 32-bit giving test precision error:: line 154, in test_mu2tet assert_equal(intvol.mu2_tet(0,0,0,0,1,0,0,1,0,1), (3./2 + np.sqrt(3./4))/2) AssertionError: 1.1830127018922194 != 1.1830127018922192 See: https://travis-ci.org/MacPython/nipy-wheels/jobs/140268243#L451 Gbp-Pq: Name changeset_78ced182c4b4583c9a2ed3c1fc01764941560c72.diff --- nipy/algorithms/statistics/tests/test_intrinsic_volumes.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/nipy/algorithms/statistics/tests/test_intrinsic_volumes.py b/nipy/algorithms/statistics/tests/test_intrinsic_volumes.py index 9af5934..b883b0c 100644 --- a/nipy/algorithms/statistics/tests/test_intrinsic_volumes.py +++ b/nipy/algorithms/statistics/tests/test_intrinsic_volumes.py @@ -151,8 +151,11 @@ def test_mu1tri(): def test_mu2tet(): - assert_equal(intvol.mu2_tet(0,0,0,0,1,0,0,1,0,1), (3./2 + np.sqrt(3./4))/2) - + # 15 digit precision error found on 32-bit Linux + # https://travis-ci.org/MacPython/nipy-wheels/jobs/140268248#L725 + assert_almost_equal(intvol.mu2_tet(0,0,0,0,1,0,0,1,0,1), + (3./2 + np.sqrt(3./4))/2, + 15) def pts2mu1_tet(d, a, b, c): """ Accept point coordinates for calling mu1_tet -- 2.30.2