• Home
  • Raw
  • Download

Lines Matching +full:- +full:eq

9         eq = self.assertEqual
10 eq(base64.encodestring("www.python.org"), "d3d3LnB5dGhvbi5vcmc=\n")
11 eq(base64.encodestring("a"), "YQ==\n")
12 eq(base64.encodestring("ab"), "YWI=\n")
13 eq(base64.encodestring("abc"), "YWJj\n")
14 eq(base64.encodestring(""), "")
15 eq(base64.encodestring("abcdefghijklmnopqrstuvwxyz"
21 # Non-bytes
22 eq(base64.encodestring(bytearray('abc')), 'YWJj\n')
25 eq = self.assertEqual
26 eq(base64.decodestring("d3d3LnB5dGhvbi5vcmc=\n"), "www.python.org")
27 eq(base64.decodestring("YQ==\n"), "a")
28 eq(base64.decodestring("YWI=\n"), "ab")
29 eq(base64.decodestring("YWJj\n"), "abc")
30 eq(base64.decodestring("YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXpBQkNE"
36 eq(base64.decodestring(''), '')
37 # Non-bytes
38 eq(base64.decodestring(bytearray("YWJj\n")), "abc")
41 eq = self.assertEqual
48 eq(outfp.getvalue(),
64 eq = self.assertEqual
66 eq(base64.b64encode("www.python.org"), "d3d3LnB5dGhvbi5vcmc=")
67 eq(base64.b64encode('\x00'), 'AA==')
68 eq(base64.b64encode("a"), "YQ==")
69 eq(base64.b64encode("ab"), "YWI=")
70 eq(base64.b64encode("abc"), "YWJj")
71 eq(base64.b64encode(""), "")
72 eq(base64.b64encode("abcdefghijklmnopqrstuvwxyz"
79 eq(base64.b64encode('\xd3V\xbeo\xf7\x1d', altchars='*$'), '01a*b$cd')
80 # Non-bytes
81 eq(base64.b64encode(bytearray('abcd')), 'YWJjZA==')
85 eq(base64.standard_b64encode("www.python.org"), "d3d3LnB5dGhvbi5vcmc=")
86 eq(base64.standard_b64encode("a"), "YQ==")
87 eq(base64.standard_b64encode("ab"), "YWI=")
88 eq(base64.standard_b64encode("abc"), "YWJj")
89 eq(base64.standard_b64encode(""), "")
90 eq(base64.standard_b64encode("abcdefghijklmnopqrstuvwxyz"
96 # Non-bytes
97 eq(base64.standard_b64encode(bytearray('abcd')), 'YWJjZA==')
99 eq(base64.urlsafe_b64encode('\xd3V\xbeo\xf7\x1d'), '01a-b_cd')
100 # Non-bytes
101 eq(base64.urlsafe_b64encode(bytearray('\xd3V\xbeo\xf7\x1d')), '01a-b_cd')
104 eq = self.assertEqual
105 eq(base64.b64decode("d3d3LnB5dGhvbi5vcmc="), "www.python.org")
106 eq(base64.b64decode('AA=='), '\x00')
107 eq(base64.b64decode("YQ=="), "a")
108 eq(base64.b64decode("YWI="), "ab")
109 eq(base64.b64decode("YWJj"), "abc")
110 eq(base64.b64decode("YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXpBQkNE"
116 eq(base64.b64decode(''), '')
118 eq(base64.b64decode('01a*b$cd', altchars='*$'), '\xd3V\xbeo\xf7\x1d')
119 # Non-bytes
120 eq(base64.b64decode(bytearray("YWJj")), "abc")
122 eq(base64.standard_b64decode("d3d3LnB5dGhvbi5vcmc="), "www.python.org")
123 eq(base64.standard_b64decode("YQ=="), "a")
124 eq(base64.standard_b64decode("YWI="), "ab")
125 eq(base64.standard_b64decode("YWJj"), "abc")
126 eq(base64.standard_b64decode(""), "")
127 eq(base64.standard_b64decode("YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXpBQkNE"
133 # Non-bytes
134 eq(base64.standard_b64decode(bytearray("YWJj")), "abc")
136 eq(base64.urlsafe_b64decode('01a-b_cd'), '\xd3V\xbeo\xf7\x1d')
137 # Non-bytes
138 eq(base64.urlsafe_b64decode(bytearray('01a-b_cd')), '\xd3V\xbeo\xf7\x1d')
162 self.assertEqual(base64.urlsafe_b64decode(b'++--//__'), res)
165 eq = self.assertEqual
166 eq(base64.b32encode(''), '')
167 eq(base64.b32encode('\x00'), 'AA======')
168 eq(base64.b32encode('a'), 'ME======')
169 eq(base64.b32encode('ab'), 'MFRA====')
170 eq(base64.b32encode('abc'), 'MFRGG===')
171 eq(base64.b32encode('abcd'), 'MFRGGZA=')
172 eq(base64.b32encode('abcde'), 'MFRGGZDF')
173 # Non-bytes
174 eq(base64.b32encode(bytearray('abcd')), 'MFRGGZA=')
177 eq = self.assertEqual
178 eq(base64.b32decode(''), '')
179 eq(base64.b32decode('AA======'), '\x00')
180 eq(base64.b32decode('ME======'), 'a')
181 eq(base64.b32decode('MFRA===='), 'ab')
182 eq(base64.b32decode('MFRGG==='), 'abc')
183 eq(base64.b32decode('MFRGGZA='), 'abcd')
184 eq(base64.b32decode('MFRGGZDF'), 'abcde')
185 # Non-bytes
189 eq = self.assertEqual
190 eq(base64.b32decode('', True), '')
191 eq(base64.b32decode('ME======', True), 'a')
192 eq(base64.b32decode('MFRA====', True), 'ab')
193 eq(base64.b32decode('MFRGG===', True), 'abc')
194 eq(base64.b32decode('MFRGGZA=', True), 'abcd')
195 eq(base64.b32decode('MFRGGZDF', True), 'abcde')
197 eq(base64.b32decode('me======', True), 'a')
198 eq(base64.b32decode('mfra====', True), 'ab')
199 eq(base64.b32decode('mfrgg===', True), 'abc')
200 eq(base64.b32decode('mfrggza=', True), 'abcd')
201 eq(base64.b32decode('mfrggzdf', True), 'abcde')
205 eq(base64.b32decode('MLO23456'), 'b\xdd\xad\xf3\xbe')
206 eq(base64.b32decode('M1023456', map01='L'), 'b\xdd\xad\xf3\xbe')
207 eq(base64.b32decode('M1023456', map01='I'), 'b\x1d\xad\xf3\xbe')
214 eq = self.assertEqual
215 eq(base64.b16encode('\x01\x02\xab\xcd\xef'), '0102ABCDEF')
216 eq(base64.b16encode('\x00'), '00')
217 # Non-bytes
218 eq(base64.b16encode(bytearray('\x01\x02\xab\xcd\xef')), '0102ABCDEF')
221 eq = self.assertEqual
222 eq(base64.b16decode('0102ABCDEF'), '\x01\x02\xab\xcd\xef')
223 eq(base64.b16decode('00'), '\x00')
227 eq(base64.b16decode('0102abcdef', True), '\x01\x02\xab\xcd\xef')
228 # Non-bytes
229 eq(base64.b16decode(bytearray("0102ABCDEF")), '\x01\x02\xab\xcd\xef')
230 # Non-alphabet characters