Home | History | Annotate | Download | only in test

Lines Matching refs:typecode

17     def __init__(self, typecode, newarg=None):
18 array.array.__init__(self, typecode)
35 # typecode: the typecode to test
46 # Return a typecode that is different from our own
47 return typecodes[(typecodes.index(self.typecode)+1) % len(typecodes)]
50 a = array.array(self.typecode)
51 self.assertEqual(a.typecode, self.typecode)
53 self.assertRaises(TypeError, array.array, self.typecode, None)
56 a = array.array(self.typecode)
60 a = array.array(self.typecode, self.example)
64 a = array.array(self.typecode, self.example)
74 a = array.array(self.typecode, self.example)
77 b = array.array(self.typecode, self.example)
88 a = array.array(self.typecode, self.example)
95 a = array.array(self.typecode, self.example)
102 a = array.array(self.typecode, self.example)
107 a = ArraySubclass(self.typecode, self.example)
117 a = array.array(self.typecode)
122 a = ArraySubclass(self.typecode)
131 a = array.array(self.typecode, self.example)
139 a = array.array(self.typecode, self.example)
144 self.typecode,
149 a = array.array(self.typecode, self.example)
153 array.array(self.typecode, self.example[:1] + self.example)
156 a = array.array(self.typecode, self.example)
160 array.array(self.typecode, self.example + self.example[:1])
164 a = array.array(self.typecode, 2*self.example)
172 b = array.array(self.typecode)
181 self.assertEqual(b, array.array(self.typecode, self.example))
195 a = array.array(self.typecode)
204 a = array.array(self.typecode, 2*self.example)
209 b = array.array(self.typecode)
212 self.assertEqual(b, array.array(self.typecode, self.example))
223 a = array.array(self.typecode, 2*self.example)
224 b = array.array(self.typecode)
233 a = array.array(self.typecode, 2*self.example)
234 b = array.array(self.typecode)
244 a = array.array(self.typecode, 2*self.example)
247 a = array.array(self.typecode)
248 self.assertEqual(repr(a), "array('%s')" % self.typecode)
251 a = array.array(self.typecode, 2*self.example)
255 a = array.array(self.typecode, self.example)
266 al = array.array(self.typecode, self.smallerexample)
267 ab = array.array(self.typecode, self.biggerexample)
291 a = array.array(self.typecode, self.example) \
292 + array.array(self.typecode, self.example[::-1])
295 array.array(self.typecode, self.example + self.example[::-1])
304 a = array.array(self.typecode, self.example[::-1])
306 a += array.array(self.typecode, 2*self.example)
310 array.array(self.typecode, self.example[::-1]+2*self.example)
312 a = array.array(self.typecode, self.example)
316 array.array(self.typecode, self.example + self.example)
325 a = 5*array.array(self.typecode, self.example)
328 array.array(self.typecode, 5*self.example)
331 a = array.array(self.typecode, self.example)*5
334 array.array(self.typecode, self.example*5)
337 a = 0*array.array(self.typecode, self.example)
340 array.array(self.typecode)
343 a = (-1)*array.array(self.typecode, self.example)
346 array.array(self.typecode)
352 a = array.array(self.typecode, self.example)
359 array.array(self.typecode, 5*self.example)
364 self.assertEqual(a, array.array(self.typecode))
368 self.assertEqual(a, array.array(self.typecode))
372 self.assertEqual(a, array.array(self.typecode))
374 a = array.array(self.typecode, self.example)
376 self.assertEqual(a, array.array(self.typecode))
381 a = array.array(self.typecode, self.example)
393 a = array.array(self.typecode, self.example)
397 a = array.array(self.typecode, self.example)
401 a = array.array(self.typecode, self.example)
405 a = array.array(self.typecode, self.example)
409 a = array.array(self.typecode, self.example)
413 a = array.array(self.typecode, self.example)
432 a = array.array(self.typecode, self.example)
436 array.array(self.typecode, self.example[1:])
439 a = array.array(self.typecode, self.example)
443 array.array(self.typecode, self.example[:-1])
446 a = array.array(self.typecode, self.example)
450 array.array(self.typecode, self.example[:-1])
453 a = array.array(self.typecode, self.example)
457 array.array(self.typecode, self.example[1:])
466 a = array.array(self.typecode, self.example)
471 array.array(self.typecode, self.example[1:])
476 array.array(self.typecode, self.example[:1])
481 array.array(self.typecode, self.example[:-1])
486 array.array(self.typecode, self.example[-1:])
491 array.array(self.typecode)
496 array.array(self.typecode)
501 array.array(self.typecode)
507 array.array(self.typecode)
512 array.array(self.typecode)
518 a = array.array(self.typecode, self.example)
528 a = array.array(self.typecode, self.example)
532 array.array(self.typecode, self.example + self.example[1:])
535 a = array.array(self.typecode, self.example)
539 array.array(self.typecode, self.example + self.example[-1:])
542 a = array.array(self.typecode, self.example)
546 array.array(self.typecode, self.example[:-1] + self.example)
549 a = array.array(self.typecode, self.example)
553 array.array(self.typecode, self.example[:1] + self.example)
556 a = array.array(self.typecode, self.example)
561 self.typecode,
566 a = array.array(self.typecode, self.example)
570 array.array(self.typecode, 2*self.example)
573 a = array.array(self.typecode, self.example)
577 array.array(self.typecode, self.example)
580 a = array.array(self.typecode, self.example)
584 array.array(self.typecode, self.example)
587 a = array.array(self.typecode, self.example)
591 array.array(self.typecode, 2*self.example)
594 a = array.array(self.typecode, self.example)
598 array.array(self.typecode, self.example[:1] + self.example + self.example[1:])
601 a = array.array(self.typecode, self.example)
605 array.array(self.typecode, 2*self.example)
608 a = array.array(self.typecode, self.example)
624 a = array.array(self.typecode, self.example)
631 a[start:stop:step] = array.array(self.typecode, data)
632 self.assertEqual(a, array.array(self.typecode, L))
636 self.assertEqual(a, array.array(self.typecode, L))
640 a = array.array(self.typecode, example)
649 a = array.array(self.typecode, example)
659 a = array.array(self.typecode, example)
663 self.assertEqual(a, array.array(self.typecode, example2))
665 a = array.array(self.typecode, self.example)
671 a = array.array(self.typecode)
674 a = array.array(self.typecode, 2*self.example)
683 array.array(self.typecode, self.example[1:]+self.example)
688 array.array(self.typecode, self.example[1:2]+self.example[3:]+self.example)
694 array.array(self.typecode, self.example[3:]+self.example[:-1])
698 a = array.array(self.typecode, self.example)
703 array.array(self.typecode, self.example[::-1])
707 a = array.array(self.typecode, self.example)
709 a.extend(array.array(self.typecode, self.example[::-1]))
712 array.array(self.typecode, self.example+self.example[::-1])
715 a = array.array(self.typecode, self.example)
719 array.array(self.typecode, self.example+self.example)
725 a = array.array(self.typecode, self.example)
729 array.array(self.typecode, self.example+self.example[::-1])
733 a = array.array(self.typecode, iter(self.example))
734 b = array.array(self.typecode, self.example)
738 self.assertRaises(TypeError, array.array, self.typecode, 10)
744 self.assertRaises(UnicodeError, array.array, self.typecode, A())
750 self.assertRaises(UnicodeError, array.array, self.typecode, B())
757 a = array.array(self.typecode)
763 a = array.array(self.typecode, self.example)
769 s = array.array(self.typecode, self.example)
796 a = array.array(self.typecode, self.example)
800 typecode = 'c'
831 a = array.array(self.typecode, self.example)
839 typecode = 'u'
874 a = array.array(self.typecode, range(5))
876 self.assertEqual(a[::2], array.array(self.typecode, [0,2,4]))
877 self.assertEqual(a[1::2], array.array(self.typecode, [1,3]))
878 self.assertEqual(a[::-1], array.array(self.typecode, [4,3,2,1,0]))
879 self.assertEqual(a[::-2], array.array(self.typecode, [4,2,0]))
880 self.assertEqual(a[3::-2], array.array(self.typecode, [3,1]))
883 self.assertEqual(a[-100L:100L:2L], array.array(self.typecode, [0,2,4]))
884 self.assertEqual(a[1000:2000:2], array.array(self.typecode, []))
885 self.assertEqual(a[-1000:-2000:-2], array.array(self.typecode, []))
888 a = array.array(self.typecode, range(5))
890 self.assertEqual(a, array.array(self.typecode, [1,3]))
891 a = array.array(self.typecode, range(5))
893 self.assertEqual(a, array.array(self.typecode, [0,2,4]))
894 a = array.array(self.typecode, range(5))
896 self.assertEqual(a, array.array(self.typecode, [0,2,3,4]))
897 a = array.array(self.typecode, range(10))
899 self.assertEqual(a, array.array(self.typecode, [1,2,3,4,5,6,7,8,9]))
901 a = array.array(self.typecode, range(10))
905 a = array.array(self.typecode, range(10))
906 a[::2] = array.array(self.typecode, [42]*5)
907 self.assertEqual(a, array.array(self.typecode, [42, 1, 42, 3, 42, 5, 42, 7, 42, 9]))
908 a = array.array(self.typecode, range(10))
909 a[::-4] = array.array(self.typecode, [10]*3)
910 self.assertEqual(a, array.array(self.typecode, [0, 10, 2, 3, 4, 10, 6, 7, 8 ,10]))
911 a = array.array(self.typecode, range(4))
913 self.assertEqual(a, array.array(self.typecode, [3, 2, 1, 0]))
914 a = array.array(self.typecode, range(10))
917 ins = array.array(self.typecode, range(2))
923 a = array.array(self.typecode, range(10))
925 b = array.array(self.typecode, [20])
933 a = array.array(self.typecode, [lower])
936 self.assertRaises(OverflowError, array.array, self.typecode, [lower-1])
939 a = array.array(self.typecode, [upper])
942 self.assertRaises(OverflowError, array.array, self.typecode, [upper+1])
946 typecode = self.typecode
950 def __new__(cls, typecode, data, offset):
951 return array.array.__new__(cls, typecode, data)
953 def __init__(self, typecode, data, offset):
959 a = ExaggeratingArray(self.typecode, [3, 6, 7, 11], 4)
971 a = array.array(self.typecode)
983 a = array.array(self.typecode)
990 a = array.array(self.typecode, self.example)
997 a = array.array(self.typecode)
1003 typecode = 'b'
1008 typecode = 'B'
1013 typecode = 'h'
1018 typecode = 'H'
1023 typecode = 'i'
1028 typecode = 'I'
1033 typecode = 'l'
1038 typecode = 'L'
1052 a = array.array(self.typecode, self.example)
1055 b = array.array(self.typecode, self.example)
1068 typecode = 'f'
1073 typecode = 'd'