[MOAB-dev] r2897 - in MOAB/trunk/tools/iMesh/python: . perf test

jvporter at wisc.edu jvporter at wisc.edu
Mon May 18 18:06:12 CDT 2009


Author: jvporter
Date: 2009-05-18 18:06:12 -0500 (Mon, 18 May 2009)
New Revision: 2897

Modified:
   MOAB/trunk/tools/iMesh/python/iMesh.c
   MOAB/trunk/tools/iMesh/python/perf/perf.py
   MOAB/trunk/tools/iMesh/python/test/all.py
   MOAB/trunk/tools/iMesh/python/test/core.py
   MOAB/trunk/tools/iMesh/python/test/iter.py
Log:
* Remove references to my home directory (oops!)
* Fix iterator unit tests



Modified: MOAB/trunk/tools/iMesh/python/iMesh.c
===================================================================
--- MOAB/trunk/tools/iMesh/python/iMesh.c	2009-05-18 17:26:35 UTC (rev 2896)
+++ MOAB/trunk/tools/iMesh/python/iMesh.c	2009-05-18 23:06:12 UTC (rev 2897)
@@ -1619,10 +1619,9 @@
     PyObject *m;
     PyArray_Descr *descr;
 
-    /* TODO: remove */
     ArrDealloc_Type.tp_new = PyType_GenericNew;
     if (PyType_Ready(&ArrDealloc_Type) < 0)
-    return;
+        return;
 
     m = Py_InitModule("iMesh",module_methods);
     import_array();

Modified: MOAB/trunk/tools/iMesh/python/perf/perf.py
===================================================================
--- MOAB/trunk/tools/iMesh/python/perf/perf.py	2009-05-18 17:26:35 UTC (rev 2896)
+++ MOAB/trunk/tools/iMesh/python/perf/perf.py	2009-05-18 23:06:12 UTC (rev 2897)
@@ -4,8 +4,6 @@
 import subprocess
 import csv
 from datetime import *
-sys.path.append('../build/lib.linux-x86_64-2.5/')
-
 from itaps import *
 
 class stopwatch:

Modified: MOAB/trunk/tools/iMesh/python/test/all.py
===================================================================
--- MOAB/trunk/tools/iMesh/python/test/all.py	2009-05-18 17:26:35 UTC (rev 2896)
+++ MOAB/trunk/tools/iMesh/python/test/all.py	2009-05-18 23:06:12 UTC (rev 2897)
@@ -2,5 +2,5 @@
 import entset
 import tags
 import adj
-# import iter
+import iter
 

Modified: MOAB/trunk/tools/iMesh/python/test/core.py
===================================================================
--- MOAB/trunk/tools/iMesh/python/test/core.py	2009-05-18 17:26:35 UTC (rev 2896)
+++ MOAB/trunk/tools/iMesh/python/test/core.py	2009-05-18 23:06:12 UTC (rev 2897)
@@ -1,5 +1,2 @@
-import sys
-sys.path.append('/home/porterj/python-ext/build/lib.linux-x86_64-2.5/')
-
 import unittest
 from itaps import *

Modified: MOAB/trunk/tools/iMesh/python/test/iter.py
===================================================================
--- MOAB/trunk/tools/iMesh/python/test/iter.py	2009-05-18 17:26:35 UTC (rev 2896)
+++ MOAB/trunk/tools/iMesh/python/test/iter.py	2009-05-18 23:06:12 UTC (rev 2897)
@@ -12,12 +12,10 @@
     def testEmpty(self):
         for i in self.empty.iterate(iBase.type.all, iMesh.topology.all):
             self.fail('empty iterator has >0 elements')
-        iter.reset()
 
     def testArrEmpty(self):
         for i in self.empty.iterate(iBase.type.all, iMesh.topology.all, 16):
             self.fail('empty iterator has >0 elements')
-        iter.reset()
 
     def testSingle(self):
         count = 0
@@ -30,7 +28,7 @@
         count = 0
         for i in self.set.iterate(iBase.type.all, iMesh.topology.all, 16):
             count += 1
-            self.assertEqual(i, self.ent) # TODO
+            self.assertEqual(i[0], self.ent)
         self.assertEqual(count,1)
 
     def testAlternate(self):
@@ -41,6 +39,7 @@
             count += 1
             self.assertEqual(i, self.ent)
         self.assertEqual(count, 1)
+        iter.reset()
 
 
 suite = unittest.TestLoader().loadTestsFromTestCase(TestIter)



More information about the moab-dev mailing list