#!/usr/bin/env python
from Ft.Lib.TestSuite import TestWalker

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']
    
    for file in ignored_files:
        if file in files:
            files.remove(file)

    ignored_dirs = ['Tools']
    
    for dir in ignored_dirs:
        if dir in dirs:
            dirs.remove(dir)

    return (dirs, files)


if __name__ == '__main__':
    import test, os, sys
    t = TestWalker.TestWalker(test.__file__)
    t.run()
