[cig-commits] r7178 - short/3D/PyLith/trunk/unittests/pytests/faults

brad at geodynamics.org brad at geodynamics.org
Tue Jun 12 16:38:43 PDT 2007


Author: brad
Date: 2007-06-12 16:38:43 -0700 (Tue, 12 Jun 2007)
New Revision: 7178

Modified:
   short/3D/PyLith/trunk/unittests/pytests/faults/TestFaultCohesiveKin.py
Log:
Added missing Python unit tests for fault constraint methods.

Modified: short/3D/PyLith/trunk/unittests/pytests/faults/TestFaultCohesiveKin.py
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/faults/TestFaultCohesiveKin.py	2007-06-12 23:32:35 UTC (rev 7177)
+++ short/3D/PyLith/trunk/unittests/pytests/faults/TestFaultCohesiveKin.py	2007-06-12 23:38:43 UTC (rev 7178)
@@ -174,14 +174,71 @@
     """
     (mesh, fault, fields) = self._initialize()
 
-    dispT = fields.getReal("dispT")
-    fault.updateState(dispT)
+    disp = fields.getReal("dispT")
+    fault.updateState(disp)
 
     # We should really add something here to check to make sure things
     # actually initialized correctly    
     return
   
 
+  def test_setConstraintSizes(self):
+    """
+    Test setConstraintSizes().
+
+    WARNING: This is not a rigorous test of setConstraintSizes() because we
+    don't verify the results.
+    """
+    (mesh, fault, fields) = self._initialize()
+
+    disp = fields.getReal("dispT")
+    fault.setConstraintSizes(disp)
+
+    # We should really add something here to check to make sure things
+    # actually initialized correctly    
+    return
+
+
+  def test_setConstraints(self):
+    """
+    Test setConstraints().
+
+    WARNING: This is not a rigorous test of setConstraints() because we
+    don't verify the results.
+    """
+    (mesh, fault, fields) = self._initialize()
+
+    disp = fields.getReal("dispT")
+    fault.setConstraintSizes(disp)
+    mesh.allocateRealSection(disp)
+    fault.setConstraints(disp)
+
+    # We should really add something here to check to make sure things
+    # actually initialized correctly    
+    return
+
+
+  def test_setField(self):
+    """
+    Test setField().
+
+    WARNING: This is not a rigorous test of setField() because we
+    don't verify the results.
+    """
+    (mesh, fault, fields) = self._initialize()
+
+    disp = fields.getReal("dispT")
+    fault.setConstraintSizes(disp)
+    mesh.allocateRealSection(disp)
+    from pyre.units.time import second
+    t = 1.0*second
+    fault.setField(t, disp)
+
+    # We should really add something here to check to make sure things
+    # actually initialized correctly    
+    return
+
+
   def test_finalize(self):
     """
     Test finalize().



More information about the cig-commits mailing list