/[escript]/trunk/escript/test/python/insituTests.py
ViewVC logotype

Diff of /trunk/escript/test/python/insituTests.py

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

revision 373 by jgs, Wed Nov 9 02:02:19 2005 UTC revision 374 by jgs, Fri Dec 16 01:35:07 2005 UTC
# Line 40  class escriptTestCase(unittest.TestCase) Line 40  class escriptTestCase(unittest.TestCase)
40    
41    def testAlina1(self):    def testAlina1(self):
42      P1 = 10.0      P1 = 10.0
43      assert log(P1) == math.log10(10.0)      assert log10(P1) == math.log10(10.0)
44      assert ln(P1) == math.log(10.0,math.e)      assert log(P1) == math.log(10.0,math.e)
45    
46    def testAlina2(self):    def testAlina2(self):
47      P = 10.0*Scalar(1.0, ContinuousFunction(self.msh))      P = 10.0*Scalar(1.0, ContinuousFunction(self.msh))
48      assert log(P).convertToNumArray()[0] == math.log10(10.0)      assert log10(P).convertToNumArray()[0] == math.log10(10.0)
49      assert ln(P).convertToNumArray()[0] == math.log(10.0,math.e)      assert log(P).convertToNumArray()[0] == math.log(10.0,math.e)
50    
51    def testLog(self):    def testLog(self):
52      for wh in [ContinuousFunction(self.msh),Function(self.msh)]:      for wh in [ContinuousFunction(self.msh),Function(self.msh)]:
# Line 55  class escriptTestCase(unittest.TestCase) Line 55  class escriptTestCase(unittest.TestCase)
55            #print "\n", ex, a, "==>"            #print "\n", ex, a, "==>"
56            arg=self.prepareArg(a,ex,wh)            arg=self.prepareArg(a,ex,wh)
57            #print "\nlog"            #print "\nlog"
58            result = arg.log()            result = arg._log10()
59    
60    def testLn(self):    def testLn(self):
61      for wh in [ContinuousFunction(self.msh),Function(self.msh)]:      for wh in [ContinuousFunction(self.msh),Function(self.msh)]:
# Line 64  class escriptTestCase(unittest.TestCase) Line 64  class escriptTestCase(unittest.TestCase)
64            #print "\n", ex, a, "==>"            #print "\n", ex, a, "==>"
65            arg=self.prepareArg(a,ex,wh)            arg=self.prepareArg(a,ex,wh)
66            #print "\nln"            #print "\nln"
67            result = arg.ln()            result = arg._log()
68    
69  if __name__ == '__main__':  if __name__ == '__main__':
70    suite=unittest.TestSuite()    suite=unittest.TestSuite()

Legend:
Removed from v.373  
changed lines
  Added in v.374

  ViewVC Help
Powered by ViewVC 1.1.26