(self, exc, obj, methodname, *args, expected_msg=None)
| 36 | ) |
| 37 | |
| 38 | def checkraises(self, exc, obj, methodname, *args, expected_msg=None): |
| 39 | obj = self.fixtype(obj) |
| 40 | # we don't fix the arguments, because UserString can't cope with it |
| 41 | with self.assertRaises(exc) as cm: |
| 42 | getattr(obj, methodname)(*args) |
| 43 | self.assertNotEqual(str(cm.exception), '') |
| 44 | if expected_msg is not None: |
| 45 | self.assertEqual(str(cm.exception), expected_msg) |
| 46 | |
| 47 | def checkcall(self, object, methodname, *args): |
| 48 | object = self.fixtype(object) |
no test coverage detected