(expected, *args, _msg=None, **kw)
| 3 | |
| 4 | |
| 5 | def assert_raises(expected, *args, _msg=None, **kw): |
| 6 | if args: |
| 7 | f, f_args = args[0], args[1:] |
| 8 | with AssertRaises(expected, _msg): |
| 9 | f(*f_args, **kw) |
| 10 | else: |
| 11 | assert not kw |
| 12 | return AssertRaises(expected, _msg) |
| 13 | |
| 14 | |
| 15 | class AssertRaises: |
no test coverage detected