Strengthen weak assertions in context enhancement and converter tests

- Add doc_item_refs and headings assertions to test_expand_context_docling_merges_metadata
- Add page count and markdown content assertions to test_convert_pdf_with_ocr_engine

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Yiorgis Gozadinos 2026-03-05 11:44:08 +02:00
parent 3c7d746d57
commit c7b03eb9ab
No known key found for this signature in database
3 changed files with 10 additions and 0 deletions

View file

@ -1,6 +1,10 @@
# Changelog
## [Unreleased]
### Changed
- **Test suite cleanup**: Removed stale VCR cassettes, dead fixtures, orphaned directories, and redundant tests. Strengthened weak assertions across search, context enhancement, and converter tests. Relocated misplaced `SearchResult._get_primary_label` test to `test_search.py`
## [0.33.0] - 2026-03-04
### Added

View file

@ -642,6 +642,10 @@ First paragraph of results.
assert len(r.content) > 0
# Score should be preserved (best score)
assert r.score in [0.9, 0.8]
# Expanded content should have docling refs
assert r.doc_item_refs is not None and len(r.doc_item_refs) > 0
# Document has headings, expanded result should too
assert r.headings is not None and len(r.headings) > 0
def create_picture_document() -> DoclingDocument:

View file

@ -1067,6 +1067,8 @@ class TestDoclingServeConverterIntegration:
doc = await converter.convert_file(pdf_path)
assert isinstance(doc, DoclingDocument)
assert len(doc.pages) > 0
assert len(doc.export_to_markdown().strip()) > 100
@pytest.mark.xfail(
reason="docling-serve does not return picture image data in JSON response "