/[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

revision 1141 by gross, Tue May 15 04:24:51 2007 UTC revision 1827 by ksteube, Thu Oct 2 04:28:07 2008 UTC
# Line 1  Line 1 
 # $Id:$  
1    
2  __copyright__="""  Copyright (c) 2006 by ACcESS MNRF  ########################################################
3                      http://www.access.edu.au  #
4                  Primary Business: Queensland, Australia"""  # Copyright (c) 2003-2008 by University of Queensland
5    # Earth Systems Science Computational Center (ESSCC)
6    # http://www.uq.edu.au/esscc
7    #
8    # Primary Business: Queensland, Australia
9    # Licensed under the Open Software License version 3.0
10    # http://www.opensource.org/licenses/osl-3.0.php
11    #
12    ########################################################
13    
14    __copyright__="""Copyright (c) 2003-2008 by University of Queensland
15    Earth Systems Science Computational Center (ESSCC)
16    http://www.uq.edu.au/esscc
17    Primary Business: Queensland, Australia"""
18  __license__="""Licensed under the Open Software License version 3.0  __license__="""Licensed under the Open Software License version 3.0
19               http://www.opensource.org/licenses/osl-3.0.php"""  http://www.opensource.org/licenses/osl-3.0.php"""
20    __url__="http://www.uq.edu.au/esscc/escript-finley"
21    
22  import unittest  import unittest
23  import tempfile  import tempfile
24    
# Line 26  class Test_DomainOnFinley(Test_Domain): Line 40  class Test_DomainOnFinley(Test_Domain):
40         self.domain =Rectangle(NE,NE+1,2)         self.domain =Rectangle(NE,NE+1,2)
41     def tearDown(self):     def tearDown(self):
42         del self.domain         del self.domain
43  class Test_DataOpsOnFinley(Test_Dump): # , Test_SetDataPointValue):  
44       def test_tagsContinuousFunction(self):
45           ref_tags=[0]
46           tags=ContinuousFunction(self.domain).getListOfTags()
47           self.failUnless(len(tags)==len(ref_tags), "tags list has wrong length.")
48           for i in ref_tags: self.failUnless(i in tags,"tag %s is missing."%i)
49    
50       def test_tagsFunction(self):
51           ref_tags=[0]
52           tags=Function(self.domain).getListOfTags()
53           self.failUnless(len(tags)==len(ref_tags), "tags list has wrong length.")
54           for i in ref_tags: self.failUnless(i in tags,"tag %s is missing."%i)
55       def test_tagsReducedFunction(self):
56           ref_tags=[0]
57           tags=ReducedFunction(self.domain).getListOfTags()
58           self.failUnless(len(tags)==len(ref_tags), "tags list has wrong length.")
59           for i in ref_tags: self.failUnless(i in tags,"tag %s is missing."%i)
60       def test_tagsFunctionOnBoundary(self):
61           # For MPI a subdomain may be missing some tags and this test is expected to fail
62           if getMPISizeWorld() == 1:
63             ref_tags=[1, 2, 10, 20]
64             tags=FunctionOnBoundary(self.domain).getListOfTags()
65             self.failUnless(len(tags)==len(ref_tags), "tags list has wrong length.")
66             for i in ref_tags: self.failUnless(i in tags,"tag %s is missing."%i)
67       def test_tagsReducedFunctionOnBoundary(self):
68           # For MPI a subdomain may be missing some tags and this test is expected to fail
69           if getMPISizeWorld() == 1:
70             ref_tags=[1, 2, 10, 20]
71             tags=ReducedFunctionOnBoundary(self.domain).getListOfTags()
72             self.failUnless(len(tags)==len(ref_tags), "tags list has wrong length.")
73             for i in ref_tags: self.failUnless(i in tags,"tag %s is missing."%i)
74       def test_tagsFunctionOnContactOne(self):
75           ref_tags=[]
76           tags=FunctionOnContactOne(self.domain).getListOfTags()
77           self.failUnless(len(tags)==len(ref_tags), "tags list has wrong length.")
78           for i in ref_tags: self.failUnless(i in tags,"tag %s is missing."%i)
79       def test_tagsFunctionOnContactZero(self):
80           ref_tags=[]
81           tags=FunctionOnContactZero(self.domain).getListOfTags()
82           self.failUnless(len(tags)==len(ref_tags), "tags list has wrong length.")
83           for i in ref_tags: self.failUnless(i in tags,"tag %s is missing."%i)
84       def test_tagsReducedFunctionOnContactOne(self):
85           ref_tags=[]
86           tags=ReducedFunctionOnContactOne(self.domain).getListOfTags()
87           self.failUnless(len(tags)==len(ref_tags), "tags list has wrong length.")
88           for i in ref_tags: self.failUnless(i in tags,"tag %s is missing."%i)
89       def test_tagsReducedFunctionOnContactZero(self):
90           ref_tags=[]
91           tags=ReducedFunctionOnContactZero(self.domain).getListOfTags()
92           self.failUnless(len(tags)==len(ref_tags), "tags list has wrong length.")
93           for i in ref_tags: self.failUnless(i in tags,"tag %s is missing."%i)
94    
95    class Test_DataOpsOnFinley(Test_Dump, Test_SetDataPointValue):
96     def setUp(self):     def setUp(self):
97         self.domain =Rectangle(NE,NE+1,2)         self.domain =Rectangle(NE,NE+1,2)
98         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)
# Line 43  class Test_DataOpsOnFinley(Test_Dump): # Line 109  class Test_DataOpsOnFinley(Test_Dump): #
109  if __name__ == '__main__':  if __name__ == '__main__':
110     suite = unittest.TestSuite()     suite = unittest.TestSuite()
111     suite.addTest(unittest.makeSuite(Test_DataOpsOnFinley))     suite.addTest(unittest.makeSuite(Test_DataOpsOnFinley))
112     # suite.addTest(unittest.makeSuite(Test_DomainOnFinley))     suite.addTest(unittest.makeSuite(Test_DomainOnFinley))
113     s=unittest.TextTestRunner(verbosity=2).run(suite)     s=unittest.TextTestRunner(verbosity=2).run(suite)
114     if s.wasSuccessful():     if not s.wasSuccessful(): sys.exit(1)
115       sys.exit(0)  
    else:  
      sys.exit(1)  
     

Legend:
Removed from v.1141  
changed lines
  Added in v.1827

  ViewVC Help
Powered by ViewVC 1.1.26