/[escript]/trunk/escriptcore/test/python/run_data_access.py
ViewVC logotype

Diff of /trunk/escriptcore/test/python/run_data_access.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 4983 by jfenwick, Wed May 14 01:13:23 2014 UTC revision 4984 by sshaw, Mon Jun 2 02:50:34 2014 UTC
# Line 22  http://www.opensource.org/licenses/osl-3 Line 22  http://www.opensource.org/licenses/osl-3
22  __url__="https://launchpad.net/escript-finley"  __url__="https://launchpad.net/escript-finley"
23    
24  import esys.escriptcore.utestselect as unittest  import esys.escriptcore.utestselect as unittest
25    from esys.escriptcore.testing import *
26  import sys  import sys
27  from esys.escript import *  from esys.escript import *
28  from esys.escript.util import EPSILON  from esys.escript.util import EPSILON
29    
30  # This test assumes that samples are in order in the object, ie the last point of sample x is  # This test assumes that samples are in order in the object, ie the last point of sample x is
31  # immediately before the first point of sample x+1  # immediately before the first point of sample x+1
32    @unittest.skipIf(getMPISizeWorld() != 1, "num ranks > 1")
33  class DataAccessTestCase(unittest.TestCase):  class DataAccessTestCase(unittest.TestCase):
34      #This is a very basic test - it only contains one value.      #This is a very basic test - it only contains one value.
35      def testtoListOfTuplesScalarOnNullDomain(self):      def testtoListOfTuplesScalarOnNullDomain(self):
# Line 165  class DataAccessTestCase(unittest.TestCa Line 167  class DataAccessTestCase(unittest.TestCa
167                    
168                    
169  if __name__ == "__main__":  if __name__ == "__main__":
170      if getMPISizeWorld() == 1:      run_tests(__name__, exit_on_failure=True)
        suite = unittest.TestSuite()  
        suite.addTest(unittest.makeSuite(DataAccessTestCase))  
        s=unittest.TextTestRunner(verbosity=2).run(suite)  
        if not s.wasSuccessful(): sys.exit(1)  
     else:  
         print("run_data_access is not executed as more than one processor is used.")  

Legend:
Removed from v.4983  
changed lines
  Added in v.4984

  ViewVC Help
Powered by ViewVC 1.1.26