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

Method test_chunkcoding

Lib/test/multibytecodec_support.py:36–48  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

34 self.incrementaldecoder = self.codec.incrementaldecoder
35
36 def test_chunkcoding(self):
37 tstring_lines = []
38 for b in self.tstring:
39 lines = b.split(b"\n")
40 last = lines.pop()
41 assert last == b""
42 lines = [line + b"\n" for line in lines]
43 tstring_lines.append(lines)
44 for native, utf8 in zip(*tstring_lines):
45 u = self.decode(native)[0]
46 self.assertEqual(u, utf8.decode('utf-8'))
47 if self.roundtriptest:
48 self.assertEqual(native, self.encode(u)[0])
49
50 def test_errorhandle(self):
51 for source, scheme, expected in self.codectests:

Callers

nothing calls this directly

Calls 6

splitMethod · 0.45
popMethod · 0.45
appendMethod · 0.45
decodeMethod · 0.45
assertEqualMethod · 0.45
encodeMethod · 0.45

Tested by

no test coverage detected