Skip to content

Commit

Permalink
Add test for ElementLineHermite
Browse files Browse the repository at this point in the history
Add test to make sure that exceptions is thrown when using gdof with
index > 3.
  • Loading branch information
ahojukka5 committed Jun 2, 2020
1 parent b78a29b commit d4c552b
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/test_element_line_hermite.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from unittest import TestCase
from skfem.element.element_line.element_line_hermite import ElementLineHermite


class TestElementLineHermite(TestCase):

def test_index_error(self):
""" Tests that exception is thrown when accessing gdof with i > 3. """
element = ElementLineHermite()
with self.assertRaises(ValueError):
F = 0
w = 0
i = 4
element.gdof(F, w, i)

0 comments on commit d4c552b

Please sign in to comment.