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

Annotation of /trunk/finley/test/python/finleyTest.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 82 - (hide annotations)
Tue Oct 26 06:53:54 2004 UTC (14 years, 11 months ago) by jgs
Original Path: trunk/esys2/finley/test/python/finleyTest.py
File MIME type: text/x-python
File size: 1110 byte(s)
Initial revision

1 jgs 82 import sys
2     import unittest
3     import os
4    
5     esys_root=os.getenv('ESYS_ROOT')
6     sys.path.append(esys_root+'/finley/lib')
7     sys.path.append(esys_root+'/escript/lib')
8     sys.path.append(esys_root+'/escript/py_src')
9    
10     import escript
11     import finley
12    
13     ## mesh=finley.ReadMesh('myMesh')
14     class MeshTestCase(unittest.TestCase):
15     def testMeshIO(self):
16     """Test reading and writing finley meshes."""
17     print
18     mesh=finley.Brick(1,1,1,1,1.,1.,1.,1,1,1,1,1)
19     fileName='Junk.msh'
20     mesh.write(fileName)
21     mesh2=finley.ReadMesh(fileName)
22     def testNonExistantMeshRead(self):
23     """Test exception generated for attempt to read non existant file."""
24     print
25     try:
26     mesh2=finley.ReadMesh("NonExistantFilename.msh")
27     self.failIf(False,'Failed non existant mesh file exception test.')
28     except Exception, e:
29     print e
30     def testSystemMatrix(self):
31     """Test System Matrix."""
32     print
33     mesh=finley.Brick()
34     systemMatrix=finley.MeshAdapter(mesh)
35    
36     suite=unittest.TestSuite()
37     suite.addTest(unittest.makeSuite(MeshTestCase))
38     unittest.TextTestRunner(verbosity=2).run(suite)

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.26