__revision__ = "$Id: __init__.py,v 1.2 2001/06/07 08:27:56 molson Exp $"


def PreprocessFiles(tester, dirs, files):
    """
    PreprocessFiles(tester, dirs, files) -> (dirs, files)
    
    This function is responsible for sorting and trimming the
    file and directory lists as needed for proper testing.
    """

    ignored_files = ['test_definingscope','test_metaobject','test_operand','test_property','test_scopedtype','test_specifier','test_type','test_metadata_util']
    
    for file in ignored_files:
        if file in files:
            files.remove(file)

    files.sort(CompareFiles)

    return (dirs, files)


g_indexes = {'test_create_and_destroy':1,
             'test_init_repo':2,
             }

def CompareFiles(left,right):
    l = g_indexes.get(left,0)
    r = g_indexes.get(right,0)
    return cmp(l,r)
