Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pdf-miner
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Qin Kaijie
pdf-miner
Commits
f5939a51
Commit
f5939a51
authored
Jul 13, 2024
by
quyuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add ci
parent
8a8d5436
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
13 deletions
+4
-13
common.py
tests/test_cli/lib/common.py
+4
-13
No files found.
tests/test_cli/lib/common.py
View file @
f5939a51
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment