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
e25a8499
Unverified
Commit
e25a8499
authored
Apr 29, 2024
by
myhloli
Committed by
GitHub
Apr 29, 2024
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'magicpdf:master' into master
parents
e980d2ef
80ca01bd
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
907 additions
and
5 deletions
+907
-5
conf.py
tests/test_cli/conf/conf.py
+1
-1
common.py
tests/test_cli/lib/common.py
+11
-4
over_all_benchamark.py
tools/over_all_benchamark.py
+895
-0
No files found.
tests/test_cli/conf/conf.py
View file @
e25a8499
...
...
@@ -2,7 +2,7 @@ import os
conf
=
{
"code_path"
:
os
.
environ
.
get
(
'GITHUB_WORKSPACE'
),
"pdf_dev_path"
:
os
.
environ
.
get
(
'GITHUB_WORKSPACE'
)
+
"/tests/test_cli/pdf_dev"
,
"pdf_res_path"
:
"/home/quyuan/code/Magic-PDF/Magic-PDF/Magic-PDF/
data
"
"pdf_res_path"
:
"/home/quyuan/code/Magic-PDF/Magic-PDF/Magic-PDF/
ci
"
}
tests/test_cli/lib/common.py
View file @
e25a8499
import
subprocess
import
os
def
check_shell
(
cmd
):
res
=
subprocess
.
check_output
(
cmd
,
shell
=
True
)
res
=
os
.
system
(
cmd
)
assert
res
==
0
def
count_folders_and_check_contents
(
directory
):
...
...
@@ -10,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"
)
\ No newline at end of file
tools/over_all_benchamark.py
0 → 100644
View file @
e25a8499
This diff is collapsed.
Click to expand it.
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