[cig-commits] r13171 - cs/cigma/trunk/tests/pytests

luis at geodynamics.org luis at geodynamics.org
Wed Oct 29 15:11:41 PDT 2008


Author: luis
Date: 2008-10-29 15:11:41 -0700 (Wed, 29 Oct 2008)
New Revision: 13171

Modified:
   cs/cigma/trunk/tests/pytests/test_cell.py
Log:
Test if we can import each of the cell types

Modified: cs/cigma/trunk/tests/pytests/test_cell.py
===================================================================
--- cs/cigma/trunk/tests/pytests/test_cell.py	2008-10-29 22:11:39 UTC (rev 13170)
+++ cs/cigma/trunk/tests/pytests/test_cell.py	2008-10-29 22:11:41 UTC (rev 13171)
@@ -1,17 +1,32 @@
 #!/usr/bin/env python
 
 import numpy
-from _cigma import tet4
+from _cigma import hex8, tet4, quad4, tri3
 
 import unittest
 class CellTest(unittest.TestCase):
     def __init__(self, *args):
         unittest.TestCase.__init__(self, *args)
+    def test_cell_hex8(self):
+        cell = hex8()
+        self.assertEqual(cell.n_nodes(), 8)
+        self.assertEqual(cell.n_celldim(), 3)
+        self.assertEqual(cell.n_dim(), 3)
     def test_cell_tet4(self):
         cell = tet4()
         self.assertEqual(cell.n_nodes(), 4)
         self.assertEqual(cell.n_celldim(), 3)
         self.assertEqual(cell.n_dim(), 3)
+    def test_cell_quad4(self):
+        cell = quad4()
+        self.assertEqual(cell.n_nodes(), 4)
+        self.assertEqual(cell.n_celldim(), 2)
+        self.assertEqual(cell.n_dim(), 3)
+    def test_cell_tri3(self):
+        cell = tri3()
+        self.assertEqual(cell.n_nodes(), 3)
+        self.assertEqual(cell.n_celldim(), 2)
+        self.assertEqual(cell.n_dim(), 3)
 
 def create_suite():
     suite = unittest.TestSuite()



More information about the CIG-COMMITS mailing list