Skip to content

Commit

Permalink
Test form error for GoalOrientedMeshSeq
Browse files Browse the repository at this point in the history
  • Loading branch information
jwallwork23 committed Nov 24, 2024
1 parent 5da2be0 commit 1cb9c80
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/adjoint/test_adjoint_mesh_seq.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,16 @@ def test_num_enrichments_error(self):
msg = "A positive number of enrichments is required."
self.assertEqual(str(cm.exception), msg)

def test_form_error(self):
mesh_seq = self.go_mesh_seq(self.get_function_spaces_decorator("R", 0, 0))
with self.assertRaises(AttributeError) as cm:
mesh_seq.forms()
msg = (
"Forms have not been read in. Use read_forms({'field_name': F}) in"
" get_solver to read in the forms."
)
self.assertEqual(str(cm.exception), msg)

def test_h_enrichment_error(self):
end_time = 1.0
num_subintervals = 2
Expand Down

0 comments on commit 1cb9c80

Please sign in to comment.