Lines Matching refs:assertRaises
120 with self.assertRaises(ZeroDivisionError):
124 with self.assertRaises(TypeError):
126 with self.assertRaises(TypeError):
128 with self.assertRaises(TypeError):
130 with self.assertRaises(TypeError):
132 with self.assertRaises(TypeError):
137 with self.assertRaises(TypeError):
157 self.assertRaises(TypeError, operator.lt, 1+1j, 2+2j)
158 self.assertRaises(TypeError, operator.le, 1+1j, 2+2j)
159 self.assertRaises(TypeError, operator.gt, 1+1j, 2+2j)
160 self.assertRaises(TypeError, operator.ge, 1+1j, 2+2j)
185 with self.assertRaises(TypeError):
187 with self.assertRaises(TypeError):
189 with self.assertRaises(TypeError):
191 with self.assertRaises(TypeError):
193 with self.assertRaises(TypeError):
198 with self.assertRaises(TypeError):
202 self.assertRaises(TypeError, divmod, 1+1j, 1+0j)
203 self.assertRaises(TypeError, divmod, 1+1j, 1.0)
204 self.assertRaises(TypeError, divmod, 1+1j, 1)
205 self.assertRaises(TypeError, divmod, 1.0, 1+0j)
206 self.assertRaises(TypeError, divmod, 1, 1+0j)
210 self.assertRaises(TypeError, divmod, a, b)
215 self.assertRaises(ZeroDivisionError, pow, 0+0j, 1j)
218 self.assertRaises(ValueError, pow, 1+1j, 1+1j, 1+1j)
219 self.assertRaises(OverflowError, pow, 1e200+1j, 1e200+1j)
250 self.assertRaises(ValueError, pow, a, b, 0)
317 self.assertRaises(TypeError, complex, OS(None))
318 self.assertRaises(TypeError, complex, NS(None))
319 self.assertRaises(TypeError, complex, {})
320 self.assertRaises(TypeError, complex, NS(1.5))
321 self.assertRaises(TypeError, complex, NS(1))
391 self.assertRaises(TypeError, complex, "1", "1")
392 self.assertRaises(TypeError, complex, 1, "1")
396 self.assertRaises(ValueError, complex, '1+1j\0j')
398 self.assertRaises(TypeError, int, 5+3j)
399 self.assertRaises(TypeError, int, 5+3j)
400 self.assertRaises(TypeError, float, 5+3j)
401 self.assertRaises(ValueError, complex, "")
402 self.assertRaises(TypeError, complex, None)
404 self.assertRaises(ValueError, complex, "\0")
405 self.assertRaises(ValueError, complex, "3\09")
406 self.assertRaises(TypeError, complex, "1", "2")
407 self.assertRaises(TypeError, complex, "1", 42)
408 self.assertRaises(TypeError, complex, 1, "2")
409 self.assertRaises(ValueError, complex, "1+")
410 self.assertRaises(ValueError, complex, "1+1j+1j")
411 self.assertRaises(ValueError, complex, "--")
412 self.assertRaises(ValueError, complex, "(1+2j")
413 self.assertRaises(ValueError, complex, "1+2j)")
414 self.assertRaises(ValueError, complex, "1+(2j)")
415 self.assertRaises(ValueError, complex, "(1+2j)123")
416 self.assertRaises(ValueError, complex, "x")
417 self.assertRaises(ValueError, complex, "1j+2")
418 self.assertRaises(ValueError, complex, "1e1ej")
419 self.assertRaises(ValueError, complex, "1e++1ej")
420 self.assertRaises(ValueError, complex, ")1+2j(")
430 self.assertRaises(ValueError, complex, "1..1j")
431 self.assertRaises(ValueError, complex, "1.11.1j")
432 self.assertRaises(ValueError, complex, "1e1.1j")
440 self.assertRaises(ValueError, complex, '\u3053\u3093\u306b\u3061\u306f')
449 self.assertRaises(EvilExc, complex, evilcomplex())
459 self.assertRaises(TypeError, complex, float2(None))
469 self.assertRaises(OverflowError, complex, MyIndex(2**2000))
470 self.assertRaises(OverflowError, complex, 123, MyIndex(2**2000))
476 self.assertRaises(TypeError, complex, MyInt())
477 self.assertRaises(TypeError, complex, 123, MyInt())
500 self.assertRaises(TypeError, complex, complex2(1j))
535 self.assertRaises(ValueError, complex, lit)
750 self.assertRaises(ValueError, (1.5+0.5j).__format__, '010f')
753 self.assertRaises(ValueError, (1.5+3j).__format__, '=20')
757 self.assertRaises(ValueError, (1.5+0.5j).__format__, t)