• Home
  • Raw
  • Download

Lines Matching refs:checkraises

71     def checkraises(self, exc, obj, methodname, *args):  member in CommonTest
100 self.checkraises(TypeError, 'hello', 'capitalize', 42)
132 self.checkraises(TypeError, 'hello', 'count')
133 self.checkraises(TypeError, 'hello', 'count', 42)
178 self.checkraises(TypeError, 'hello', 'find')
179 self.checkraises(TypeError, 'hello', 'find', 42)
233 self.checkraises(TypeError, 'hello', 'rfind')
234 self.checkraises(TypeError, 'hello', 'rfind', 42)
269 self.checkraises(ValueError, 'abcdefghiabc', 'index', 'hib')
270 self.checkraises(ValueError, 'abcdefghiab', 'index', 'abc', 1)
271 self.checkraises(ValueError, 'abcdefghi', 'index', 'ghi', 8)
272 self.checkraises(ValueError, 'abcdefghi', 'index', 'ghi', -1)
277 self.checkraises(ValueError, 'rrarrrrrrrrra', 'index', 'a', 4, 6)
281 self.checkraises(TypeError, 'hello', 'index')
282 self.checkraises(TypeError, 'hello', 'index', 42)
290 self.checkraises(ValueError, 'abcdefghiabc', 'rindex', 'hib')
291 self.checkraises(ValueError, 'defghiabc', 'rindex', 'def', 1)
292 self.checkraises(ValueError, 'defghiabc', 'rindex', 'abc', 0, -1)
293 self.checkraises(ValueError, 'abcdefghi', 'rindex', 'ghi', 0, 8)
294 self.checkraises(ValueError, 'abcdefghi', 'rindex', 'ghi', 0, -1)
299 self.checkraises(ValueError, 'rrarrrrrrrrra', 'rindex', 'a', 4, 6)
303 self.checkraises(TypeError, 'hello', 'rindex')
304 self.checkraises(TypeError, 'hello', 'rindex', 42)
309 self.checkraises(TypeError, 'hello', 'lower', 42)
314 self.checkraises(TypeError, 'hello', 'upper', 42)
326 self.checkraises(TypeError, 'hello', 'expandtabs', 42, 42)
329 self.checkraises(OverflowError,
425 self.checkraises(TypeError, 'hello', 'split', 42, 42, 42)
428 self.checkraises(ValueError, 'hello', 'split', '')
429 self.checkraises(ValueError, 'hello', 'split', '', 0)
528 self.checkraises(TypeError, 'hello', 'rsplit', 42, 42, 42)
531 self.checkraises(ValueError, 'hello', 'rsplit', '')
532 self.checkraises(ValueError, 'hello', 'rsplit', '', 0)
574 self.checkraises(TypeError, 'hello', 'strip', 42, 42)
575 self.checkraises(TypeError, 'hello', 'lstrip', 42, 42)
576 self.checkraises(TypeError, 'hello', 'rstrip', 42, 42)
588 self.checkraises(TypeError, 'abc', 'ljust')
600 self.checkraises(TypeError, 'abc', 'rjust')
613 self.checkraises(TypeError, 'abc', 'center')
618 self.checkraises(TypeError, 'hello', 'swapcase', 42)
796 self.checkraises(TypeError, 'hello', 'replace')
797 self.checkraises(TypeError, 'hello', 'replace', 42)
798 self.checkraises(TypeError, 'hello', 'replace', 42, 'h')
799 self.checkraises(TypeError, 'hello', 'replace', 'h', 42)
806 self.checkraises(OverflowError, A2_16, "replace", "", A2_16)
807 self.checkraises(OverflowError, A2_16, "replace", "A", A2_16)
808 self.checkraises(OverflowError, A2_16, "replace", "AA", A2_16+A2_16)
824 self.checkraises(TypeError, '123', 'zfill')
839 self.checkraises(TypeError, 'abc', 'islower', 42)
849 self.checkraises(TypeError, 'abc', 'isupper', 42)
863 self.checkraises(TypeError, 'abc', 'istitle', 42)
874 self.checkraises(TypeError, 'abc', 'isspace', 42)
884 self.checkraises(TypeError, 'abc', 'isalpha', 42)
895 self.checkraises(TypeError, 'abc', 'isalnum', 42)
904 self.checkraises(TypeError, 'abc', 'isdigit', 42)
913 self.checkraises(TypeError, 'hello', 'title', 42)
924 self.checkraises(TypeError, 'abc', 'splitlines', 42, 42)
959 self.checkraises(TypeError, 'hello', 'startswith')
960 self.checkraises(TypeError, 'hello', 'startswith', 42)
975 self.checkraises(TypeError, 'hello', 'startswith', (42,))
1008 self.checkraises(TypeError, 'hello', 'endswith')
1009 self.checkraises(TypeError, 'hello', 'endswith', 42)
1024 self.checkraises(TypeError, 'hello', 'endswith', (42,))
1046 self.checkraises(TypeError, 'abc', '__getitem__', 'def')
1059 self.checkraises(TypeError, 'abc', '__getslice__', 'def')
1078 self.checkraises(TypeError, 'abc', '__mul__')
1079 self.checkraises(TypeError, 'abc', '__mul__', '')
1101 self.checkraises(TypeError, '.', 'join', ['a', unicode('b'), 3])
1108 self.checkraises(TypeError, ' ', 'join', BadSeq1())
1111 self.checkraises(TypeError, ' ', 'join')
1112 self.checkraises(TypeError, ' ', 'join', None)
1113 self.checkraises(TypeError, ' ', 'join', 7)
1114 self.checkraises(TypeError, ' ', 'join', Sequence([7, 'hello', 123L]))
1137 self.checkraises((ValueError, OverflowError), '%c', '__mod__', ordinal)
1150 self.checkraises(TypeError, 'abc', '__mod__')
1151 self.checkraises(TypeError, '%(foo)s', '__mod__', 42)
1152 self.checkraises(TypeError, '%s%s', '__mod__', (42,))
1153 self.checkraises(TypeError, '%c', '__mod__', (None,))
1154 self.checkraises(ValueError, '%(foo', '__mod__', {})
1155 self.checkraises(TypeError, '%(foo)s %(bar)s', '__mod__', ('foo', 42))
1156 self.checkraises(TypeError, '%d', '__mod__', "42") # not numeric
1157 self.checkraises(TypeError, '%d', '__mod__', (42+0j)) # no int/long conversion provided
1165 self.checkraises(TypeError, '%*s', '__mod__', ('foo', 'bar'))
1166 self.checkraises(TypeError, '%10.*f', '__mod__', ('foo', 42.))
1167 self.checkraises(ValueError, '%10', '__mod__', (42,))
1170 self.checkraises(TypeError, 'abc', '__mod__', X())
1182 self.checkraises(OverflowError, '%*s', '__mod__', (width, ''))
1185 self.checkraises(OverflowError, '%.*f', '__mod__', (prec, 1. / 7))
1189 self.checkraises(OverflowError, '%*s', '__mod__', (width, ''))
1192 self.checkraises(OverflowError, '%.*f', '__mod__', (prec, 1. / 7))
1234 self.checkraises(ValueError, S, 'partition', '')
1235 self.checkraises(TypeError, S, 'partition', None)
1252 self.checkraises(ValueError, S, 'rpartition', '')
1253 self.checkraises(TypeError, S, 'rpartition', None)
1337 self.checkraises(ValueError, 'xyz', 'translate', 'too short', 'strip')
1338 self.checkraises(ValueError, 'xyz', 'translate', 'too short')
1368 self.checkraises(TypeError, 'xyz', 'decode', 42)
1369 self.checkraises(TypeError, 'xyz', 'encode', 42)