MCPcopy Create free account
hub / github.com/python/cpython / test_base32_wrapcol

Method test_base32_wrapcol

Lib/test/test_binascii.py:974–982  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

972 self.assertEqual(b2a_base32(t(b'abcde'), padded=False), b'MFRGGZDF')
973
974 def test_base32_wrapcol(self):
975 self._common_test_wrapcol(binascii.b2a_base32)
976 b = self.type2test(b'www.python.org')
977 self.assertEqual(binascii.b2a_base32(b, wrapcol=16),
978 b'O53XOLTQPF2GQ33O\nFZXXEZY=')
979 self.assertEqual(binascii.b2a_base32(b, wrapcol=23),
980 b'O53XOLTQPF2GQ33O\nFZXXEZY=')
981 self.assertEqual(binascii.b2a_base32(b, wrapcol=1),
982 b'O53XOLTQ\nPF2GQ33O\nFZXXEZY=')
983
984 def test_base32_ignorechars(self):
985 a2b_base32 = binascii.a2b_base32

Callers

nothing calls this directly

Calls 3

_common_test_wrapcolMethod · 0.95
type2testMethod · 0.80
assertEqualMethod · 0.45

Tested by

no test coverage detected