Commit f5939a51 authored by quyuan's avatar quyuan

add ci

parent 8a8d5436
...@@ -4,19 +4,10 @@ def check_shell(cmd): ...@@ -4,19 +4,10 @@ def check_shell(cmd):
res = os.system(cmd) res = os.system(cmd)
assert res == 0 assert res == 0
def count_folders_and_check_contents(directory): def count_folders_and_check_contents(file_path):
# 获取目录下的所有文件和文件夹 # 获取目录下的所有文件和文件夹
contents = os.listdir(directory) if os.path.exists(file_path):
folder_count = 0 folder_count = os.path.getsize(file_path)
for item in contents:
# 检查是否为文件夹
if os.path.isdir(os.path.join(directory, item)):
# 检查文件夹是否为空
folder_path = os.path.join(directory, item)
for folder in os.listdir(folder_path):
folder_count = folder_count + 1
assert os.listdir(folder_path) is not None
print (folder_count)
assert folder_count > 0 assert folder_count > 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment