Changeset 2762


Ignore:
Timestamp:
Apr 26, 2006, 2:48:11 PM (19 years ago)
Author:
duncan
Message:

fixing test_all ticket issue #72

Location:
inundation
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • inundation/pyvolution/domain.py

    r2709 r2762  
    88"""
    99
    10 from mesh import Mesh
    11 from generic_boundary_conditions import Boundary
    12 from generic_boundary_conditions import File_boundary
    13 from generic_boundary_conditions import Dirichlet_boundary
    14 from generic_boundary_conditions import Time_boundary
    15 from generic_boundary_conditions import Transmissive_boundary
    16 from pmesh2domain import pmesh_to_domain
     10from pyvolution.mesh import Mesh
     11from pyvolution.generic_boundary_conditions import Boundary
     12from pyvolution.generic_boundary_conditions import File_boundary
     13from pyvolution.generic_boundary_conditions import Dirichlet_boundary
     14from pyvolution.generic_boundary_conditions import Time_boundary
     15from pyvolution.generic_boundary_conditions import Transmissive_boundary
     16from pyvolution.pmesh2domain import pmesh_to_domain
    1717
    1818import types
  • inundation/pyvolution/quantity.py

    r2754 r2762  
    2020    def __init__(self, domain, vertex_values=None):
    2121
    22         from mesh import Mesh
     22        from pyvolution.mesh import Mesh
    2323        from Numeric import array, zeros, Float
    2424
  • inundation/test_all.py

    r2750 r2762  
    1111import unittest
    1212import os
     13import sys
    1314
    1415
     
    3334def get_test_files(path):
    3435
    35     import sys
    3636
    3737    try:
     
    4343    test_files = []
    4444
     45    #Exclude svn admin dirs
     46    files = [x for x in files if x not in exclude_dirs]
     47    path_files = []
    4548    for file in files:
    46 
    47         #Exclude svn admin dirs
    48         if file in exclude_dirs:
    49             continue
    5049
    5150        absolute_filename = path + os.sep + file
    5251
     52        #sys.path.append('pmesh')
    5353        if os.path.isdir(absolute_filename):
    5454            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)
    5556            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
    5760        elif file.startswith('test_') and file.endswith('.py'):
    5861            test_files.append(file)
    5962        else:
    6063            pass
    61     return test_files
     64    return test_files , path_files
    6265
    6366
    6467
    6568def regressionTest():
    66     import os, unittest
    6769    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']
    7072
    7173    print 'Testing path %s:' %('...'+path[-50:])
    7274    for file in files:
    7375        print '  ' + file
    74 
    7576    if globals().has_key('exclude_files'):
    7677        for file in exclude_files:
     
    7879            print 'WARNING: File '+ file + ' excluded from testing'
    7980
    80 
    8181    filenameToModuleName = lambda f: os.path.splitext(f)[0]
    8282    moduleNames = map(filenameToModuleName, files)
    8383    modules = map(__import__, moduleNames)
     84
     85    # Fix up the system path
     86    for file in path_files:
     87        sys.path.remove(file)
     88       
    8489    load = unittest.defaultTestLoader.loadTestsFromModule
    8590    return unittest.TestSuite(map(load, modules))
Note: See TracChangeset for help on using the changeset viewer.