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

Method test_rfc2047_rfc2047_7

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

Source from the content-addressed store, hash-verified

2550 [(b'(', None), (b'a b', 'iso-8859-1'), (b')', None)])
2551
2552 def test_rfc2047_rfc2047_7(self):
2553 # 7th testcase at end of RFC 2047
2554 s = '(=?ISO-8859-1?Q?a?= =?ISO-8859-2?Q?_b?=)'
2555 self.assertEqual(decode_header(s),
2556 [(b'(', None), (b'a', 'iso-8859-1'), (b' b', 'iso-8859-2'),
2557 (b')', None)])
2558 self.assertEqual(make_header(decode_header(s)).encode(), s.lower())
2559 self.assertEqual(str(make_header(decode_header(s))), '(a b)')
2560
2561 def test_multiline_header(self):
2562 s = '=?windows-1252?q?=22M=FCller_T=22?=\r\n <T.Mueller@xxx.com>'

Callers

nothing calls this directly

Calls 6

decode_headerFunction · 0.90
make_headerFunction · 0.90
strFunction · 0.85
assertEqualMethod · 0.45
encodeMethod · 0.45
lowerMethod · 0.45

Tested by

no test coverage detected