(self, exc, obj, methodname, *args, expected_msg=None)
| 27 | ) |
| 28 | |
| 29 | def checkraises(self, exc, obj, methodname, *args, expected_msg=None): |
| 30 | obj = self.fixtype(obj) |
| 31 | # we don't fix the arguments, because UserString can't cope with it |
| 32 | with self.assertRaises(exc) as cm: |
| 33 | getattr(obj, methodname)(*args) |
| 34 | self.assertNotEqual(str(cm.exception), '') |
| 35 | if expected_msg is not None: |
| 36 | self.assertEqual(str(cm.exception), expected_msg) |
| 37 | |
| 38 | def checkcall(self, object, methodname, *args): |
| 39 | object = self.fixtype(object) |
no test coverage detected