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

Method test_decoded_generator

Lib/test/test_email/test_email.py:278–286  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

276 self.assertRaises(TypeError, msg.get_payload, 1)
277
278 def test_decoded_generator(self):
279 eq = self.assertEqual
280 msg = self._msgobj('msg_07.txt')
281 with openfile('msg_17.txt', encoding="utf-8") as fp:
282 text = fp.read()
283 s = StringIO()
284 g = DecodedGenerator(s)
285 g.flatten(msg)
286 eq(s.getvalue(), text)
287
288 def test__contains__(self):
289 msg = Message()

Callers

nothing calls this directly

Calls 8

getvalueMethod · 0.95
openfileFunction · 0.90
StringIOClass · 0.90
DecodedGeneratorClass · 0.90
eqFunction · 0.85
_msgobjMethod · 0.45
readMethod · 0.45
flattenMethod · 0.45

Tested by

no test coverage detected