(exc, expected, callable, *args)
| 987 | "order (MRO) for bases ") |
| 988 | |
| 989 | def raises(exc, expected, callable, *args): |
| 990 | try: |
| 991 | callable(*args) |
| 992 | except exc as msg: |
| 993 | # the exact msg is generally considered an impl detail |
| 994 | if support.check_impl_detail(): |
| 995 | if not str(msg).startswith(expected): |
| 996 | self.fail("Message %r, expected %r" % |
| 997 | (str(msg), expected)) |
| 998 | else: |
| 999 | self.fail("Expected %s" % exc) |
| 1000 | |
| 1001 | class A(object): pass |
| 1002 | class B(A): pass |
nothing calls this directly
no test coverage detected