/[escript]/branches/domexper/dudley/test/python/fixme_run_generators.py
ViewVC logotype

Diff of /branches/domexper/dudley/test/python/fixme_run_generators.py

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

revision 2344 by jfenwick, Mon Mar 30 02:13:58 2009 UTC revision 2416 by gross, Wed May 13 06:03:59 2009 UTC
# Line 39  try: Line 39  try:
39  except KeyError:  except KeyError:
40       FINLEY_WORKDIR='.'       FINLEY_WORKDIR='.'
41    
42  FINLEY_TEST_MESH_PATH=FINLEY_TEST_DATA+"/data_meshes/"  FINLEY_TEST_MESH_PATH=os.path.join(FINLEY_TEST_DATA,"data_meshes")
43  #if os.name == "nt":  #if os.name == "nt":
44  #   FINLEY_TEST_MESH_PATH = FINLEY_TEST_MESH_PATH+"win32/"  #   FINLEY_TEST_MESH_PATH = os.path.join(FINLEY_TEST_MESH_PATH,"win32")
45  FINLEY_WORKDIR_PATH=FINLEY_WORKDIR+"/"  FINLEY_WORKDIR_PATH=FINLEY_WORKDIR
46    
47  TEST_FILE_EXT=".test"  TEST_FILE_EXT=".test"
48  class Test_Generators(unittest.TestCase):  class Test_Generators(unittest.TestCase):
49    
50     def checker(self,dom,reference):     def checker(self,dom,reference):
51        dom_file=FINLEY_WORKDIR_PATH+TEST_FILE_EXT        dom_file=os.path.join(FINLEY_WORKDIR_PATH,TEST_FILE_EXT)
52        dom.write(dom_file)        dom.write(dom_file)
53  # Uncomment this section to dump the files for regression testing  # Uncomment this section to dump the files for regression testing
54  #      if True:  #      if True:
55  #         dom.write(FINLEY_TEST_MESH_PATH+reference)  #         dom.write(os.path.join(FINLEY_TEST_MESH_PATH,reference))
56        dom_string=open(dom_file).read().splitlines()        dom_string=open(dom_file).read().splitlines()
57        ref_string=open(FINLEY_TEST_MESH_PATH+reference).read().splitlines()        ref_string=open(os.path.join(FINLEY_TEST_MESH_PATH,reference)).read().splitlines()
58        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")
59        for l in range(1,len(ref_string)):        for l in range(1,len(ref_string)):
60       line=dom_string[l].strip()       line=dom_string[l].strip()

Legend:
Removed from v.2344  
changed lines
  Added in v.2416

  ViewVC Help
Powered by ViewVC 1.1.26