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

Method test_base64_splittable

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

Source from the content-addressed store, hash-verified

5269 eq(x, str(make_header(decode_header(s))))
5270
5271 def test_base64_splittable(self):
5272 eq = self.ndiffAssertEqual
5273 h = Header(charset='koi8-r', maxlinelen=20)
5274 x = 'xxxx ' * 20
5275 h.append(x)
5276 s = h.encode()
5277 eq(s, """\
5278=?koi8-r?b?eHh4?=
5279 =?koi8-r?b?eCB4?=
5280 =?koi8-r?b?eHh4?=
5281 =?koi8-r?b?IHh4?=
5282 =?koi8-r?b?eHgg?=
5283 =?koi8-r?b?eHh4?=
5284 =?koi8-r?b?eCB4?=
5285 =?koi8-r?b?eHh4?=
5286 =?koi8-r?b?IHh4?=
5287 =?koi8-r?b?eHgg?=
5288 =?koi8-r?b?eHh4?=
5289 =?koi8-r?b?eCB4?=
5290 =?koi8-r?b?eHh4?=
5291 =?koi8-r?b?IHh4?=
5292 =?koi8-r?b?eHgg?=
5293 =?koi8-r?b?eHh4?=
5294 =?koi8-r?b?eCB4?=
5295 =?koi8-r?b?eHh4?=
5296 =?koi8-r?b?IHh4?=
5297 =?koi8-r?b?eHgg?=
5298 =?koi8-r?b?eHh4?=
5299 =?koi8-r?b?eCB4?=
5300 =?koi8-r?b?eHh4?=
5301 =?koi8-r?b?IHh4?=
5302 =?koi8-r?b?eHgg?=
5303 =?koi8-r?b?eHh4?=
5304 =?koi8-r?b?eCB4?=
5305 =?koi8-r?b?eHh4?=
5306 =?koi8-r?b?IHh4?=
5307 =?koi8-r?b?eHgg?=
5308 =?koi8-r?b?eHh4?=
5309 =?koi8-r?b?eCB4?=
5310 =?koi8-r?b?eHh4?=
5311 =?koi8-r?b?IA==?=""")
5312 eq(x, str(make_header(decode_header(s))))
5313 h = Header(charset='koi8-r', maxlinelen=40)
5314 h.append(x)
5315 s = h.encode()
5316 eq(s, """\
5317=?koi8-r?b?eHh4eCB4eHh4IHh4eHggeHh4?=
5318 =?koi8-r?b?eCB4eHh4IHh4eHggeHh4eCB4?=
5319 =?koi8-r?b?eHh4IHh4eHggeHh4eCB4eHh4?=
5320 =?koi8-r?b?IHh4eHggeHh4eCB4eHh4IHh4?=
5321 =?koi8-r?b?eHggeHh4eCB4eHh4IHh4eHgg?=
5322 =?koi8-r?b?eHh4eCB4eHh4IA==?=""")
5323 eq(x, str(make_header(decode_header(s))))
5324
5325 def test_us_ascii_header(self):
5326 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
strFunction · 0.85
eqFunction · 0.50

Tested by

no test coverage detected