mirror of
https://github.com/DS4SD/docling.git
synced 2025-08-01 15:02:21 +00:00
feat: replace verify_export with verify_document in CSV conversion tests
Signed-off-by: Matheus Abdias <matheusfabdias@gmail.com>
This commit is contained in:
parent
53451d18d6
commit
1ea502ebd8
@ -8,7 +8,7 @@ from docling.datamodel.base_models import InputFormat
|
|||||||
from docling.datamodel.document import ConversionResult, DoclingDocument
|
from docling.datamodel.document import ConversionResult, DoclingDocument
|
||||||
from docling.document_converter import DocumentConverter
|
from docling.document_converter import DocumentConverter
|
||||||
|
|
||||||
from .verify_utils import verify_export
|
from .verify_utils import verify_document, verify_export
|
||||||
|
|
||||||
GENERATE = False
|
GENERATE = False
|
||||||
|
|
||||||
@ -58,8 +58,7 @@ def test_e2e_valid_csv_conversions():
|
|||||||
pred_itxt, str(gt_path) + ".itxt"
|
pred_itxt, str(gt_path) + ".itxt"
|
||||||
), "export to indented-text"
|
), "export to indented-text"
|
||||||
|
|
||||||
pred_json: str = json.dumps(doc.export_to_dict(), indent=2)
|
assert verify_document(doc, str(gt_path) + ".json"), "export to json"
|
||||||
assert verify_export(pred_json, str(gt_path) + ".json"), "export to json"
|
|
||||||
|
|
||||||
|
|
||||||
def test_e2e_invalid_csv_conversions():
|
def test_e2e_invalid_csv_conversions():
|
||||||
|
Loading…
Reference in New Issue
Block a user