• Home
  • Raw
  • Download

Lines Matching refs:assertRaises

93         with test.assertRaises(test.failureException):
96 with self.assertRaises(AttributeError):
638 self.assertRaises(self.failureException, self.assertIs, thing, object())
643 self.assertRaises(self.failureException, self.assertIsNot, thing, thing)
648 self.assertRaises(self.failureException, self.assertIsInstance,
654 self.assertRaises(self.failureException, self.assertNotIsInstance,
668 self.assertRaises(self.failureException, self.assertIn, 'x', 'abc')
669 self.assertRaises(self.failureException, self.assertIn, 4, [1, 2, 3])
670 self.assertRaises(self.failureException, self.assertIn, 'elephant',
673 self.assertRaises(self.failureException, self.assertNotIn, 'c', 'abc')
674 self.assertRaises(self.failureException, self.assertNotIn, 1, [1, 2, 3])
675 self.assertRaises(self.failureException, self.assertNotIn, 'cow',
688 with self.assertRaises(self.failureException):
691 with self.assertRaises(self.failureException):
694 with self.assertRaises(self.failureException):
697 with self.assertRaises(self.failureException):
700 with self.assertRaises(self.failureException):
705 with self.assertRaises(self.failureException):
739 self.assertRaises(self.failureException, self.assertEqual, a, b)
740 self.assertRaises(self.failureException, self.assertEqual, a, b,
742 self.assertRaises(self.failureException, self.assertEqual, a, b,
752 self.assertRaises(unittest.TestCase.failureException,
754 self.assertRaises(unittest.TestCase.failureException,
756 self.assertRaises(unittest.TestCase.failureException,
765 self.assertRaises(self.failureException, self.assertListEqual,
767 self.assertRaises(self.failureException, self.assertTupleEqual,
769 self.assertRaises(self.failureException, self.assertListEqual, None, b)
770 self.assertRaises(self.failureException, self.assertTupleEqual, None,
772 self.assertRaises(self.failureException, self.assertSequenceEqual,
774 self.assertRaises(self.failureException, self.assertListEqual, 1, 1)
775 self.assertRaises(self.failureException, self.assertTupleEqual, 1, 1)
776 self.assertRaises(self.failureException, self.assertSequenceEqual,
783 self.assertRaises(unittest.TestCase.failureException,
790 self.assertRaises(unittest.TestCase.failureException,
793 self.assertRaises(self.failureException, self.assertDictEqual, None, d)
794 self.assertRaises(self.failureException, self.assertDictEqual, [], d)
795 self.assertRaises(self.failureException, self.assertDictEqual, 1, 1)
888 with self.assertRaises(self.failureException) as cm:
905 with self.assertRaises(self.failureException) as cm:
919 with self.assertRaises(self.failureException) as cm:
927 with self.assertRaises(self.failureException) as cm:
934 with self.assertRaises(self.failureException) as cm:
946 self.assertRaises(self.failureException, self.assertCountEqual,
948 self.assertRaises(self.failureException, self.assertCountEqual,
950 self.assertRaises(self.failureException, self.assertCountEqual,
952 self.assertRaises(self.failureException, self.assertCountEqual,
954 self.assertRaises(self.failureException, self.assertCountEqual,
964 self.assertRaises(self.failureException, self.assertCountEqual,
970 self.assertRaises(self.failureException, self.assertCountEqual,
972 self.assertRaises(self.failureException, self.assertCountEqual,
976 self.assertRaises(self.failureException, self.assertCountEqual,
978 self.assertRaises(self.failureException, self.assertCountEqual,
980 self.assertRaises(self.failureException, self.assertCountEqual,
1007 self.assertRaises(self.failureException, self.assertSetEqual, None, set2)
1008 self.assertRaises(self.failureException, self.assertSetEqual, [], set2)
1009 self.assertRaises(self.failureException, self.assertSetEqual, set1, None)
1010 self.assertRaises(self.failureException, self.assertSetEqual, set1, [])
1014 self.assertRaises(self.failureException, self.assertSetEqual, set1, set2)
1022 self.assertRaises(self.failureException, self.assertSetEqual, set1, set2)
1026 self.assertRaises(self.failureException, self.assertSetEqual, set1, set2)
1034 self.assertRaises(self.failureException, self.assertSetEqual, set1, set2)
1035 self.assertRaises(self.failureException, self.assertSetEqual, set2, set1)
1040 self.assertRaises(self.failureException, self.assertSetEqual, set1, set2)
1050 self.assertRaises(self.failureException, self.assertGreater, 1, 2)
1051 self.assertRaises(self.failureException, self.assertGreater, 1, 1)
1052 self.assertRaises(self.failureException, self.assertGreaterEqual, 1, 2)
1053 self.assertRaises(self.failureException, self.assertLess, 2, 1)
1054 self.assertRaises(self.failureException, self.assertLess, 1, 1)
1055 self.assertRaises(self.failureException, self.assertLessEqual, 2, 1)
1064 self.assertRaises(self.failureException, self.assertGreater, 1.0, 1.1)
1065 self.assertRaises(self.failureException, self.assertGreater, 1.0, 1.0)
1066 self.assertRaises(self.failureException, self.assertGreaterEqual, 1.0, 1.1)
1067 self.assertRaises(self.failureException, self.assertLess, 1.1, 1.0)
1068 self.assertRaises(self.failureException, self.assertLess, 1.0, 1.0)
1069 self.assertRaises(self.failureException, self.assertLessEqual, 1.1, 1.0)
1078 self.assertRaises(self.failureException, self.assertGreater, 'ant', 'bug')
1079 self.assertRaises(self.failureException, self.assertGreater, 'ant', 'ant')
1080 self.assertRaises(self.failureException, self.assertGreaterEqual, 'ant', 'bug')
1081 self.assertRaises(self.failureException, self.assertLess, 'bug', 'ant')
1082 self.assertRaises(self.failureException, self.assertLess, 'ant', 'ant')
1083 self.assertRaises(self.failureException, self.assertLessEqual, 'bug', 'ant')
1092 self.assertRaises(self.failureException, self.assertGreater, b'ant', b'bug')
1093 self.assertRaises(self.failureException, self.assertGreater, b'ant', b'ant')
1094 self.assertRaises(self.failureException, self.assertGreaterEqual, b'ant',
1096 self.assertRaises(self.failureException, self.assertLess, b'bug', b'ant')
1097 self.assertRaises(self.failureException, self.assertLess, b'ant', b'ant')
1098 self.assertRaises(self.failureException, self.assertLessEqual, b'bug', b'ant')
1156 with bytes_warning(), self.assertRaises(self.failureException):
1163 with bytes_warning(), self.assertRaises(self.failureException):
1165 with bytes_warning(), self.assertRaises(self.failureException):
1167 with bytes_warning(), self.assertRaises(self.failureException):
1169 with bytes_warning(), self.assertRaises(self.failureException):
1171 with bytes_warning(), self.assertRaises(self.failureException):
1173 with bytes_warning(), self.assertRaises(self.failureException):
1176 with self.assertRaises(self.failureException):
1178 with self.assertRaises(self.failureException):
1183 with self.assertRaises(self.failureException):
1185 with self.assertRaises(self.failureException):
1187 with self.assertRaises(self.failureException):
1189 with self.assertRaises(self.failureException):
1191 with self.assertRaises(self.failureException):
1196 with self.assertRaises(self.failureException):
1198 with self.assertRaises(self.failureException):
1200 with self.assertRaises(self.failureException):
1202 with self.assertRaises(self.failureException):
1204 with self.assertRaises(self.failureException):
1207 with bytes_warning(), self.assertRaises(self.failureException):
1209 with self.assertRaises(self.failureException):
1211 with self.assertRaises(self.failureException):
1214 with self.assertRaises(self.failureException):
1218 with bytes_warning(), self.assertRaises(self.failureException):
1220 with bytes_warning(), self.assertRaises(self.failureException):
1225 self.assertRaises(self.failureException, self.assertIsNone, False)
1227 self.assertRaises(self.failureException, self.assertIsNotNone, None)
1231 self.assertRaises(self.failureException, self.assertRegex,
1239 self.assertRaises(ExceptionMock, Stub)
1241 self.assertRaises((ValueError, ExceptionMock), Stub)
1243 self.assertRaises(ValueError, int, '19', base=8)
1245 with self.assertRaises(self.failureException):
1246 self.assertRaises(ExceptionMock, lambda: 0)
1248 with self.assertRaises(TypeError):
1249 self.assertRaises(ExceptionMock, None)
1251 with self.assertRaises(ExceptionMock):
1252 self.assertRaises(ValueError, Stub)
1259 with self.assertRaises(ExceptionMock):
1262 with self.assertRaises((ValueError, ExceptionMock)) as cm:
1268 with self.assertRaises(ValueError):
1271 with self.assertRaises(self.failureException):
1272 with self.assertRaises(ExceptionMock):
1276 with self.assertRaises(ExceptionMock, msg='foobar'):
1280 with self.assertRaises(ExceptionMock, foobar=42):
1283 with self.assertRaises(ExceptionMock):
1284 self.assertRaises(ValueError, Stub)
1287 with self.assertRaises(TypeError):
1288 self.assertRaises()
1289 with self.assertRaises(TypeError):
1290 self.assertRaises(1)
1291 with self.assertRaises(TypeError):
1292 self.assertRaises(object)
1293 with self.assertRaises(TypeError):
1294 self.assertRaises((ValueError, 1))
1295 with self.assertRaises(TypeError):
1296 self.assertRaises((ValueError, object))
1308 self.assertRaises(ValueError, func)
1320 with self.assertRaises(TypeError):
1345 self.assertRaises(TypeError, self.assertRaisesRegex, MyExc, lambda: True)
1351 self.assertRaises(TypeError, self.assertWarnsRegex, MyWarn, lambda: True)
1376 ctx = self.assertRaises(ExceptionMock)
1384 with self.assertRaises(TypeError):
1386 with self.assertRaises(TypeError):
1388 with self.assertRaises(TypeError):
1390 with self.assertRaises(TypeError):
1392 with self.assertRaises(TypeError):
1394 with self.assertRaises(TypeError):
1409 with self.assertRaises(self.failureException):
1412 with self.assertRaises(TypeError):
1418 with self.assertRaises(self.failureException):
1423 with self.assertRaises(RuntimeWarning):
1449 with self.assertRaises(self.failureException):
1464 with self.assertRaises(self.failureException):
1470 with self.assertRaises(RuntimeWarning):
1475 with self.assertRaises(TypeError):
1477 with self.assertRaises(TypeError):
1479 with self.assertRaises(TypeError):
1481 with self.assertRaises(TypeError):
1483 with self.assertRaises(TypeError):
1485 with self.assertRaises(TypeError):
1494 with self.assertRaises(self.failureException):
1498 with self.assertRaises(TypeError):
1504 with self.assertRaises(self.failureException):
1508 with self.assertRaises(self.failureException):
1517 with self.assertRaises((RuntimeWarning, self.failureException)):
1533 with self.assertRaises(self.failureException):
1548 with self.assertRaises(self.failureException):
1552 with self.assertRaises(self.failureException):
1561 with self.assertRaises((RuntimeWarning, self.failureException)):
1566 with self.assertRaises(TypeError):
1568 with self.assertRaises(TypeError):
1570 with self.assertRaises(TypeError):
1572 with self.assertRaises(TypeError):
1574 with self.assertRaises(TypeError):
1576 with self.assertRaises(TypeError):
1578 with self.assertRaises(TypeError):
1650 with self.assertRaises(self.failureException):
1657 with self.assertRaises(self.failureException):
1665 with self.assertRaises(self.failureException):
1706 with self.assertRaises(AttributeError):
1759 with self.assertRaises(KeyboardInterrupt):