|
|
@@ -11,8 +11,14 @@ def count_folders_and_check_contents(directory):
|
|
|
for item in contents:
|
|
|
# 检查是否为文件夹
|
|
|
if os.path.isdir(os.path.join(directory, item)):
|
|
|
- folder_count += 1
|
|
|
# 检查文件夹是否为空
|
|
|
folder_path = os.path.join(directory, item)
|
|
|
- assert os.listdir(folder_path) is not None
|
|
|
- assert folder_count == 3
|
|
|
+ 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 == 13
|
|
|
+
|
|
|
+
|
|
|
+if __name__ == "__main__":
|
|
|
+ count_folders_and_check_contents("/home/quyuan/code/Magic-PDF/Magic-PDF/Magic-PDF/ci")
|