新增和修改部分测试用例
This commit is contained in:
@@ -28,10 +28,9 @@ def get_api_data(api_file_path: str, key: str = None):
|
||||
api_data = []
|
||||
if os.path.isdir(api_file_path):
|
||||
logger.debug(f"目标路径是一个目录:{api_file_path}")
|
||||
api_files = get_files(target=api_file_path, end=".yaml")
|
||||
api_files = get_files(target=api_file_path, end=".yaml") + get_files(target=api_file_path, end=".yml")
|
||||
for api_file in api_files:
|
||||
api_data.append(YamlHandle(filename=api_file).read_yaml)
|
||||
|
||||
elif os.path.isfile(api_file_path):
|
||||
logger.debug(f"目标路径是一个文件:{api_file_path}")
|
||||
api_data.append(YamlHandle(filename=api_file_path).read_yaml)
|
||||
|
||||
Reference in New Issue
Block a user