/[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 756 by gross, Wed Apr 26 06:35:36 2006 UTC revision 757 by woo409, Mon Jun 26 13:12:56 2006 UTC
# Line 18  from esys.escript import * Line 18  from esys.escript import *
18  from esys.finley import Interval,Rectangle,Brick,JoinFaces  from esys.finley import Interval,Rectangle,Brick,JoinFaces
19    
20  FINLEY_TEST_DATA_PATH=os.environ['FINLEY_TEST_DATA']+"/data_meshes/"  FINLEY_TEST_DATA_PATH=os.environ['FINLEY_TEST_DATA']+"/data_meshes/"
21    if os.name == "nt":
22       FINLEY_TEST_DATA_PATH = FINLEY_TEST_DATA_PATH+"win32/"
23  FINLEY_WORKDIR_PATH=os.environ['FINLEY_WORKDIR']+"/"  FINLEY_WORKDIR_PATH=os.environ['FINLEY_WORKDIR']+"/"
24    
25  TEST_FILE_EXT=".test"  TEST_FILE_EXT=".test"
# Line 26  class Test_Generators(unittest.TestCase) Line 28  class Test_Generators(unittest.TestCase)
28     def checker(self,dom,reference):     def checker(self,dom,reference):
29        dom_file=FINLEY_WORKDIR_PATH+TEST_FILE_EXT        dom_file=FINLEY_WORKDIR_PATH+TEST_FILE_EXT
30        dom.write(dom_file)        dom.write(dom_file)
31    # Uncomment this section to dump the files for regression testing
32    #      if True:
33    #         dom.write(FINLEY_TEST_DATA_PATH+reference)
34        dom_string=open(dom_file).read().splitlines()        dom_string=open(dom_file).read().splitlines()
35        ref_string=open(FINLEY_TEST_DATA_PATH+reference).read().splitlines()        ref_string=open(FINLEY_TEST_DATA_PATH+reference).read().splitlines()
36        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")

Legend:
Removed from v.756  
changed lines
  Added in v.757

  ViewVC Help
Powered by ViewVC 1.1.26