test for ValueError

This commit is contained in:
Philip Eisenlohr 2023-02-20 14:44:40 -05:00
parent 6aa566760f
commit 71e383bfc8
1 changed files with 4 additions and 0 deletions

View File

@ -215,3 +215,7 @@ class TestMechanics:
def test_invalid_decomposition(self): def test_invalid_decomposition(self):
with pytest.raises(ValueError): with pytest.raises(ValueError):
mechanics._polar_decomposition(np.random.rand(10,3,3),'A') mechanics._polar_decomposition(np.random.rand(10,3,3),'A')
def test_invalid_strain(self):
with pytest.raises(ValueError):
mechanics.strain(np.random.rand(10,3,3),'A',0)