TST: relax test precision a little for 32-bit 32-bit giving test precision error::
authorMatthew Brett <matthew.brett@gmail.com>
Sat, 4 Nov 2017 03:07:42 +0000 (03:07 +0000)
committerPeter Michael Green <plugwash@raspbian.org>
Sat, 4 Nov 2017 03:07:42 +0000 (03:07 +0000)
    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

index 9af5934ddcdb410845398eb7441863043d73d4fc..b883b0c1562c99435a4630106ea6c79f9586035e 100644 (file)
@@ -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