Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
wangsen
MinerU
Commits
67f3fcce
Commit
67f3fcce
authored
Jul 13, 2024
by
quyuan
Browse files
add ci
parent
3a0039eb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
5 deletions
+1
-5
tests/test_cli/test_cli.py
tests/test_cli/test_cli.py
+1
-5
No files found.
tests/test_cli/test_cli.py
View file @
67f3fcce
import
pytest
import
pytest
import
os
import
os
from
conf
import
conf
from
conf
import
conf
import
subprocess
from
lib
import
common
import
logging
import
os
import
os
import
json
import
json
from
loguru
import
logger
from
magic_pdf.pipe.UNIPipe
import
UNIPipe
from
magic_pdf.pipe.UNIPipe
import
UNIPipe
from
magic_pdf.rw.DiskReaderWriter
import
DiskReaderWriter
from
magic_pdf.rw.DiskReaderWriter
import
DiskReaderWriter
pdf_res_path
=
conf
.
conf
[
"pdf_res_path"
]
pdf_res_path
=
conf
.
conf
[
"pdf_res_path"
]
...
@@ -27,7 +23,7 @@ class TestCli:
...
@@ -27,7 +23,7 @@ class TestCli:
demo_names
.
append
(
pdf_file
.
split
(
'.'
)[
0
])
demo_names
.
append
(
pdf_file
.
split
(
'.'
)[
0
])
for
demo_name
in
demo_names
:
for
demo_name
in
demo_names
:
model_path
=
os
.
path
.
join
(
pdf_dev_path
,
f
"
{
demo_name
}
_model.json"
)
model_path
=
os
.
path
.
join
(
pdf_dev_path
,
f
"
{
demo_name
}
_model.json"
)
pdf_path
=
os
.
path
.
join
(
pdf_dev_path
,
f
"
{
demo_name
}
.pdf"
)
pdf_path
=
os
.
path
.
join
(
pdf_dev_path
,
"pdf"
,
f
"
{
demo_name
}
.pdf"
)
pdf_bytes
=
open
(
pdf_path
,
"rb"
).
read
()
pdf_bytes
=
open
(
pdf_path
,
"rb"
).
read
()
model_json
=
json
.
loads
(
open
(
model_path
,
"r"
,
encoding
=
"utf-8"
).
read
())
model_json
=
json
.
loads
(
open
(
model_path
,
"r"
,
encoding
=
"utf-8"
).
read
())
image_writer
=
DiskReaderWriter
(
pdf_dev_path
)
image_writer
=
DiskReaderWriter
(
pdf_dev_path
)
...
...
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