Repository navigation
chore(tests): unpack the tuple from _msg_to_rfc822_bytes in the NUL test - #5615
Conversation
The NUL test from #5552 assigns the result of EmailDocumentBackend._msg_to_rfc822_bytes() to one name. #5420 changed the helper to return (rfc822_bytes, sender_fallback), so the test now passes a tuple to BytesIO and fails with a TypeError on main. Unpack the tuple, like the other callers do. Signed-off-by: Michele Dolfi <[email protected]>
|
✅ DCO Check Passed Thanks @dolfim-ibm, all your commits are properly signed off. 🎉 |
Merge Protections🟢 Merge protection satisfied — ready to merge. Show 1 satisfied protection🟢 Enforce conventional commitMake sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
|
AI triage (advisory)Checked commit The PR fixes a test that broke after Topic labels added: CI safety: no concern found. A maintainer must still approve CI. 2 related pull request(s) in the same code
The |
There was a problem hiding this comment.
AI first review (advisory): no blocker found
This review covers the full diff at c2fe8b3f1a. It read the code and did not run it.
I found no defects. The one-line change in tests/test_backend_email_msg_nul.py:89 matches the current return type tuple[bytes, str] of _msg_to_rfc822_bytes in docling/backend/email_backend.py:515.
A maintainer makes the merge decision. This review never approves the pull request.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
tests/test_backend_email_msg_nul.py(from #5552) assigns the result ofEmailDocumentBackend._msg_to_rfc822_bytes()to one name. #5420 changed the helper to return(rfc822_bytes, sender_fallback), so the test passes a tuple toBytesIOand fails onmainwithTypeError: a bytes-like object is required, not 'tuple'. This blocks the release run.The fix unpacks the tuple, like the other callers do. No library code changes.
Checklist:
Review evidence:
run-tests-core (3.13)and(3.14)fail ontest_msg_strips_trailing_nul_from_properties_and_bodyin https://github.com/docling-project/docling/actions/runs/45850545841.uv run --frozen -p 3.13 --extra format-email pytest tests/test_backend_email_msg_nul.py tests/test_backend_email_msg_sender.py tests/test_backend_email.pygives 68 passed.make validatepasses.