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

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

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

revision 82 by jgs, Tue Oct 26 06:53:54 2004 UTC revision 153 by jgs, Tue Oct 25 01:51:20 2005 UTC
# Line 1  Line 1 
1    # $Id$
2    
3  import sys  import sys
4  import unittest  import unittest
5  import os  import os
6    
7  esys_root=os.getenv('ESYS_ROOT')  from esys.escript import *
8  sys.path.append(esys_root+'/finley/lib')  from esys import bruce
 sys.path.append(esys_root+'/escript/lib')  
 sys.path.append(esys_root+'/escript/py_src')  
   
9    
 import escript  
 import finley  
10  import numarray  import numarray
11    
12  class escriptTestCase(unittest.TestCase):  class escriptTestCase(unittest.TestCase):
13    
14    def testPow(self):    def testPow(self):
15      """Test the pow function."""      """Test the pow function."""
16      myFuncSpac=escript.FunctionSpace()      myFuncSpac=escript.FunctionSpace()
17      myVector=numarray.array([[1,2],[3,4]])      myVector=numarray.array([[1,2],[3,4]])
18      myData=escript.Data(myVector,myFuncSpac,True)      myData=escript.Data(myVector,myFuncSpac,True)
19      print myData**3      print myData**3
20    
21    def testFunctionSpace(self):    def testFunctionSpace(self):
22        """Test the creation of FunctionSpace objects."""      """Test the creation of FunctionSpace objects."""
23        print      mesh=bruce.Brick(1,1,1)
24        mesh=finley.Brick(1,1,1,1,1.,1.,1.,1,1,1,1,1)      cFunc=escript.ContinuousFunction(mesh)
25        cFunc=escript.ContinuousFunction(mesh)  
26    def testDataOperations(self):    def testDataOperations(self):
27      """Test the operations that may be performed on Data."""      """Test the operations that may be performed on Data."""
28      myFuncSpac=escript.FunctionSpace()      myFuncSpac=escript.FunctionSpace()
# Line 68  suite=unittest.TestSuite() Line 67  suite=unittest.TestSuite()
67  suite.addTest(unittest.makeSuite(escriptTestCase))  suite.addTest(unittest.makeSuite(escriptTestCase))
68  unittest.TextTestRunner(verbosity=2).run(suite)  unittest.TextTestRunner(verbosity=2).run(suite)
69    
70    sys.exit(0)
   
   

Legend:
Removed from v.82  
changed lines
  Added in v.153

  ViewVC Help
Powered by ViewVC 1.1.26