import unittest
import argparse

def __load_tests_from_dir(search_dir):
    assert search_dir
    
    test_suit = unittest.TestLoader().discover(search_dir)
    
    return test_suit

def __parse_tests(test_suit):
    pass

def __discover_tests():
    pass

def main():
    parser = argparse.ArgumentParser(description='Discover test cases for user to run')
    
    parser.add_argument('-d', type=str, dest='root', default='./', help='Specify the root direcovery to discover more test cases')
    parser.add_argument('-f', type=str, dest='file', help='Specify the test cases out device, default to stdout')
    
    args = parser.parse_args()
    __discover_tests(args)
    
if __name__ == '__main__':
    main()
@@ -196,24 +196,25 @@
 e_tests(test
+s
 _suit):%0A    
@@ -222,32 +222,702 @@
 ass%0A
-%0Adef __discover_tests():
+def __print_tests_tree(tests_tree, mode, option):%0A    pass%0A%0Adef __get_print_option(args):%0A    option = dict()%0A    if 'file' not in args:%0A        mode = 'stdout'%0A    else:%0A        mode = 'file'%0A        option%5B'path'%5D = args%5B'file'%5D%0A        %0A    return (mode, option)%0A%0Adef __print_tests_to_stdout(tests_tree, option):%0A    pass%0A%0Adef __print_tests_to_file(tests_tree, option):%0A    pass%0A%0Adef __print_tests(fd, tests_tree, option):%0A    pass%0A%0Adef __discover_tests(args):%0A    tests_suit = __load_tests_from_dir(args%5B'root'%5D)%0A    %0A    tests_tree = __parse_tests(tests_suit)%0A    %0A    #get print mode and options%0A    mode, option = __get_print_option(args)%0A    __print_tests_tree(tests_tree, mode, option)
 %0A   
@@ -1374,12 +1374,13 @@
 :%0A    main()
+%0A

update tests tree print option