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

luis at geodynamics.org luis at geodynamics.org
Wed Oct 15 02:08:14 PDT 2008


Author: luis
Date: 2008-10-15 02:08:14 -0700 (Wed, 15 Oct 2008)
New Revision: 13066

Added:
   cs/cigma/trunk/tests/pytests/test_cell.py
Log:
Python unit test for _cigma.tet4

Added: cs/cigma/trunk/tests/pytests/test_cell.py
===================================================================
--- cs/cigma/trunk/tests/pytests/test_cell.py	                        (rev 0)
+++ cs/cigma/trunk/tests/pytests/test_cell.py	2008-10-15 09:08:14 UTC (rev 13066)
@@ -0,0 +1,19 @@
+#!/usr/bin/env python
+
+import numpy
+from _cigma import tet4
+
+import unittest
+class CellTest(unittest.TestCase):
+    def __init__(self, *args):
+        unittest.TestCase.__init__(self, *args)
+    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 create_suite():
+    suite = unittest.TestSuite()
+    suite.addTest(unittest.makeSuite(CellTest))
+    return suite



More information about the cig-commits mailing list