/[escript]/branches/symbolic_from_3470/dudley/test/python/run_escriptOnDudley.py
ViewVC logotype

Diff of /branches/symbolic_from_3470/dudley/test/python/run_escriptOnDudley.py

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

trunk/finley/test/python/run_escriptOnFinley.py revision 2881 by jfenwick, Thu Jan 28 02:03:15 2010 UTC branches/domexper/dudley/test/python/run_escriptOnDudley.py revision 3087 by jfenwick, Fri Aug 6 05:25:59 2010 UTC
# Line 23  import unittest Line 23  import unittest
23  import tempfile  import tempfile
24    
25  from esys.escript import *  from esys.escript import *
26  from esys.finley import Rectangle  from esys.dudley import Rectangle
27  import sys  import sys
28  import os  import os
29  from test_objects import Test_Dump, Test_SetDataPointValue, Test_saveCSV, Test_TableInterpolation  from test_objects import Test_Dump, Test_SetDataPointValue, Test_saveCSV, Test_TableInterpolation
# Line 32  from test_objects import Test_Domain, Te Line 32  from test_objects import Test_Domain, Te
32  from test_shared import Test_Shared  from test_shared import Test_Shared
33    
34  try:  try:
35       FINLEY_WORKDIR=os.environ['FINLEY_WORKDIR']       DUDLEY_WORKDIR=os.environ['DUDLEY_WORKDIR']
36  except KeyError:  except KeyError:
37       FINLEY_WORKDIR='.'       DUDLEY_WORKDIR='.'
38    
39  NE=4 # number elements, must be even  NE=4 # number elements, must be even
40    
41  class Test_SharedOnFinley(Test_Shared):  class Test_SharedOnDudley(Test_Shared):
42    def setUp(self):    def setUp(self):
43      self.domain=Rectangle(NE,NE)      self.domain=Rectangle(NE,NE)
44      self.tol=0.001      self.tol=0.001
# Line 46  class Test_SharedOnFinley(Test_Shared): Line 46  class Test_SharedOnFinley(Test_Shared):
46      del self.domain      del self.domain
47      del self.tol      del self.tol
48    
49  class Test_DomainOnFinley(Test_Domain):  class Test_DomainOnDudley(Test_Domain):
50     def setUp(self):     def setUp(self):
51         self.boundary_tag_list = [1, 2, 10, 20]         self.boundary_tag_list = [1, 2, 10, 20]
52         self.domain =Rectangle(NE,NE+1,2)         self.domain =Rectangle(NE,NE+1,2)
# Line 103  class Test_DomainOnFinley(Test_Domain): Line 103  class Test_DomainOnFinley(Test_Domain):
103         self.failUnless(len(tags)==len(ref_tags), "tags list has wrong length.")         self.failUnless(len(tags)==len(ref_tags), "tags list has wrong length.")
104         for i in ref_tags: self.failUnless(i in tags,"tag %s is missing."%i)         for i in ref_tags: self.failUnless(i in tags,"tag %s is missing."%i)
105    
106  class Test_DataOpsOnFinley(Test_Dump, Test_SetDataPointValue, Test_GlobalMinMax, Test_Lazy):  class Test_DataOpsOnDudley(Test_Dump, Test_SetDataPointValue, Test_GlobalMinMax, Test_Lazy):
107     def setUp(self):     def setUp(self):
108         self.domain =Rectangle(NE,NE+1,2)         self.domain =Rectangle(NE,NE+1,2)
109         self.domain_with_different_number_of_samples =Rectangle(2*NE,NE+1,2)         self.domain_with_different_number_of_samples =Rectangle(2*NE,NE+1,2)
110         self.domain_with_different_number_of_data_points_per_sample =Rectangle(2*NE,NE+1,2,integrationOrder=2)         self.domain_with_different_number_of_data_points_per_sample =Rectangle(2*NE,NE+1,2,integrationOrder=2)
111         self.domain_with_different_sample_ordering =Rectangle(NE,NE+1,2, optimize=True)         self.domain_with_different_sample_ordering =Rectangle(NE,NE+1,2, optimize=True)
112         self.filename_base=FINLEY_WORKDIR         self.filename_base=DUDLEY_WORKDIR
113         self.mainfs=Function(self.domain)         self.mainfs=Function(self.domain)
114         self.otherfs=Solution(self.domain)         self.otherfs=Solution(self.domain)
115    
# Line 123  class Test_DataOpsOnFinley(Test_Dump, Te Line 123  class Test_DataOpsOnFinley(Test_Dump, Te
123                
124    
125    
126  class Test_TableInterpolationOnFinley(Test_TableInterpolation):  class Test_TableInterpolationOnDudley(Test_TableInterpolation):
127      def setUp(self):      def setUp(self):
128      self.domain=Rectangle(4,4)      self.domain=Rectangle(4,4)
129      self.functionspaces=[ContinuousFunction(self.domain), Function(self.domain), ReducedFunction(self.domain),      self.functionspaces=[ContinuousFunction(self.domain), Function(self.domain), ReducedFunction(self.domain),
# Line 141  class Test_TableInterpolationOnFinley(Te Line 141  class Test_TableInterpolationOnFinley(Te
141            
142                    
143                    
144  class Test_CSVOnFinley(Test_saveCSV):  class Test_CSVOnDudley(Test_saveCSV):
145     def setUp(self):     def setUp(self):
146         self.domain =Rectangle(NE,NE+1,2)         self.domain =Rectangle(NE,NE+1,2)
147         self.linecount1=20       #see test_save1 for the meaning of these params         self.linecount1=20       #see test_save1 for the meaning of these params
# Line 189  class Test_CSVOnFinley(Test_saveCSV): Line 189  class Test_CSVOnFinley(Test_saveCSV):
189            
190  if __name__ == '__main__':  if __name__ == '__main__':
191     suite = unittest.TestSuite()     suite = unittest.TestSuite()
192     suite.addTest(unittest.makeSuite(Test_SharedOnFinley))     suite.addTest(unittest.makeSuite(Test_SharedOnDudley))
193     suite.addTest(unittest.makeSuite(Test_DataOpsOnFinley))     suite.addTest(unittest.makeSuite(Test_DataOpsOnDudley))
194     suite.addTest(unittest.makeSuite(Test_DomainOnFinley))     suite.addTest(unittest.makeSuite(Test_DomainOnDudley))
195     suite.addTest(unittest.makeSuite(Test_TableInterpolationOnFinley))     suite.addTest(unittest.makeSuite(Test_TableInterpolationOnDudley))
196     suite.addTest(unittest.makeSuite(Test_CSVOnFinley))     suite.addTest(unittest.makeSuite(Test_CSVOnDudley))
197     s=unittest.TextTestRunner(verbosity=2).run(suite)     s=unittest.TextTestRunner(verbosity=2).run(suite)
198     if not s.wasSuccessful(): sys.exit(1)     if not s.wasSuccessful(): sys.exit(1)
199    

Legend:
Removed from v.2881  
changed lines
  Added in v.3087

  ViewVC Help
Powered by ViewVC 1.1.26