Lines Matching refs:assertRaises
39 self.assertRaises(OverflowError, '%c'.__mod__, 0x1234)
45 with self.assertRaises(ValueError):
50 with self.assertRaises(ValueError):
125 self.assertRaises(OverflowError, 't\tt\t'.expandtabs, sys.maxint)
340 self.assertRaises(ValueError, '{'.format)
341 self.assertRaises(ValueError, '}'.format)
342 self.assertRaises(ValueError, 'a{'.format)
343 self.assertRaises(ValueError, 'a}'.format)
344 self.assertRaises(ValueError, '{a'.format)
345 self.assertRaises(ValueError, '}a'.format)
346 self.assertRaises(IndexError, '{0}'.format)
347 self.assertRaises(IndexError, '{1}'.format, 'abc')
348 self.assertRaises(KeyError, '{x}'.format)
349 self.assertRaises(ValueError, "}{".format)
350 self.assertRaises(ValueError, "{".format)
351 self.assertRaises(ValueError, "}".format)
352 self.assertRaises(ValueError, "abc{0:{}".format)
353 self.assertRaises(ValueError, "{0".format)
354 self.assertRaises(IndexError, "{0.}".format)
355 self.assertRaises(ValueError, "{0.}".format, 0)
356 self.assertRaises(IndexError, "{0[}".format)
357 self.assertRaises(ValueError, "{0[}".format, [])
358 self.assertRaises(KeyError, "{0]}".format)
359 self.assertRaises(ValueError, "{0.[]}".format, 0)
360 self.assertRaises(ValueError, "{0..foo}".format, 0)
361 self.assertRaises(ValueError, "{0[0}".format, 0)
362 self.assertRaises(ValueError, "{0[0:foo}".format, 0)
363 self.assertRaises(KeyError, "{c]}".format)
364 self.assertRaises(ValueError, "{{ {{{0}}".format, 0)
365 self.assertRaises(ValueError, "{0}}".format, 0)
366 self.assertRaises(KeyError, "{foo}".format, bar=3)
367 self.assertRaises(ValueError, "{0!x}".format, 3)
368 self.assertRaises(ValueError, "{0!}".format, 0)
369 self.assertRaises(ValueError, "{0!rs}".format, 0)
370 self.assertRaises(ValueError, "{!}".format)
371 self.assertRaises(IndexError, "{:}".format)
372 self.assertRaises(IndexError, "{:s}".format)
373 self.assertRaises(IndexError, "{}".format)
376 self.assertRaises(ValueError, "{0[0]x}".format, [None])
377 self.assertRaises(ValueError, "{0[0](10)}".format, [None])
380 self.assertRaises(TypeError, '{0[{1}]}'.format, 'abcdefg', 4)
383 self.assertRaises(ValueError, "{0:{1:{2}}}".format, 'abc', 's', '')
384 self.assertRaises(ValueError, "{0:{1:{2:{3:{4:{5:{6}}}}}}}".format,
388 self.assertRaises(ValueError, "{0:-s}".format, '')
389 self.assertRaises(ValueError, format, "", "-")
390 self.assertRaises(ValueError, "{0:=s}".format, '')
394 with self.assertRaises(ValueError):
399 with self.assertRaises(ValueError):
404 with self.assertRaises(ValueError):
426 self.assertRaises(ValueError, '{}{1}'.format, 1, 2)
427 self.assertRaises(ValueError, '{1}{}'.format, 1, 2)
428 self.assertRaises(ValueError, '{:{1}}'.format, 1, 2)
429 self.assertRaises(ValueError, '{0:{}}'.format, 1, 2)
439 self.assertRaises(OverflowError, '{0:c}'.format, -1)
440 self.assertRaises(OverflowError, '{0:c}'.format, 256)
443 self.assertRaises(TypeError, sys.stdin.readinto, b"")
456 with self.assertRaises(UnicodeDecodeError):
458 with self.assertRaises(UnicodeDecodeError):
461 with self.assertRaises(TypeError) as cm: