Skip to content

chore(tests): unpack the tuple from _msg_to_rfc822_bytes in the NUL test - #5615

Merged
dolfim-ibm merged 1 commit into
mainfrom
fix/email-msg-nul-test-tuple
Nov 26, 2026
Merged

dolfim-ibm merged 1 commit into
mainfrom
fix/email-msg-nul-test-tuple

Conversation

@dolfim-ibm

Copy link
Copy Markdown
Member

tests/test_backend_email_msg_nul.py (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 passes a tuple to BytesIO and fails on main with TypeError: 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:

  • Documentation has been updated, if necessary.
  • Examples have been added, if necessary.
  • Tests have been added, if necessary.

Review evidence:

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]>
@github-actions

Copy link
Copy Markdown
Contributor

✅ DCO Check Passed

Thanks @dolfim-ibm, all your commits are properly signed off. 🎉

@mergify

mergify Bot commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

Merge Protections

🟢 Merge protection satisfied — ready to merge.

Show 1 satisfied protection

🟢 Enforce conventional commit

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert)(?:\(.+\))?(!)?:

@dolfim-ibm dolfim-ibm changed the title fix(tests): unpack the tuple from _msg_to_rfc822_bytes in the NUL test chore(tests): unpack the tuple from _msg_to_rfc822_bytes in the NUL test Nov 26, 2026
@github-actions github-actions Bot added ai:ci-safe AI triage found no CI-safety concern (advisory) bug Something isn't working email issue related to email (EML, MSG) backend priority:low tests issue related to changes needed in the tests labels Nov 26, 2026
@github-actions

Copy link
Copy Markdown
Contributor

AI triage (advisory)

Checked commit c2fe8b3f1a. The analysis read the diff only. It did not run code from this pull request.

The PR fixes a test that broke after _msg_to_rfc822_bytes() began to return a tuple. The test now unpacks (rfc822, _). No library code changes.

Topic labels added: bug, tests, priority:low, email.

CI safety: no concern found. A maintainer must still approve CI.

2 related pull request(s) in the same code
PR State Signal Assessment
#5552 merged referenced as #5552 related: This PR fixes the test file that #5552 added. It does not repeat the NUL-stripping change.
#5420 merged referenced as #5420 related: #5420 changed _msg_to_rfc822_bytes() to return a tuple and updated its own callers. This PR updates the one caller in the test from #5552 that was missed.

The ai:* labels are advisory. They do not approve CI and they do not add tests:full. A new push runs this check again.

@github-actions github-actions Bot 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.

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.

@github-actions github-actions Bot added the ai:review-lgtm AI first review found no blocker or major issue (advisory) label Nov 26, 2026
@codecov

codecov Bot commented Nov 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@dolfim-ibm
dolfim-ibm merged commit bb4b92e into main Nov 26, 2026
34 checks passed
@dolfim-ibm
dolfim-ibm deleted the fix/email-msg-nul-test-tuple branch November 26, 2026 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai:ci-safe AI triage found no CI-safety concern (advisory) ai:review-lgtm AI first review found no blocker or major issue (advisory) bug Something isn't working email issue related to email (EML, MSG) backend priority:low tests issue related to changes needed in the tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants