Skip to content

Commit

Permalink
Refactor test_invariant1 in test_deformation_gradient.py
Browse files Browse the repository at this point in the history
  • Loading branch information
jpsferreira committed Mar 15, 2024
1 parent c5cdd98 commit 2e0bfc7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/test_deformation_gradient.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ def test_rescale_deformation_gradient(self, deformation_generator):

def test_invariant1(self, deformation_generator):
deformation_gradient = deformation_generator.uniaxial([2.0, 3.0])
assert (sum(np.diag(f)) == deformation_generator.invariant1(f) for f in deformation_gradient)
invariant1 = deformation_generator.invariant1(deformation_gradient)
assert (sum(np.diag(f)) == invariant1(f) for f in deformation_gradient)

def test_invariant2(self, deformation_generator):
deformation_gradient = deformation_generator.uniaxial([2.0, 3.0])
Expand Down

0 comments on commit 2e0bfc7

Please sign in to comment.