##// END OF EJS Templates
tests: handle Message-Id email header possible wrapping...
tests: handle Message-Id email header possible wrapping The "Message-Id" header will get wrapped with a new line when exceeding 75 characters on Python 3 (see changeset 7d4f2e4899c5 introducing usage of email.header.Header.encode and respective doc). This will occur in an unpredictable manner depending on the hostname's length. To make the test output consistent across Python versions and hostname configuration, we add a filter to unwrap this header value.

File last commit:

r43642:4128ffba stable
r43642:4128ffba stable
Show More
unwrap-message-id.py
6 lines | 148 B | text/x-python | PythonLexer
/ tests / unwrap-message-id.py
from __future__ import absolute_import, print_function
import re
import sys
print(re.sub(r"(?<=Message-Id:) \n ", " ", sys.stdin.read()), end="")