diff --git a/python/tests/test_force.py b/python/tests/test_force.py index a2588de45..5a3078bb2 100644 --- a/python/tests/test_force.py +++ b/python/tests/test_force.py @@ -35,7 +35,9 @@ def test_force(self): f = mp.get_forces(self.myforce) self.assertAlmostEqual(f[0], -0.11039089113393187) - self.assertAlmostEqual(f[0], mp.get_forces(self.myforce_decimated)[0]) + + places = 6 if mp.is_single_precision() else 7 + self.assertAlmostEqual(f[0], mp.get_forces(self.myforce_decimated)[0], places=places) if __name__ == '__main__': diff --git a/python/tests/test_holey_wvg_bands.py b/python/tests/test_holey_wvg_bands.py index 6d8044a28..1e51bef6b 100644 --- a/python/tests/test_holey_wvg_bands.py +++ b/python/tests/test_holey_wvg_bands.py @@ -65,7 +65,7 @@ def test_fields_at_kx(self): ] self.assertTrue(h.modes) - places = 5 if mp.is_single_precision() else 7 + places = 4 if mp.is_single_precision() else 7 for (r, i), m in zip(expected, h.modes): self.assertAlmostEqual(m.freq, r, places=places) self.assertAlmostEqual(m.decay, i, places=places)