Lines Matching refs:assertEqual
134 self.assertEqual(99, getargs_b(Long()))
135 self.assertEqual(99, getargs_b(Int()))
138 self.assertEqual(0, getargs_b(0))
139 self.assertEqual(UCHAR_MAX, getargs_b(UCHAR_MAX))
142 self.assertEqual(42, getargs_b(42))
143 self.assertEqual(42, getargs_b(42L))
150 self.assertEqual(99, getargs_B(Long()))
151 self.assertEqual(99, getargs_B(Int()))
153 self.assertEqual(UCHAR_MAX, getargs_B(-1))
154 self.assertEqual(UCHAR_MAX, getargs_B(-1L))
155 self.assertEqual(0, getargs_B(0))
156 self.assertEqual(UCHAR_MAX, getargs_B(UCHAR_MAX))
157 self.assertEqual(0, getargs_B(UCHAR_MAX+1))
159 self.assertEqual(42, getargs_B(42))
160 self.assertEqual(42, getargs_B(42L))
161 self.assertEqual(UCHAR_MAX & VERY_LARGE, getargs_B(VERY_LARGE))
167 self.assertEqual(99, getargs_H(Long()))
168 self.assertEqual(99, getargs_H(Int()))
170 self.assertEqual(USHRT_MAX, getargs_H(-1))
171 self.assertEqual(0, getargs_H(0))
172 self.assertEqual(USHRT_MAX, getargs_H(USHRT_MAX))
173 self.assertEqual(0, getargs_H(USHRT_MAX+1))
175 self.assertEqual(42, getargs_H(42))
176 self.assertEqual(42, getargs_H(42L))
178 self.assertEqual(VERY_LARGE & USHRT_MAX, getargs_H(VERY_LARGE))
184 self.assertEqual(99, getargs_I(Long()))
185 self.assertEqual(99, getargs_I(Int()))
187 self.assertEqual(UINT_MAX, getargs_I(-1))
188 self.assertEqual(0, getargs_I(0))
189 self.assertEqual(UINT_MAX, getargs_I(UINT_MAX))
190 self.assertEqual(0, getargs_I(UINT_MAX+1))
192 self.assertEqual(42, getargs_I(42))
193 self.assertEqual(42, getargs_I(42L))
195 self.assertEqual(VERY_LARGE & UINT_MAX, getargs_I(VERY_LARGE))
205 self.assertEqual(ULONG_MAX, getargs_k(-1))
206 self.assertEqual(0, getargs_k(0))
207 self.assertEqual(ULONG_MAX, getargs_k(ULONG_MAX))
208 self.assertEqual(0, getargs_k(ULONG_MAX+1))
210 self.assertEqual(42, getargs_k(42))
211 self.assertEqual(42, getargs_k(42L))
213 self.assertEqual(VERY_LARGE & ULONG_MAX, getargs_k(VERY_LARGE))
220 self.assertEqual(99, getargs_h(Long()))
221 self.assertEqual(99, getargs_h(Int()))
224 self.assertEqual(SHRT_MIN, getargs_h(SHRT_MIN))
225 self.assertEqual(SHRT_MAX, getargs_h(SHRT_MAX))
228 self.assertEqual(42, getargs_h(42))
229 self.assertEqual(42, getargs_h(42L))
236 self.assertEqual(99, getargs_i(Long()))
237 self.assertEqual(99, getargs_i(Int()))
240 self.assertEqual(INT_MIN, getargs_i(INT_MIN))
241 self.assertEqual(INT_MAX, getargs_i(INT_MAX))
244 self.assertEqual(42, getargs_i(42))
245 self.assertEqual(42, getargs_i(42L))
252 self.assertEqual(99, getargs_l(Long()))
253 self.assertEqual(99, getargs_l(Int()))
256 self.assertEqual(LONG_MIN, getargs_l(LONG_MIN))
257 self.assertEqual(LONG_MAX, getargs_l(LONG_MAX))
260 self.assertEqual(42, getargs_l(42))
261 self.assertEqual(42, getargs_l(42L))
269 self.assertEqual(99, getargs_n(Long()))
270 self.assertEqual(99, getargs_n(Int()))
273 self.assertEqual(PY_SSIZE_T_MIN, getargs_n(PY_SSIZE_T_MIN))
274 self.assertEqual(PY_SSIZE_T_MAX, getargs_n(PY_SSIZE_T_MAX))
277 self.assertEqual(42, getargs_n(42))
278 self.assertEqual(42, getargs_n(42L))
294 self.assertEqual(3, getargs_L(3.14))
304 self.assertEqual(99, getargs_L(Long()))
305 self.assertEqual(99, getargs_L(Int()))
308 self.assertEqual(LLONG_MIN, getargs_L(LLONG_MIN))
309 self.assertEqual(LLONG_MAX, getargs_L(LLONG_MAX))
312 self.assertEqual(42, getargs_L(42))
313 self.assertEqual(42, getargs_L(42L))
322 self.assertEqual(ULLONG_MAX, getargs_K(ULLONG_MAX))
323 self.assertEqual(0, getargs_K(0))
324 self.assertEqual(0, getargs_K(ULLONG_MAX+1))
326 self.assertEqual(42, getargs_K(42))
327 self.assertEqual(42, getargs_K(42L))
329 self.assertEqual(VERY_LARGE & ULLONG_MAX, getargs_K(VERY_LARGE))
334 self.assertEqual(actual, expected)
335 self.assertEqual(math.copysign(1, actual), math.copysign(1, expected))
339 self.assertEqual(getargs_f(4.25), 4.25)
340 self.assertEqual(getargs_f(4), 4.0)
342 self.assertEqual(getargs_f(Float()), 4.25)
343 self.assertEqual(getargs_f(FloatSubclass(7.5)), 7.5)
344 self.assertEqual(getargs_f(FloatSubclass2(7.5)), 7.5)
346 self.assertEqual(getargs_f(BadFloat2()), 4.25)
347 self.assertEqual(getargs_f(BadFloat3(7.5)), 7.5)
350 self.assertEqual(getargs_f(x), x)
352 self.assertEqual(getargs_f(DBL_MAX), INF)
353 self.assertEqual(getargs_f(-DBL_MAX), -INF)
364 self.assertEqual(getargs_d(4.25), 4.25)
365 self.assertEqual(getargs_d(4), 4.0)
367 self.assertEqual(getargs_d(Float()), 4.25)
368 self.assertEqual(getargs_d(FloatSubclass(7.5)), 7.5)
369 self.assertEqual(getargs_d(FloatSubclass2(7.5)), 7.5)
371 self.assertEqual(getargs_d(BadFloat2()), 4.25)
372 self.assertEqual(getargs_d(BadFloat3(7.5)), 7.5)
375 self.assertEqual(getargs_d(x), x)
385 self.assertEqual(getargs_D(4.25+0.5j), 4.25+0.5j)
386 self.assertEqual(getargs_D(4.25), 4.25+0j)
387 self.assertEqual(getargs_D(4), 4.0+0j)
388 self.assertEqual(getargs_D(Complex()), 4.25+0.5j)
389 self.assertEqual(getargs_D(ComplexSubclass(7.5+0.25j)), 7.5+0.25j)
390 self.assertEqual(getargs_D(ComplexSubclass2(7.5+0.25j)), 7.5+0.25j)
392 self.assertEqual(getargs_D(BadComplex2()), 4.25+0.5j)
393 self.assertEqual(getargs_D(BadComplex3(7.5+0.25j)), 7.5+0.25j)
397 self.assertEqual(getargs_D(c), c)
399 self.assertEqual(getargs_D(c), c)
411 self.assertEqual(ret, (1, 2))
415 self.assertEqual(ret, (1, 2, 3))
419 self.assertEqual(ret, (1, 2))
423 self.assertEqual(ret, (1, 2))
438 self.assertEqual(ret, (1,2,3))
453 self.assertEqual(ret, {'a': 1, 'b': 2})
457 self.assertEqual(ret, {'a': 1, 'b': 2, 'c': 3})
461 self.assertEqual(ret, {'a': 1, 'b': 2})
474 self.assertEqual(
480 self.assertEqual(
486 self.assertEqual(
492 self.assertEqual(
501 self.assertEqual(str(err), "Required argument 'arg2' (pos 2) not found")
508 self.assertEqual(str(err), "function takes at most 5 arguments (6 given)")
516 self.assertEqual(str(err), "'arg666' is an invalid keyword argument for this function")
525 self.assertEqual(getargs_c('a'), 97)
570 self.assertEqual(getargs_w_star(buf), '[ytearra]')
571 self.assertEqual(buf, bytearray('[ytearra]'))
573 self.assertEqual(getargs_w_star(memoryview(buf)), '[emoryvie]')
574 self.assertEqual(buf, bytearray('[emoryvie]'))
585 self.assertEqual(getargs_s('abc\xe9'), 'abc\xe9')
586 self.assertEqual(getargs_s(u'abc'), 'abc')
597 self.assertEqual(getargs_s_star('abc\xe9'), 'abc\xe9')
598 self.assertEqual(getargs_s_star(u'abc'), 'abc')
599 self.assertEqual(getargs_s_star('nul:\0'), 'nul:\0')
600 self.assertEqual(getargs_s_star(u'nul:\0'), 'nul:\0')
601 self.assertEqual(getargs_s_star(bytearray('abc\xe9')), 'abc\xe9')
602 self.assertEqual(getargs_s_star(memoryview('abc\xe9')), 'abc\xe9')
604 self.assertEqual(getargs_s_star(buffer('abc\xe9')), 'abc\xe9')
605 self.assertEqual(getargs_s_star(buffer(u'abc\xe9')),
611 self.assertEqual(getargs_s_hash('abc\xe9'), 'abc\xe9')
612 self.assertEqual(getargs_s_hash(u'abc'), 'abc')
613 self.assertEqual(getargs_s_hash('nul:\0'), 'nul:\0')
614 self.assertEqual(getargs_s_hash(u'nul:\0'), 'nul:\0')
618 self.assertEqual(getargs_s_hash(buffer('abc\xe9')), 'abc\xe9')
619 self.assertEqual(getargs_s_hash(buffer(u'abc\xe9')),
625 self.assertEqual(getargs_t_hash('abc\xe9'), 'abc\xe9')
626 self.assertEqual(getargs_t_hash(u'abc'), 'abc')
627 self.assertEqual(getargs_t_hash('nul:\0'), 'nul:\0')
628 self.assertEqual(getargs_t_hash(u'nul:\0'), 'nul:\0')
632 self.assertEqual(getargs_t_hash(buffer('abc\xe9')), 'abc\xe9')
633 self.assertEqual(getargs_t_hash(buffer(u'abc')), 'abc')
638 self.assertEqual(getargs_z('abc\xe9'), 'abc\xe9')
639 self.assertEqual(getargs_z(u'abc'), 'abc')
650 self.assertEqual(getargs_z_star('abc\xe9'), 'abc\xe9')
651 self.assertEqual(getargs_z_star(u'abc'), 'abc')
652 self.assertEqual(getargs_z_star('nul:\0'), 'nul:\0')
653 self.assertEqual(getargs_z_star(u'nul:\0'), 'nul:\0')
654 self.assertEqual(getargs_z_star(bytearray('abc\xe9')), 'abc\xe9')
655 self.assertEqual(getargs_z_star(memoryview('abc\xe9')), 'abc\xe9')
657 self.assertEqual(getargs_z_star(buffer('abc\xe9')), 'abc\xe9')
658 self.assertEqual(getargs_z_star(buffer(u'abc\xe9')),
664 self.assertEqual(getargs_z_hash('abc\xe9'), 'abc\xe9')
665 self.assertEqual(getargs_z_hash(u'abc'), 'abc')
666 self.assertEqual(getargs_z_hash('nul:\0'), 'nul:\0')
667 self.assertEqual(getargs_z_hash(u'nul:\0'), 'nul:\0')
671 self.assertEqual(getargs_z_hash(buffer('abc\xe9')), 'abc\xe9')
672 self.assertEqual(getargs_z_hash(buffer(u'abc\xe9')),
681 self.assertEqual(getargs_es('abc'), 'abc')
682 self.assertEqual(getargs_es(u'abc'), 'abc')
683 self.assertEqual(getargs_es('abc', 'ascii'), 'abc')
684 self.assertEqual(getargs_es(u'abc\xe9', 'latin1'), 'abc\xe9')
692 self.assertEqual(getargs_es(buffer('abc'), 'ascii'), 'abc')
693 self.assertEqual(getargs_es(buffer(u'abc'), 'ascii'), 'abc')
700 self.assertEqual(getargs_et('abc\xe9'), 'abc\xe9')
701 self.assertEqual(getargs_et(u'abc'), 'abc')
702 self.assertEqual(getargs_et('abc', 'ascii'), 'abc')
703 self.assertEqual(getargs_et('abc\xe9', 'ascii'), 'abc\xe9')
704 self.assertEqual(getargs_et(u'abc\xe9', 'latin1'), 'abc\xe9')
712 self.assertEqual(getargs_et(buffer('abc'), 'ascii'), 'abc')
713 self.assertEqual(getargs_et(buffer(u'abc'), 'ascii'), 'abc')
720 self.assertEqual(getargs_es_hash('abc'), 'abc')
721 self.assertEqual(getargs_es_hash(u'abc'), 'abc')
722 self.assertEqual(getargs_es_hash(u'abc\xe9', 'latin1'), 'abc\xe9')
730 self.assertEqual(getargs_es_hash(buffer('abc'), 'ascii'), 'abc')
731 self.assertEqual(getargs_es_hash(buffer(u'abc'), 'ascii'), 'abc')
733 self.assertEqual(getargs_es_hash('nul:\0', 'latin1'), 'nul:\0')
734 self.assertEqual(getargs_es_hash(u'nul:\0', 'latin1'), 'nul:\0')
737 self.assertEqual(getargs_es_hash(u'abc\xe9', 'latin1', buf), 'abc\xe9')
738 self.assertEqual(buf, bytearray('abc\xe9\x00xxx'))
740 self.assertEqual(getargs_es_hash(u'abc\xe9', 'latin1', buf), 'abc\xe9')
741 self.assertEqual(buf, bytearray('abc\xe9\x00'))
744 self.assertEqual(buf, bytearray('x'*4))
750 self.assertEqual(getargs_et_hash('abc\xe9'), 'abc\xe9')
751 self.assertEqual(getargs_et_hash(u'abc'), 'abc')
752 self.assertEqual(getargs_et_hash('abc\xe9', 'ascii'), 'abc\xe9')
753 self.assertEqual(getargs_et_hash(u'abc\xe9', 'latin1'), 'abc\xe9')
762 self.assertEqual(getargs_et_hash(buffer('abc'), 'ascii'), 'abc')
763 self.assertEqual(getargs_et_hash(buffer(u'abc'), 'ascii'), 'abc')
765 self.assertEqual(getargs_et_hash('nul:\0', 'latin1'), 'nul:\0')
766 self.assertEqual(getargs_et_hash(u'nul:\0', 'latin1'), 'nul:\0')
769 self.assertEqual(getargs_et_hash(u'abc\xe9', 'latin1', buf), 'abc\xe9')
770 self.assertEqual(buf, bytearray('abc\xe9\x00xxx'))
772 self.assertEqual(getargs_et_hash(u'abc\xe9', 'latin1', buf), 'abc\xe9')
773 self.assertEqual(buf, bytearray('abc\xe9\x00'))
776 self.assertEqual(buf, bytearray('x'*4))
782 self.assertEqual(getargs_u(u'abc\xe9'), u'abc\xe9')
793 self.assertEqual(getargs_u_hash(u'abc\xe9'), u'abc\xe9')
794 self.assertEqual(getargs_u_hash(u'nul:\0'), u'nul:\0')