/[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 155 - (show annotations)
Wed Nov 9 02:02:19 2005 UTC (13 years, 11 months ago) by jgs
File MIME type: text/x-python
File size: 908 byte(s)
move all directories from trunk/esys2 into trunk and remove esys2

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