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

Method test_whitespace_keeper

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

Source from the content-addressed store, hash-verified

5404 eq(h.encode(), s)
5405
5406 def test_whitespace_keeper(self):
5407 eq = self.assertEqual
5408 s = 'Subject: =?koi8-r?b?8NLP18XSy8EgzsEgxsnOwczYztk=?= =?koi8-r?q?=CA?= zz.'
5409 parts = decode_header(s)
5410 eq(parts, [(b'Subject: ', None), (b'\xf0\xd2\xcf\xd7\xc5\xd2\xcb\xc1 \xce\xc1 \xc6\xc9\xce\xc1\xcc\xd8\xce\xd9\xca', 'koi8-r'), (b' zz.', None)])
5411 hdr = make_header(parts)
5412 eq(hdr.encode(),
5413 'Subject: =?koi8-r?b?8NLP18XSy8EgzsEgxsnOwczYztnK?= zz.')
5414
5415 def test_broken_base64_header(self):
5416 raises = self.assertRaises

Callers

nothing calls this directly

Calls 4

decode_headerFunction · 0.90
make_headerFunction · 0.90
eqFunction · 0.50
encodeMethod · 0.45

Tested by

no test coverage detected