Changeset 2762
- Timestamp:
- Apr 26, 2006, 2:48:11 PM (19 years ago)
- Location:
- inundation
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/pyvolution/domain.py
r2709 r2762 8 8 """ 9 9 10 from mesh import Mesh11 from generic_boundary_conditions import Boundary12 from generic_boundary_conditions import File_boundary13 from generic_boundary_conditions import Dirichlet_boundary14 from generic_boundary_conditions import Time_boundary15 from generic_boundary_conditions import Transmissive_boundary16 from p mesh2domain import pmesh_to_domain10 from pyvolution.mesh import Mesh 11 from pyvolution.generic_boundary_conditions import Boundary 12 from pyvolution.generic_boundary_conditions import File_boundary 13 from pyvolution.generic_boundary_conditions import Dirichlet_boundary 14 from pyvolution.generic_boundary_conditions import Time_boundary 15 from pyvolution.generic_boundary_conditions import Transmissive_boundary 16 from pyvolution.pmesh2domain import pmesh_to_domain 17 17 18 18 import types -
inundation/pyvolution/quantity.py
r2754 r2762 20 20 def __init__(self, domain, vertex_values=None): 21 21 22 from mesh import Mesh22 from pyvolution.mesh import Mesh 23 23 from Numeric import array, zeros, Float 24 24 -
inundation/test_all.py
r2750 r2762 11 11 import unittest 12 12 import os 13 import sys 13 14 14 15 … … 33 34 def get_test_files(path): 34 35 35 import sys36 36 37 37 try: … … 43 43 test_files = [] 44 44 45 #Exclude svn admin dirs 46 files = [x for x in files if x not in exclude_dirs] 47 path_files = [] 45 48 for file in files: 46 47 #Exclude svn admin dirs48 if file in exclude_dirs:49 continue50 49 51 50 absolute_filename = path + os.sep + file 52 51 52 #sys.path.append('pmesh') 53 53 if os.path.isdir(absolute_filename): 54 54 sys.path.append(file) #FIXME: May cause name conflicts between pyvolution\mesh.py and pmesh\mesh.py on some systems 55 path_files.append(file) 55 56 print 'Recursing into', file 56 test_files += get_test_files(absolute_filename) 57 more_test_files, more_path_files =get_test_files(absolute_filename) 58 test_files += more_test_files 59 path_files += more_path_files 57 60 elif file.startswith('test_') and file.endswith('.py'): 58 61 test_files.append(file) 59 62 else: 60 63 pass 61 return test_files 64 return test_files , path_files 62 65 63 66 64 67 65 68 def regressionTest(): 66 import os, unittest67 69 path = os.getcwd() 68 69 files = [x for x in get_test_files(path)if not x == 'test_all.py']70 test_files, path_files = get_test_files(path) 71 files = [x for x in test_files if not x == 'test_all.py'] 70 72 71 73 print 'Testing path %s:' %('...'+path[-50:]) 72 74 for file in files: 73 75 print ' ' + file 74 75 76 if globals().has_key('exclude_files'): 76 77 for file in exclude_files: … … 78 79 print 'WARNING: File '+ file + ' excluded from testing' 79 80 80 81 81 filenameToModuleName = lambda f: os.path.splitext(f)[0] 82 82 moduleNames = map(filenameToModuleName, files) 83 83 modules = map(__import__, moduleNames) 84 85 # Fix up the system path 86 for file in path_files: 87 sys.path.remove(file) 88 84 89 load = unittest.defaultTestLoader.loadTestsFromModule 85 90 return unittest.TestSuite(map(load, modules))
Note: See TracChangeset
for help on using the changeset viewer.