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

Diff of /trunk/finley/test/python/run_generators.py

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

revision 1454 by trankine, Fri Jan 11 07:45:58 2008 UTC revision 1455 by phornby, Thu Feb 28 17:19:44 2008 UTC
# Line 41  except KeyError: Line 41  except KeyError:
41       FINLEY_WORKDIR='.'       FINLEY_WORKDIR='.'
42    
43  FINLEY_TEST_MESH_PATH=FINLEY_TEST_DATA+"/data_meshes/"  FINLEY_TEST_MESH_PATH=FINLEY_TEST_DATA+"/data_meshes/"
44  if os.name == "nt":  #if os.name == "nt":
45     FINLEY_TEST_MESH_PATH = FINLEY_TEST_MESH_PATH+"win32/"  #   FINLEY_TEST_MESH_PATH = FINLEY_TEST_MESH_PATH+"win32/"
46  FINLEY_WORKDIR_PATH=FINLEY_WORKDIR+"/"  FINLEY_WORKDIR_PATH=FINLEY_WORKDIR+"/"
47    
48  TEST_FILE_EXT=".test"  TEST_FILE_EXT=".test"
# Line 58  class Test_Generators(unittest.TestCase) Line 58  class Test_Generators(unittest.TestCase)
58        ref_string=open(FINLEY_TEST_MESH_PATH+reference).read().splitlines()        ref_string=open(FINLEY_TEST_MESH_PATH+reference).read().splitlines()
59        self.failUnlessEqual(len(dom_string),len(ref_string),"number of lines in mesh files does not match reference")        self.failUnlessEqual(len(dom_string),len(ref_string),"number of lines in mesh files does not match reference")
60        for l in range(1,len(ref_string)):        for l in range(1,len(ref_string)):
61           self.failUnlessEqual(dom_string[l].strip(),ref_string[l].strip(),"line %d (%s) in mesh files does not match reference (%s)"%(l,ref_string[l].strip(),dom_string[l].strip()))       line=dom_string[l].strip()
62         if os.name == "nt":
63               line=line.replace("e+00","e+0").replace("e-00","e-0")
64             self.failUnlessEqual(line,ref_string[l].strip(),"line %d (%s) in mesh files does not match reference (%s)"%(l,ref_string[l].strip(),line))
65    
66     def test_hex_2D_order1(self):     def test_hex_2D_order1(self):
67        file="hex_2D_order1.msh"        file="hex_2D_order1.msh"
# Line 170  class Test_GMSHReader(unittest.TestCase) Line 173  class Test_GMSHReader(unittest.TestCase)
173        ref_string=open(reference_file).read().splitlines()        ref_string=open(reference_file).read().splitlines()
174        self.failUnlessEqual(len(dom_string),len(ref_string),"number of lines in mesh files does not match reference")        self.failUnlessEqual(len(dom_string),len(ref_string),"number of lines in mesh files does not match reference")
175        for l in range(1,len(ref_string)):        for l in range(1,len(ref_string)):
176           self.failUnlessEqual(dom_string[l].strip(),ref_string[l].strip(),"line %d (%s) in mesh files does not match reference (%s)"%(l,ref_string[l].strip(),dom_string[l].strip()))       line=dom_string[l].strip()
177         if os.name == "nt":
178               line=line.replace("e+00","e+0").replace("e-00","e-0")
179             self.failUnlessEqual(line,ref_string[l].strip(),"line %d (%s) in mesh files does not match reference (%s)"%(l,ref_string[l].strip(),line))
180    
181     def test_Tri3(self):     def test_Tri3(self):
182         file="tri3_gmsh.msh"         file="tri3_gmsh.msh"

Legend:
Removed from v.1454  
changed lines
  Added in v.1455

  ViewVC Help
Powered by ViewVC 1.1.26