Lines Matching refs:assertEqual
35 self.assertEqual(int(314), 314)
36 self.assertEqual(int(3.14), 3)
38 self.assertEqual(int(-3.14), -3)
39 self.assertEqual(int(3.9), 3)
40 self.assertEqual(int(-3.9), -3)
41 self.assertEqual(int(3.5), 3)
42 self.assertEqual(int(-3.5), -3)
43 self.assertEqual(int("-3"), -3)
44 self.assertEqual(int(" -3 "), -3)
45 self.assertEqual(int("\N{EM SPACE}-3\N{EN SPACE}"), -3)
47 self.assertEqual(int("10",16), 16)
57 self.assertEqual(int(ss), vv)
63 self.assertEqual(x+1, -sys.maxsize)
66 self.assertEqual(int(s[1:]), sys.maxsize+1)
79 self.assertEqual(x >> 1, x//2)
87 self.assertEqual(int('0o123', 0), 83)
88 self.assertEqual(int('0x123', 16), 291)
104 self.assertEqual(int('100000000000000000000000000000000', 2), 4294967296)
105 self.assertEqual(int('102002022201221111211', 3), 4294967296)
106 self.assertEqual(int('10000000000000000', 4), 4294967296)
107 self.assertEqual(int('32244002423141', 5), 4294967296)
108 self.assertEqual(int('1550104015504', 6), 4294967296)
109 self.assertEqual(int('211301422354', 7), 4294967296)
110 self.assertEqual(int('40000000000', 8), 4294967296)
111 self.assertEqual(int('12068657454', 9), 4294967296)
112 self.assertEqual(int('4294967296', 10), 4294967296)
113 self.assertEqual(int('1904440554', 11), 4294967296)
114 self.assertEqual(int('9ba461594', 12), 4294967296)
115 self.assertEqual(int('535a79889', 13), 4294967296)
116 self.assertEqual(int('2ca5b7464', 14), 4294967296)
117 self.assertEqual(int('1a20dcd81', 15), 4294967296)
118 self.assertEqual(int('100000000', 16), 4294967296)
119 self.assertEqual(int('a7ffda91', 17), 4294967296)
120 self.assertEqual(int('704he7g4', 18), 4294967296)
121 self.assertEqual(int('4f5aff66', 19), 4294967296)
122 self.assertEqual(int('3723ai4g', 20), 4294967296)
123 self.assertEqual(int('281d55i4', 21), 4294967296)
124 self.assertEqual(int('1fj8b184', 22), 4294967296)
125 self.assertEqual(int('1606k7ic', 23), 4294967296)
126 self.assertEqual(int('mb994ag', 24), 4294967296)
127 self.assertEqual(int('hek2mgl', 25), 4294967296)
128 self.assertEqual(int('dnchbnm', 26), 4294967296)
129 self.assertEqual(int('b28jpdm', 27), 4294967296)
130 self.assertEqual(int('8pfgih4', 28), 4294967296)
131 self.assertEqual(int('76beigg', 29), 4294967296)
132 self.assertEqual(int('5qmcpqg', 30), 4294967296)
133 self.assertEqual(int('4q0jto4', 31), 4294967296)
134 self.assertEqual(int('4000000', 32), 4294967296)
135 self.assertEqual(int('3aokq94', 33), 4294967296)
136 self.assertEqual(int('2qhxjli', 34), 4294967296)
137 self.assertEqual(int('2br45qb', 35), 4294967296)
138 self.assertEqual(int('1z141z4', 36), 4294967296)
142 self.assertEqual(int(' 0o123 ', 0), 83)
143 self.assertEqual(int(' 0o123 ', 0), 83)
144 self.assertEqual(int('000', 0), 0)
145 self.assertEqual(int('0o123', 0), 83)
146 self.assertEqual(int('0x123', 0), 291)
147 self.assertEqual(int('0b100', 0), 4)
148 self.assertEqual(int(' 0O123 ', 0), 83)
149 self.assertEqual(int(' 0X123 ', 0), 291)
150 self.assertEqual(int(' 0B100 ', 0), 4)
153 self.assertEqual(int('0123'), 123)
154 self.assertEqual(int('0123', 10), 123)
157 self.assertEqual(int('0x123', 16), 291)
158 self.assertEqual(int('0o123', 8), 83)
159 self.assertEqual(int('0b100', 2), 4)
160 self.assertEqual(int('0X123', 16), 291)
161 self.assertEqual(int('0O123', 8), 83)
162 self.assertEqual(int('0B100', 2), 4)
181 self.assertEqual(int('100000000000000000000000000000001', 2), 4294967297)
182 self.assertEqual(int('102002022201221111212', 3), 4294967297)
183 self.assertEqual(int('10000000000000001', 4), 4294967297)
184 self.assertEqual(int('32244002423142', 5), 4294967297)
185 self.assertEqual(int('1550104015505', 6), 4294967297)
186 self.assertEqual(int('211301422355', 7), 4294967297)
187 self.assertEqual(int('40000000001', 8), 4294967297)
188 self.assertEqual(int('12068657455', 9), 4294967297)
189 self.assertEqual(int('4294967297', 10), 4294967297)
190 self.assertEqual(int('1904440555', 11), 4294967297)
191 self.assertEqual(int('9ba461595', 12), 4294967297)
192 self.assertEqual(int('535a7988a', 13), 4294967297)
193 self.assertEqual(int('2ca5b7465', 14), 4294967297)
194 self.assertEqual(int('1a20dcd82', 15), 4294967297)
195 self.assertEqual(int('100000001', 16), 4294967297)
196 self.assertEqual(int('a7ffda92', 17), 4294967297)
197 self.assertEqual(int('704he7g5', 18), 4294967297)
198 self.assertEqual(int('4f5aff67', 19), 4294967297)
199 self.assertEqual(int('3723ai4h', 20), 4294967297)
200 self.assertEqual(int('281d55i5', 21), 4294967297)
201 self.assertEqual(int('1fj8b185', 22), 4294967297)
202 self.assertEqual(int('1606k7id', 23), 4294967297)
203 self.assertEqual(int('mb994ah', 24), 4294967297)
204 self.assertEqual(int('hek2mgm', 25), 4294967297)
205 self.assertEqual(int('dnchbnn', 26), 4294967297)
206 self.assertEqual(int('b28jpdn', 27), 4294967297)
207 self.assertEqual(int('8pfgih5', 28), 4294967297)
208 self.assertEqual(int('76beigh', 29), 4294967297)
209 self.assertEqual(int('5qmcpqh', 30), 4294967297)
210 self.assertEqual(int('4q0jto5', 31), 4294967297)
211 self.assertEqual(int('4000001', 32), 4294967297)
212 self.assertEqual(int('3aokq95', 33), 4294967297)
213 self.assertEqual(int('2qhxjlj', 34), 4294967297)
214 self.assertEqual(int('2br45qc', 35), 4294967297)
215 self.assertEqual(int('1z141z5', 36), 4294967297)
221 self.assertEqual(int(lit, 0), eval(lit))
222 self.assertEqual(int(lit, 0), int(lit.replace('_', ''), 0))
228 self.assertEqual(int("1_00", 3), 9)
229 self.assertEqual(int("0_100"), 100) # not valid as a literal!
230 self.assertEqual(int(b"1_00"), 100) # byte underscore
245 self.assertEqual(int(), 0)
249 self.assertEqual(int('100', base=2), 4)
259 self.assertEqual(int('0', 5), 0)
272 self.assertEqual(int('0', base=base), 0)
294 self.assertEqual(int('101', base=MyIndexable(2)), 5)
295 self.assertEqual(int('101', base=MyIndexable(10)), 101)
296 self.assertEqual(int('101', base=MyIndexable(36)), 1 + 36**2)
323 self.assertEqual(int(x), 100)
325 self.assertEqual(int(x, 2), 4)
334 self.assertEqual(int(memoryview(b'123')[1:3]), 23)
335 self.assertEqual(int(memoryview(b'123\x00')[1:3]), 23)
336 self.assertEqual(int(memoryview(b'123 ')[1:3]), 23)
337 self.assertEqual(int(memoryview(b'123A')[1:3]), 23)
338 self.assertEqual(int(memoryview(b'1234')[1:3]), 23)
357 self.assertEqual(int(Foo0()), 42)
367 self.assertEqual(int(IntOverridesTrunc()), 42)
372 self.assertEqual(int(JustTrunc()), 42)
388 self.assertEqual(int(TruncReturnsNonInt()), 42)
401 self.assertEqual(str(e),
430 self.assertEqual(my_int, 7)
431 self.assertEqual(int(my_int), 42)
455 self.assertEqual(n, 1)
461 self.assertEqual(n, 1)
467 self.assertEqual(n, 1)
472 self.assertEqual(n, 1)
475 self.assertEqual(n, 1)
486 self.assertEqual(cm.exception.args[0],
512 self.assertEqual(int('1_0_1_0_1_0_1_0_1_0_1_0_1_0_1_0_1_0_1_0_1_0_1_0_1_0_1_0_1_0_1', 2),
514 self.assertEqual(int('1_2_3_4_5_6_7_0_1_2_3', 8), 0o12345670123)
515 self.assertEqual(int('1_2_3_4_5_6_7_8_9', 16), 0x123456789)
516 self.assertEqual(int('1_2_3_4_5_6_7', 32), 1144132807)