• Home
  • Raw
  • Download

Lines Matching refs:assertRaises

46         self.assertRaises(TypeError, operator.lt)
47 self.assertRaises(TypeError, operator.lt, 1j, 2j)
57 self.assertRaises(TypeError, operator.le)
58 self.assertRaises(TypeError, operator.le, 1j, 2j)
71 self.assertRaises(TypeError, operator.eq)
72 self.assertRaises(SyntaxError, operator.eq, C(), C())
85 self.assertRaises(TypeError, operator.ne)
86 self.assertRaises(SyntaxError, operator.ne, C(), C())
96 self.assertRaises(TypeError, operator.ge)
97 self.assertRaises(TypeError, operator.ge, 1j, 2j)
107 self.assertRaises(TypeError, operator.gt)
108 self.assertRaises(TypeError, operator.gt, 1j, 2j)
118 self.assertRaises(TypeError, operator.abs)
119 self.assertRaises(TypeError, operator.abs, None)
125 self.assertRaises(TypeError, operator.add)
126 self.assertRaises(TypeError, operator.add, None, None)
131 self.assertRaises(TypeError, operator.and_)
132 self.assertRaises(TypeError, operator.and_, None, None)
137 self.assertRaises(TypeError, operator.concat)
138 self.assertRaises(TypeError, operator.concat, None, None)
143 self.assertRaises(TypeError, operator.concat, 13, 29)
147 self.assertRaises(TypeError, operator.countOf)
148 self.assertRaises(TypeError, operator.countOf, None, None)
149 self.assertRaises(ZeroDivisionError, operator.countOf, BadIterable(), 1)
156 self.assertRaises(TypeError, operator.delitem, a)
157 self.assertRaises(TypeError, operator.delitem, a, None)
163 self.assertRaises(TypeError, operator.floordiv, 5)
164 self.assertRaises(TypeError, operator.floordiv, None, None)
169 self.assertRaises(TypeError, operator.truediv, 5)
170 self.assertRaises(TypeError, operator.truediv, None, None)
176 self.assertRaises(TypeError, operator.getitem)
177 self.assertRaises(TypeError, operator.getitem, a, None)
182 self.assertRaises(TypeError, operator.indexOf)
183 self.assertRaises(TypeError, operator.indexOf, None, None)
184 self.assertRaises(ZeroDivisionError, operator.indexOf, BadIterable(), 1)
186 self.assertRaises(ValueError, operator.indexOf, [4, 3, 2, 1], 0)
190 self.assertRaises(TypeError, operator.invert)
191 self.assertRaises(TypeError, operator.invert, None)
196 self.assertRaises(TypeError, operator.lshift)
197 self.assertRaises(TypeError, operator.lshift, None, 42)
200 self.assertRaises(ValueError, operator.lshift, 2, -1)
204 self.assertRaises(TypeError, operator.mod)
205 self.assertRaises(TypeError, operator.mod, None, 42)
210 self.assertRaises(TypeError, operator.mul)
211 self.assertRaises(TypeError, operator.mul, None, None)
216 self.assertRaises(TypeError, operator.matmul)
217 self.assertRaises(TypeError, operator.matmul, 42, 42)
225 self.assertRaises(TypeError, operator.neg)
226 self.assertRaises(TypeError, operator.neg, None)
234 self.assertRaises(TypeError, operator.or_)
235 self.assertRaises(TypeError, operator.or_, None, None)
240 self.assertRaises(TypeError, operator.pos)
241 self.assertRaises(TypeError, operator.pos, None)
249 self.assertRaises(TypeError, operator.pow)
250 self.assertRaises(TypeError, operator.pow, None, None)
252 self.assertRaises(TypeError, operator.pow, 1)
253 self.assertRaises(TypeError, operator.pow, 1, 2, 3)
257 self.assertRaises(TypeError, operator.rshift)
258 self.assertRaises(TypeError, operator.rshift, None, 42)
261 self.assertRaises(ValueError, operator.rshift, 2, -1)
265 self.assertRaises(TypeError, operator.contains)
266 self.assertRaises(TypeError, operator.contains, None, None)
267 self.assertRaises(ZeroDivisionError, operator.contains, BadIterable(), 1)
274 self.assertRaises(TypeError, operator.setitem, a)
275 self.assertRaises(TypeError, operator.setitem, a, None, None)
278 self.assertRaises(IndexError, operator.setitem, a, 4, 2)
282 self.assertRaises(TypeError, operator.sub)
283 self.assertRaises(TypeError, operator.sub, None, None)
291 self.assertRaises(TypeError, operator.truth)
292 self.assertRaises(SyntaxError, operator.truth, C())
300 self.assertRaises(TypeError, operator.xor)
301 self.assertRaises(TypeError, operator.xor, None, None)
308 self.assertRaises(TypeError, operator.is_)
316 self.assertRaises(TypeError, operator.is_not)
328 self.assertRaises(TypeError, f)
329 self.assertRaises(TypeError, f, a, 'dent')
330 self.assertRaises(TypeError, f, a, surname='dent')
332 self.assertRaises(AttributeError, f, a)
333 self.assertRaises(TypeError, operator.attrgetter, 2)
334 self.assertRaises(TypeError, operator.attrgetter)
342 self.assertRaises(TypeError, operator.attrgetter, ('x', (), 'y'))
347 self.assertRaises(SyntaxError, operator.attrgetter('foo'), C())
356 self.assertRaises(AttributeError, f, a.child)
360 self.assertRaises(AttributeError, f, a)
362 self.assertRaises(AttributeError, f, a)
364 self.assertRaises(AttributeError, f, a)
378 self.assertRaises(TypeError, f)
379 self.assertRaises(TypeError, f, a, 3)
380 self.assertRaises(TypeError, f, a, size=3)
382 self.assertRaises(IndexError, f, a)
387 self.assertRaises(SyntaxError, operator.itemgetter(42), C())
390 self.assertRaises(TypeError, f, a)
391 self.assertRaises(TypeError, operator.itemgetter)
397 self.assertRaises(KeyError, f, d)
409 self.assertRaises(TypeError, operator.itemgetter(2, 'x', 5), data)
426 self.assertRaises(TypeError, operator.methodcaller)
427 self.assertRaises(TypeError, operator.methodcaller, 12)
437 self.assertRaises(IndexError, f, a)
440 self.assertRaises(TypeError, f)
441 self.assertRaises(TypeError, f, a, 3)
442 self.assertRaises(TypeError, f, a, spam=3)
445 self.assertRaises(TypeError, f, a, a)
502 with self.assertRaises(TypeError):
504 with self.assertRaises(ValueError):
506 with self.assertRaises(LookupError):