Exemple #1
0
 def move_case(cls, main_case_path, case_name, test_dir):
     """
     移动case文件
     :param main_case_path:
     :param case_name:
     :param test_dir:
     :return:
     """
     if type(main_case_path) == list:
         for path in main_case_path:
             # 寻找将执行用例的文件名称
             log.debug('case_name:%s' % case_name)
             find_case_path = Misc.ABSpath() + path
             # 寻找将执行用例的路径
             log.debug('find_case_path:' + str(find_case_path))
             case_path = find_case_path + case_name
             # 找到要执行的用例文件路径
             log.debug('case_path:' + str(case_path))
             Misc.copy_file(case_path, test_dir)
     else:
         log.debug('case_name:%s' % case_name)
         find_case_path = Misc.ABSpath() + main_case_path
         # 寻找将执行用例的路径
         log.debug('find_case_path:' + str(find_case_path))
         case_path = find_case_path + case_name
         # 找到要执行的用例文件路径
         log.debug('case_path:' + str(case_path))
         Misc.copy_file(case_path, test_dir)