/[escript]/trunk/finley/test/python/test_utilframe.py
ViewVC logotype

Diff of /trunk/finley/test/python/test_utilframe.py

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

revision 617 by elspeth, Wed Mar 22 02:58:17 2006 UTC revision 618 by gross, Wed Mar 22 04:02:38 2006 UTC
# Line 18  class Test_util2(unittest.TestCase): Line 18  class Test_util2(unittest.TestCase):
18     def setUp(self):     def setUp(self):
19         self.__dom =Rectangle(10,10,2)         self.__dom =Rectangle(10,10,2)
20         self.functionspace = FunctionOnBoundary(self.__dom) # due to a bug in escript python needs to hold a reference to the domain         self.functionspace = FunctionOnBoundary(self.__dom) # due to a bug in escript python needs to hold a reference to the domain
21     def test_add_overloaded_constData_rank1_taggedData_rank0(self):     def itest_add_overloaded_constData_rank1_taggedData_rank0(self):
22         arg0=Data(numarray.array([4.5897569702707663, 3.4489828945022865]),self.functionspace)         arg0=Data(numarray.array([4.5897569702707663, 3.4489828945022865]),self.functionspace)
23         arg1=Data(0.812494849561,self.functionspace)         arg1=Data(0.812494849561,self.functionspace)
24         arg1.setTaggedValue(1,-0.798066999908)         arg1.setTaggedValue(1,-0.798066999908)
# Line 31  class Test_util2(unittest.TestCase): Line 31  class Test_util2(unittest.TestCase):
31         self.failUnless(isinstance(res,Data),"wrong type of result.")         self.failUnless(isinstance(res,Data),"wrong type of result.")
32         self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")         self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")
33         self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")         self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
34          #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
35       def test_inverse_array_dim1(self):
36          arg=numarray.array([[1.3914367298126584]])
37          res=inverse(arg)
38          self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
39          self.failUnlessEqual(res.shape,(1, 1),"wrong shape of result.")
40          self.failUnless(Lsup(matrixmult(res,arg)-kronecker(1))<=self.RES_TOL,"wrong result")
41    
42  if __name__ == '__main__':  if __name__ == '__main__':
43     suite = unittest.TestSuite()     suite = unittest.TestSuite()
44     suite.addTest(unittest.makeSuite(Test_util2))     suite.addTest(unittest.makeSuite(Test_util2))

Legend:
Removed from v.617  
changed lines
  Added in v.618

  ViewVC Help
Powered by ViewVC 1.1.26