MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_default_cte

Method test_default_cte

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

Source from the content-addressed store, hash-verified

880 eq(msg['content-transfer-encoding'], '7bit')
881
882 def test_default_cte(self):
883 eq = self.assertEqual
884 # 7bit data and the default us-ascii _charset
885 msg = MIMEText('hello world')
886 eq(msg['content-transfer-encoding'], '7bit')
887 # Similar, but with 8bit data
888 msg = MIMEText('hello \xf8 world')
889 eq(msg['content-transfer-encoding'], 'base64')
890 # And now with a different charset
891 msg = MIMEText('hello \xf8 world', _charset='iso-8859-1')
892 eq(msg['content-transfer-encoding'], 'quoted-printable')
893
894 @unittest.expectedFailure # TODO: RUSTPYTHON; LookupError: unknown encoding: iso-2022-jp
895 def test_encode7or8bit(self):

Callers

nothing calls this directly

Calls 2

MIMETextClass · 0.90
eqFunction · 0.50

Tested by

no test coverage detected