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

Method test_default_cte

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

Source from the content-addressed store, hash-verified

905 eq(msg['content-transfer-encoding'], '7bit')
906
907 def test_default_cte(self):
908 eq = self.assertEqual
909 # 7bit data and the default us-ascii _charset
910 msg = MIMEText('hello world')
911 eq(msg['content-transfer-encoding'], '7bit')
912 # Similar, but with 8bit data
913 msg = MIMEText('hello \xf8 world')
914 eq(msg['content-transfer-encoding'], 'base64')
915 # And now with a different charset
916 msg = MIMEText('hello \xf8 world', _charset='iso-8859-1')
917 eq(msg['content-transfer-encoding'], 'quoted-printable')
918
919 def test_encode7or8bit(self):
920 # Make sure a charset whose input character set is 8bit but

Callers

nothing calls this directly

Calls 2

MIMETextClass · 0.90
eqFunction · 0.85

Tested by

no test coverage detected