diff --git a/tests/analysis/elasticity/test_stress.py b/tests/analysis/elasticity/test_stress.py index cc79322de83..b489fa893ec 100644 --- a/tests/analysis/elasticity/test_stress.py +++ b/tests/analysis/elasticity/test_stress.py @@ -52,4 +52,4 @@ def test_properties(self): UserWarning, match="Tensor is not symmetric, information may be lost in Voigt conversion" ) as warns: _ = self.non_symm.voigt - assert len(warns) == 1 + assert sum("Tensor is not symmetric, information may be lost in Voigt conversion" in str(warn) for warn in warns) == 1