[cig-commits] [commit] knepley/upgrade-petsc-interface: Update to Python unit tests for C++ interface changes. (6d86867)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Thu Nov 7 14:20:03 PST 2013


Repository : ssh://geoshell/pylith

On branch  : knepley/upgrade-petsc-interface
Link       : https://github.com/geodynamics/pylith/compare/7dc1717efea97bf36be5cf1ee76fac0388cf6dc1...f706511525a18a3ed18db1757934ca6142c943c4

>---------------------------------------------------------------

commit 6d868679277ec3a771022e91f3454d3cb251ca21
Author: Brad Aagaard <baagaard at usgs.gov>
Date:   Thu Nov 7 13:05:54 2013 -0800

    Update to Python unit tests for C++ interface changes.


>---------------------------------------------------------------

6d868679277ec3a771022e91f3454d3cb251ca21
 modulesrc/topology/Mesh.i                    |  2 +-
 unittests/pytests/topology/TestMeshField.py  | 20 +++++---------------
 unittests/pytests/topology/TestMeshFields.py |  1 -
 3 files changed, 6 insertions(+), 17 deletions(-)

diff --git a/modulesrc/topology/Mesh.i b/modulesrc/topology/Mesh.i
index 1ac8ef8..e7237e4 100644
--- a/modulesrc/topology/Mesh.i
+++ b/modulesrc/topology/Mesh.i
@@ -125,7 +125,7 @@ namespace pylith {
        *   VTK vtk:refined.vtk:ascii_vtk
        */
       void view(const char* label,
-		const char* viewOption) const;
+		const char* viewOption ="") const;
 
       /** Return the names of all vertex groups.
        *
diff --git a/unittests/pytests/topology/TestMeshField.py b/unittests/pytests/topology/TestMeshField.py
index f3abe5f..2f06192 100644
--- a/unittests/pytests/topology/TestMeshField.py
+++ b/unittests/pytests/topology/TestMeshField.py
@@ -105,14 +105,14 @@ class TestMeshField(unittest.TestCase):
     return
 
 
-  def test_addDimensionOkay(self):
+  def test_dimensionalizeOkay(self):
     """
-    Test addDimensionOkay().
+    Test dimensionalizeOkay().
     """
-    self.assertEqual(False, self.field.addDimensionOkay())
+    self.assertEqual(False, self.field.dimensionalizeOkay())
 
-    self.field.addDimensionOkay(True)
-    self.assertEqual(True, self.field.addDimensionOkay())
+    self.field.dimensionalizeOkay(True)
+    self.assertEqual(True, self.field.dimensionalizeOkay())
     return
 
 
@@ -124,16 +124,6 @@ class TestMeshField(unittest.TestCase):
     return
 
 
-  def test_newSection(self):
-    """
-    Test newSection().
-    """
-    self.field.newSection()
-
-    # No test of result
-    return
-
-
   def test_newSectionDomain(self):
     """
     Test newSection(domain).
diff --git a/unittests/pytests/topology/TestMeshFields.py b/unittests/pytests/topology/TestMeshFields.py
index b8db65c..1b9968d 100644
--- a/unittests/pytests/topology/TestMeshFields.py
+++ b/unittests/pytests/topology/TestMeshFields.py
@@ -74,7 +74,6 @@ class TestMeshFields(unittest.TestCase):
   def test_add(self):
     self.fields.add("field", "displacement")
     field = self.fields.get("field")
-    field.newSection()
 
     self.assertEqual(2, field.spaceDim())
     return



More information about the CIG-COMMITS mailing list