MCPcopy Index your code
hub / github.com/python/cpython / msg_as_input

Method msg_as_input

Lib/test/test_email/test_inversion.py:32–37  ·  view source on GitHub ↗
(self, msg)

Source from the content-addressed store, hash-verified

30 message = EmailMessage
31
32 def msg_as_input(self, msg):
33 m = message_from_bytes(msg, policy=policy.SMTP)
34 b = io.BytesIO()
35 g = BytesGenerator(b)
36 g.flatten(m)
37 self.assertEqual(b.getvalue(), msg)
38
39 # XXX: spaces are not preserved correctly here yet in the general case.
40 msg_params = {

Callers

nothing calls this directly

Calls 5

getvalueMethod · 0.95
message_from_bytesFunction · 0.90
BytesGeneratorClass · 0.90
flattenMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected