From 18d6d364ec23fef0f6dd2edad0c1daca603aa6ae Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Tue, 14 Jan 2020 10:57:50 +0100 Subject: [PATCH] adjustment to tolerances Rodrigues test is 'prone' to fail due to diverging tangens(pi/2). Happens only with a very low chance --- python/tests/test_Rotation.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/python/tests/test_Rotation.py b/python/tests/test_Rotation.py index e352e1c26..bb45c2906 100644 --- a/python/tests/test_Rotation.py +++ b/python/tests/test_Rotation.py @@ -7,7 +7,7 @@ import damask from damask import Rotation from damask import Orientation -n = 1000 +n = 100000 @pytest.fixture def default(): @@ -45,17 +45,17 @@ class TestRotation: def test_Homochoric(self,default): for rot in default: assert np.allclose(rot.asRodrigues(), - Rotation.fromHomochoric(rot.asHomochoric()).asRodrigues(),rtol=5.e-5) + Rotation.fromHomochoric(rot.asHomochoric()).asRodrigues(),rtol=1.e-4) def test_Cubochoric(self,default): for rot in default: assert np.allclose(rot.asHomochoric(), - Rotation.fromCubochoric(rot.asCubochoric()).asHomochoric(),rtol=5.e-5) + Rotation.fromCubochoric(rot.asCubochoric()).asHomochoric()) def test_Quaternion(self,default): for rot in default: assert np.allclose(rot.asCubochoric(), - Rotation.fromQuaternion(rot.asQuaternion()).asCubochoric(),rtol=5.e-5) + Rotation.fromQuaternion(rot.asQuaternion()).asCubochoric()) @pytest.mark.parametrize('model',['Bain','KS','GT','GT_prime','NW','Pitsch'])