fix: No matches
All checks were successful
Deploy to Staging / Build Images (pull_request) Successful in 37s
Deploy to Staging / Deploy to Staging (pull_request) Successful in 22s
Deploy to Staging / Verify Staging (pull_request) Successful in 8s
Deploy to Staging / Notify Staging Ready (pull_request) Successful in 8s
Deploy to Staging / Notify Staging Failure (pull_request) Has been skipped

This commit is contained in:
Eric Gullickson
2026-02-07 16:35:28 -06:00
parent 3adbb10ff6
commit 9a2b12c5dc
2 changed files with 19 additions and 7 deletions

View File

@@ -44,12 +44,17 @@ def _make_result(
def _mock_paddle_result(
dt_polys: list, rec_texts: list[str], rec_scores: list[float]
) -> MagicMock:
"""Create a mock PaddleOCR v3.x predict() result object."""
"""Create a mock PaddleOCR v3.x predict() result object.
Wraps data under ``"res"`` key to match save_to_json format.
"""
result = MagicMock()
result.json = {
"dt_polys": dt_polys,
"rec_texts": rec_texts,
"rec_scores": rec_scores,
"res": {
"dt_polys": dt_polys,
"rec_texts": rec_texts,
"rec_scores": rec_scores,
}
}
return result