Skip to content

Test real installed OCR plugin discovery - #2588

Merged
Adam Fourney (afourney) merged 1 commit into
mainfrom
tests/real-ocr-plugin-discovery
Oct 3, 2026
Merged

Adam Fourney (afourney) merged 1 commit into
mainfrom
tests/real-ocr-plugin-discovery

Conversation

@afourney

Copy link
Copy Markdown
Member

The DOCX, PPTX, and XLSX OCR registration tests supplied mocked entry points, so they could pass even if the installed plugin metadata was missing or incorrect. They now discover and load the real installed OCR package through the core plugin loader.

Each test resets the plugin discovery cache and retains its assertions for converter registration, priority, full document conversion, and model request contents. Only external model responses remain mocked in these registration tests.

Validation: all 108 OCR tests passed locally; Black formatting and git diff --check passed. GitHub CI will validate discovery against the packages installed from the checkout across the existing Ubuntu and Windows matrix.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The focused test changes correctly exercise installed entry-point discovery while retaining existing behavioral coverage.

Review effort: Balanced
Findings: None

What changed in this PR

Updates OCR registration tests to validate real installed plugin discovery instead of mocked entry points.

Changes:

  • Resets the core plugin cache before each integration test.
  • Preserves registration, conversion, priority, and model-request assertions.
File Description
packages/​markitdown-ocr/​tests/​test_docx_inheritance.py Uses installed DOCX OCR plugin metadata.
packages/​markitdown-ocr/​tests/​test_pptx_inheritance.py Uses installed PPTX OCR plugin metadata.
packages/​markitdown-ocr/​tests/​test_xlsx_inheritance.py Uses installed XLSX OCR plugin metadata.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@afourney
Adam Fourney (afourney) merged commit 64e3d67 into main Oct 3, 2026
27 checks passed
@afourney
Adam Fourney (afourney) deleted the tests/real-ocr-plugin-discovery branch October 3, 2026 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants