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

Method test_base64_splittable

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

Source from the content-addressed store, hash-verified

5199 eq(x, str(make_header(decode_header(s))))
5200
5201 def test_base64_splittable(self):
5202 eq = self.ndiffAssertEqual
5203 h = Header(charset='koi8-r', maxlinelen=20)
5204 x = 'xxxx ' * 20
5205 h.append(x)
5206 s = h.encode()
5207 eq(s, """\
5208=?koi8-r?b?eHh4?=
5209 =?koi8-r?b?eCB4?=
5210 =?koi8-r?b?eHh4?=
5211 =?koi8-r?b?IHh4?=
5212 =?koi8-r?b?eHgg?=
5213 =?koi8-r?b?eHh4?=
5214 =?koi8-r?b?eCB4?=
5215 =?koi8-r?b?eHh4?=
5216 =?koi8-r?b?IHh4?=
5217 =?koi8-r?b?eHgg?=
5218 =?koi8-r?b?eHh4?=
5219 =?koi8-r?b?eCB4?=
5220 =?koi8-r?b?eHh4?=
5221 =?koi8-r?b?IHh4?=
5222 =?koi8-r?b?eHgg?=
5223 =?koi8-r?b?eHh4?=
5224 =?koi8-r?b?eCB4?=
5225 =?koi8-r?b?eHh4?=
5226 =?koi8-r?b?IHh4?=
5227 =?koi8-r?b?eHgg?=
5228 =?koi8-r?b?eHh4?=
5229 =?koi8-r?b?eCB4?=
5230 =?koi8-r?b?eHh4?=
5231 =?koi8-r?b?IHh4?=
5232 =?koi8-r?b?eHgg?=
5233 =?koi8-r?b?eHh4?=
5234 =?koi8-r?b?eCB4?=
5235 =?koi8-r?b?eHh4?=
5236 =?koi8-r?b?IHh4?=
5237 =?koi8-r?b?eHgg?=
5238 =?koi8-r?b?eHh4?=
5239 =?koi8-r?b?eCB4?=
5240 =?koi8-r?b?eHh4?=
5241 =?koi8-r?b?IA==?=""")
5242 eq(x, str(make_header(decode_header(s))))
5243 h = Header(charset='koi8-r', maxlinelen=40)
5244 h.append(x)
5245 s = h.encode()
5246 eq(s, """\
5247=?koi8-r?b?eHh4eCB4eHh4IHh4eHggeHh4?=
5248 =?koi8-r?b?eCB4eHh4IHh4eHggeHh4eCB4?=
5249 =?koi8-r?b?eHh4IHh4eHggeHh4eCB4eHh4?=
5250 =?koi8-r?b?IHh4eHggeHh4eCB4eHh4IHh4?=
5251 =?koi8-r?b?eHggeHh4eCB4eHh4IHh4eHgg?=
5252 =?koi8-r?b?eHh4eCB4eHh4IA==?=""")
5253 eq(x, str(make_header(decode_header(s))))
5254
5255 def test_us_ascii_header(self):
5256 eq = self.assertEqual

Callers

nothing calls this directly

Calls 7

appendMethod · 0.95
encodeMethod · 0.95
HeaderClass · 0.90
make_headerFunction · 0.90
decode_headerFunction · 0.90
eqFunction · 0.85
strFunction · 0.85

Tested by

no test coverage detected