`exception` makes sure 'exc_info" is set, if it's not set already.
(self, abl, cl)
| 1579 | |
| 1580 | @pytest.mark.asyncio |
| 1581 | async def test_exception(self, abl, cl): |
| 1582 | """ |
| 1583 | `exception` makes sure 'exc_info" is set, if it's not set already. |
| 1584 | """ |
| 1585 | try: |
| 1586 | raise ValueError("omg") |
| 1587 | except ValueError: |
| 1588 | await abl.exception("oops") |
| 1589 | |
| 1590 | ei = cl.calls[0].kwargs["exc_info"] |
| 1591 | |
| 1592 | assert ValueError is ei[0] |
| 1593 | assert ("omg",) == ei[1].args |
| 1594 | |
| 1595 | @pytest.mark.asyncio |
| 1596 | async def test_exception_do_not_overwrite(self, abl, cl): |