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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 104 - (show annotations)
Fri Dec 17 07:43:12 2004 UTC (14 years, 10 months ago) by jgs
Original Path: trunk/esys2/finley/test/python/finleyTest.py
File MIME type: text/x-python
File size: 970 byte(s)
*** empty log message ***

1 import sys
2 import unittest
3 import os
4
5 from esys.escript import *
6 from esys import finley
7
8 ## mesh=finley.ReadMesh('myMesh')
9 class MeshTestCase(unittest.TestCase):
10 def testMeshIO(self):
11 """Test reading and writing finley meshes."""
12 print
13 mesh=finley.Brick(1,1,1,1,1.,1.,1.,1,1,1,1,1)
14 fileName='Junk.msh'
15 mesh.write(fileName)
16 mesh2=finley.ReadMesh(fileName)
17 def testNonExistantMeshRead(self):
18 """Test exception generated for attempt to read non existant file."""
19 print
20 try:
21 mesh2=finley.ReadMesh("NonExistantFilename.msh")
22 self.failIf(False,'Failed non existant mesh file exception test.')
23 except Exception, e:
24 print e
25 def testSystemMatrix(self):
26 """Test System Matrix."""
27 print
28 mesh=finley.Brick()
29 systemMatrix=finley.MeshAdapter(mesh)
30
31 suite=unittest.TestSuite()
32 suite.addTest(unittest.makeSuite(MeshTestCase))
33 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