From: Matthew Brett Date: Sun, 4 Sep 2016 14:18:55 +0000 (+0100) Subject: TST: relax test precision a little for 32-bit 32-bit giving test precision error:: X-Git-Tag: archive/raspbian/0.4.1-1+rpi1~1^2~3 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=7171d747a661735722febd78be332f087ae85a51;p=nipy.git 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 --- 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