mirror of
https://github.com/DS4SD/docling.git
synced 2025-12-08 20:58:11 +00:00
chore: fix or ignore runtime and deprecation warnings (#1660)
* chore: fix or catch deprecation warnings Signed-off-by: Cesar Berrospi Ramis <75900930+ceberam@users.noreply.github.com> * chore: update poetry lock with latest docling-core Signed-off-by: Cesar Berrospi Ramis <75900930+ceberam@users.noreply.github.com> --------- Signed-off-by: Cesar Berrospi Ramis <75900930+ceberam@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
b3e0042813
commit
3942923125
@@ -38,17 +38,15 @@ def get_converter():
|
||||
|
||||
def test_compare_legacy_output(test_doc_paths):
|
||||
converter = get_converter()
|
||||
|
||||
res = converter.convert_all(test_doc_paths, raises_on_error=True)
|
||||
|
||||
for conv_res in res:
|
||||
print(f"Results for {conv_res.input.file}")
|
||||
print(
|
||||
json.dumps(
|
||||
conv_res.legacy_document.model_dump(
|
||||
mode="json", by_alias=True, exclude_none=True
|
||||
with pytest.warns(DeprecationWarning, match="Use document instead"):
|
||||
print(
|
||||
json.dumps(
|
||||
conv_res.legacy_document.model_dump(
|
||||
mode="json", by_alias=True, exclude_none=True
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
# assert res.legacy_output == res.legacy_output_transformed
|
||||
|
||||
Reference in New Issue
Block a user