• Home
  • Raw
  • Download

Lines Matching refs:assertEqual

77         self.assertEqual(caps[-len(SUBSTR):],
79 self.assertEqual(caps.lstrip(_('-')), SUBSTR)
85 self.assertEqual(len(s), size)
89 self.assertEqual(s[lpadsize:-rpadsize], SUBSTR)
90 self.assertEqual(s.strip(), SUBSTR.strip())
97 self.assertEqual(s.count(_('.')), size)
99 self.assertEqual(s.count(_('.')), size + 1)
100 self.assertEqual(s.count(_(' ')), 3)
101 self.assertEqual(s.count(_('i')), 1)
102 self.assertEqual(s.count(_('j')), 0)
126 self.assertEqual(len(s), size - remainder)
127 self.assertEqual(len(s.strip(_(' '))), 0)
135 self.assertEqual(s.find(_(' ')), 0)
136 self.assertEqual(s.find(SUBSTR), 0)
137 self.assertEqual(s.find(_(' '), sublen), sublen + size)
138 self.assertEqual(s.find(SUBSTR, len(SUBSTR)), sublen + size)
139 self.assertEqual(s.find(_('i')), SUBSTR.find(_('i')))
140 self.assertEqual(s.find(_('i'), sublen),
142 self.assertEqual(s.find(_('i'), size),
144 self.assertEqual(s.find(_('j')), -1)
152 self.assertEqual(s.index(_(' ')), 0)
153 self.assertEqual(s.index(SUBSTR), 0)
154 self.assertEqual(s.index(_(' '), sublen), sublen + size)
155 self.assertEqual(s.index(SUBSTR, sublen), sublen + size)
156 self.assertEqual(s.index(_('i')), SUBSTR.index(_('i')))
157 self.assertEqual(s.index(_('i'), sublen),
159 self.assertEqual(s.index(_('i'), size),
238 self.assertEqual(x.count(_('a')), 5)
239 self.assertEqual(x.count(_('b')), 5)
249 self.assertEqual(len(s), size)
250 self.assertEqual(s.strip(), SUBSTR.strip())
257 self.assertEqual(len(s), size)
258 self.assertEqual(s.count(_('a')), size)
265 self.assertEqual(len(s), size)
266 self.assertEqual(s.lstrip(), SUBSTR.lstrip())
269 self.assertEqual(len(s), size)
281 self.assertEqual(len(s), size)
282 self.assertEqual(s.count(replacement), size)
284 self.assertEqual(len(s), size)
285 self.assertEqual(s.count(replacement), 4)
286 self.assertEqual(s[-10:], _(' aaaa'))
294 self.assertEqual(s.rfind(_(' ')), sublen + size + SUBSTR.rfind(_(' ')))
295 self.assertEqual(s.rfind(SUBSTR), sublen + size)
296 self.assertEqual(s.rfind(_(' '), 0, size), SUBSTR.rfind(_(' ')))
297 self.assertEqual(s.rfind(SUBSTR, 0, sublen + size), 0)
298 self.assertEqual(s.rfind(_('i')), sublen + size + SUBSTR.rfind(_('i')))
299 self.assertEqual(s.rfind(_('i'), 0, sublen), SUBSTR.rfind(_('i')))
300 self.assertEqual(s.rfind(_('i'), 0, sublen + size),
302 self.assertEqual(s.rfind(_('j')), -1)
310 self.assertEqual(s.rindex(_(' ')),
312 self.assertEqual(s.rindex(SUBSTR), sublen + size)
313 self.assertEqual(s.rindex(_(' '), 0, sublen + size - 1),
315 self.assertEqual(s.rindex(SUBSTR, 0, sublen + size), 0)
316 self.assertEqual(s.rindex(_('i')),
318 self.assertEqual(s.rindex(_('i'), 0, sublen), SUBSTR.rindex(_('i')))
319 self.assertEqual(s.rindex(_('i'), 0, sublen + size),
329 self.assertEqual(len(s), size)
330 self.assertEqual(s.strip(), SUBSTR.strip())
337 self.assertEqual(len(s), size)
338 self.assertEqual(s.rstrip(), SUBSTR.rstrip())
341 self.assertEqual(len(s), size)
359 self.assertEqual(len(l), chunksize)
362 self.assertEqual(item, expected)
365 self.assertEqual(len(l), chunksize + 1)
368 self.assertEqual(item, expected)
381 self.assertEqual(len(l), size)
382 self.assertEqual(set(l), set([_('a')]))
385 self.assertEqual(len(l), size + 1)
386 self.assertEqual(set(l), set([_(' ')]))
397 self.assertEqual(len(l), chunksize * 4)
400 self.assertEqual(item, expected)
416 self.assertEqual(len(s), size)
417 self.assertEqual(s.strip(), SUBSTR.strip())
420 self.assertEqual(len(s), size)
421 self.assertEqual(s.strip(), SUBSTR.strip())
430 self.assertEqual(len(s), sublen * repeats)
431 self.assertEqual(s[:sublen * 3], SUBSTR.swapcase() * 3)
432 self.assertEqual(s[-sublen * 3:], SUBSTR.swapcase() * 3)
451 self.assertEqual(len(s), repeats * sublen)
452 self.assertEqual(s[:sublen], SUBSTR.translate(trans))
453 self.assertEqual(s[-sublen:], SUBSTR.translate(trans))
454 self.assertEqual(s.count(_('.')), 0)
455 self.assertEqual(s.count(_('!')), repeats * 2)
456 self.assertEqual(s.count(_('z')), repeats * 3)
463 self.assertEqual(len(s), size)
464 self.assertEqual(s.count(_('A')), size)
473 self.assertEqual(len(s), size)
474 self.assertEqual(s.count(_('0')), size - len(SUBSTR))
482 self.assertEqual(len(s), size)
484 self.assertEqual(len(s), size * 2)
485 self.assertEqual(s.count(_('.')), size * 2)
493 self.assertEqual(len(s), size)
495 self.assertEqual(len(s), size * 2)
496 self.assertEqual(s.count(_('.')), size * 2)
507 self.assertEqual(s[i], SUBSTR[0])
508 self.assertEqual(s[i:i + sublen], SUBSTR)
509 self.assertEqual(s[i:i + sublen:2], SUBSTR[::2])
511 self.assertEqual(s[i + sublen - 1:i - 1:-3],
515 self.assertEqual(s[len(s) - 1], SUBSTR[-1])
516 self.assertEqual(s[-1], SUBSTR[-1])
517 self.assertEqual(s[len(s) - 10], SUBSTR[0])
518 self.assertEqual(s[-sublen], SUBSTR[0])
519 self.assertEqual(s[len(s):], _(''))
520 self.assertEqual(s[len(s) - 1:], SUBSTR[-1:])
521 self.assertEqual(s[-1:], SUBSTR[-1:])
522 self.assertEqual(s[len(s) - sublen:], SUBSTR)
523 self.assertEqual(s[-sublen:], SUBSTR)
524 self.assertEqual(len(s[:]), len(s))
525 self.assertEqual(len(s[:len(s) - 5]), len(s) - 5)
526 self.assertEqual(len(s[5:-5]), len(s) - 10)
585 self.assertEqual(len(s.encode(enc)), expectedsize)
661 self.assertEqual(len(sf), len(s) + 4)
671 self.assertEqual(len(s), size * 2 + 3)
672 self.assertEqual(s.count('.'), 3)
673 self.assertEqual(s.count('-'), size * 2)
679 self.assertEqual(len(s), size + 2)
680 self.assertEqual(s[0], "'")
681 self.assertEqual(s[-1], "'")
682 self.assertEqual(s.count('-'), size)
690 self.assertEqual(len(s), size * 4 + 2)
691 self.assertEqual(s[0], "'")
692 self.assertEqual(s[-1], "'")
693 self.assertEqual(s.count('\\'), size)
694 self.assertEqual(s.count('0'), size * 2)
700 self.assertEqual(len(s), size * 4 + 2)
701 self.assertEqual(s[0], "'")
702 self.assertEqual(s[-1], "'")
703 self.assertEqual(s.count('\\'), size)
704 self.assertEqual(s.count('0'), size * 2)
721 self.assertEqual(len(r), 2 + (len(f(char)) - 2) * size)
734 self.assertEqual(len(r), 2 + (len(f(char)) - 2) * size)
757 self.assertEqual(len(s), repeats * sublen)
758 self.assertEqual(s[:sublen], SUBSTR.translate(trans))
759 self.assertEqual(s[-sublen:], SUBSTR.translate(trans))
760 self.assertEqual(s.count(_('.')), 0)
761 self.assertEqual(s.count(_('!')), repeats * 2)
762 self.assertEqual(s.count(_('z')), repeats * 3)
773 self.assertEqual(len(s.decode('utf-8')), size)
796 self.assertEqual(len(s.decode('utf-8')), size)
843 self.assertEqual(len(t), size)
845 self.assertEqual(len(t), size * 2)
858 self.assertEqual(len(t), size * 5)
874 self.assertEqual(len(t), size)
875 self.assertEqual(t[-1], None)
876 self.assertEqual(t[5], None)
877 self.assertEqual(t[size - 1], None)
879 self.assertEqual(t[:5], (None,) * 5)
880 self.assertEqual(t[-5:], (None,) * 5)
881 self.assertEqual(t[20:25], (None,) * 5)
882 self.assertEqual(t[-25:-20], (None,) * 5)
883 self.assertEqual(t[size - 5:], (None,) * 5)
884 self.assertEqual(t[size - 5:size], (None,) * 5)
885 self.assertEqual(t[size - 6:size - 2], (None,) * 4)
886 self.assertEqual(t[size:size], ())
887 self.assertEqual(t[size:size+5], ())
892 self.assertEqual(len(t), size)
894 self.assertEqual(len(t), size * 2)
915 self.assertEqual(len(t), size)
916 self.assertEqual(t[:10], (42,) * 10)
917 self.assertEqual(t[-10:], (42,) * 10)
926 self.assertEqual(len(t), size)
927 self.assertEqual(t[:10], (42,) * 10)
928 self.assertEqual(t[-10:], (42,) * 10)
935 self.assertEqual(len(s), size * 7)
936 self.assertEqual(s[:10], '(False, Fa')
937 self.assertEqual(s[-10:], 'se, False)')
973 self.assertEqual(len(l), size)
975 self.assertEqual(len(l), size * 2)
990 self.assertEqual(len(l), size * 2)
1005 self.assertEqual(len(l), size * 5)
1018 self.assertEqual(len(l), size)
1019 self.assertEqual(l[-1], None)
1020 self.assertEqual(l[5], None)
1021 self.assertEqual(l[size - 1], None)
1023 self.assertEqual(l[:5], [None] * 5)
1024 self.assertEqual(l[-5:], [None] * 5)
1025 self.assertEqual(l[20:25], [None] * 5)
1026 self.assertEqual(l[-25:-20], [None] * 5)
1027 self.assertEqual(l[size - 5:], [None] * 5)
1028 self.assertEqual(l[size - 5:size], [None] * 5)
1029 self.assertEqual(l[size - 6:size - 2], [None] * 4)
1030 self.assertEqual(l[size:size], [])
1031 self.assertEqual(l[size:size+5], [])
1034 self.assertEqual(len(l), size)
1035 self.assertEqual(l[-3:], [None, 5, None])
1036 self.assertEqual(l.count(5), 1)
1038 self.assertEqual(len(l), size)
1042 self.assertEqual(len(l), size)
1043 self.assertEqual(l[-7:], [None, None, 1, 2, 3, 4, 5])
1047 self.assertEqual(len(l), size)
1048 self.assertEqual(l[:7], [1, 2, 3, 4, 5, None, None])
1052 self.assertEqual(len(l), size)
1053 self.assertEqual(l[-1], 4)
1057 self.assertEqual(len(l), size)
1058 self.assertEqual(l[-1], 2)
1062 self.assertEqual(len(l), size)
1063 self.assertEqual(l[0], 2)
1067 self.assertEqual(len(l), size)
1068 self.assertEqual(l[0], 4)
1075 self.assertEqual(len(l), size)
1077 self.assertEqual(len(l), size * 2)
1092 self.assertEqual(len(l), size)
1098 self.assertEqual(len(l), size * 2)
1113 self.assertEqual(len(s), size * 7)
1114 self.assertEqual(s[:10], '[False, Fa')
1115 self.assertEqual(s[-10:], 'se, False]')
1116 self.assertEqual(s.count('F'), size)
1132 self.assertEqual(len(l), size+1)
1139 self.assertEqual(l.count(1), size)
1140 self.assertEqual(l.count("1"), 0)
1147 self.assertEqual(len(l), size * 2)
1163 self.assertEqual(l.index(1), 0)
1164 self.assertEqual(l.index(5, size - 5), size - 1)
1165 self.assertEqual(l.index(5, size - 5, size), size - 1)
1175 self.assertEqual(len(l), size)
1176 self.assertEqual(l[-3:], [1.0, "A", 1.0])
1180 self.assertEqual(len(l), size)
1181 self.assertEqual(l[-3:], ["A", 1.0, "B"])
1185 self.assertEqual(len(l), size)
1186 self.assertEqual(l[:3], [1.0, "C", 1.0])
1187 self.assertEqual(l[size - 3:], ["A", 1.0, "B"])
1193 self.assertEqual(len(l), size)
1197 self.assertEqual(len(l), size)
1198 self.assertEqual(item, "e")
1199 self.assertEqual(l[-2:], ["c", "d"])
1203 self.assertEqual(len(l), size)
1204 self.assertEqual(item, "a")
1205 self.assertEqual(l[:2], ["b", "c"])
1209 self.assertEqual(len(l), size)
1210 self.assertEqual(item, "c")
1211 self.assertEqual(l[-2:], ["b", "d"])
1216 self.assertEqual(len(l), size)
1220 self.assertEqual(len(l), size)
1226 self.assertEqual(len(l), size)
1227 self.assertEqual(l[-2:], [10, 5])
1230 self.assertEqual(len(l), size)
1231 self.assertEqual(l[-2:], [10, 10])
1237 self.assertEqual(len(l), size * 5)
1238 self.assertEqual(l[-5:], [5, 4, 3, 2, 1])
1239 self.assertEqual(l[:5], [5, 4, 3, 2, 1])
1245 self.assertEqual(len(l), size * 5)
1246 self.assertEqual(l.count(1), size)
1247 self.assertEqual(l[:10], [1] * 10)
1248 self.assertEqual(l[-10:], [5] * 10)