Logo
Explore Help
Register Sign In
yujunjun/docling
1
0
Fork 0
You've already forked docling
mirror of https://github.com/docling-project/docling.git synced 2025-06-27 05:20:05 +00:00
Code Issues Packages Projects Releases Wiki Activity
docling/tests/test_cli.py

21 lines
428 B
Python
Raw Normal View History

feat: add docling cli (#75) * chore: add simple convert script Signed-off-by: Peter Staar <taa@zurich.ibm.com> * reformatted all Signed-off-by: Peter Staar <taa@zurich.ibm.com> * reformatted all Signed-off-by: Peter Staar <taa@zurich.ibm.com> * added default arg Signed-off-by: Peter Staar <taa@zurich.ibm.com> * use typer for the docling CLI Signed-off-by: Michele Dolfi <dol@zurich.ibm.com> * describe output when saving Signed-off-by: Michele Dolfi <dol@zurich.ibm.com> * add tests for CLI Signed-off-by: Michele Dolfi <dol@zurich.ibm.com> * add export options Signed-off-by: Michele Dolfi <dol@zurich.ibm.com> --------- Signed-off-by: Peter Staar <taa@zurich.ibm.com> Signed-off-by: Michele Dolfi <dol@zurich.ibm.com> Co-authored-by: Michele Dolfi <dol@zurich.ibm.com>
2024-09-13 14:03:09 +02:00
from typer.testing import CliRunner
from docling.cli.main import app
runner = CliRunner()
def test_cli_help():
result = runner.invoke(app, ["--help"])
assert result.exit_code == 0
def test_cli_version():
result = runner.invoke(app, ["--version"])
assert result.exit_code == 0
def test_cli_convert():
result = runner.invoke(app, ["./tests/data/2305.03393v1-pg9.pdf"])
assert result.exit_code == 0
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.5 Page: 328ms Template: 29ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API