Repository navigation
Test real installed OCR plugin discovery - #2588
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.