Just like self.assertTrue(a is not b), but with a nicer default message.
(self, expr1, expr2, msg=None)
| 1206 | self.fail(self._formatMessage(msg, standardMsg)) |
| 1207 | |
| 1208 | def assertIsNot(self, expr1, expr2, msg=None): |
| 1209 | """Just like self.assertTrue(a is not b), but with a nicer default message.""" |
| 1210 | if expr1 is expr2: |
| 1211 | standardMsg = 'unexpectedly identical: %s' % (safe_repr(expr1),) |
| 1212 | self.fail(self._formatMessage(msg, standardMsg)) |
| 1213 | |
| 1214 | def assertDictEqual(self, d1, d2, msg=None): |
| 1215 | self.assertIsInstance(d1, dict, 'First argument is not a dictionary') |