MCPcopy Create free account
hub / github.com/hynek/structlog / test_exception_do_not_overwrite

Method test_exception_do_not_overwrite

tests/test_stdlib.py:1596–1610  ·  view source on GitHub ↗

`exception` leaves exc_info be, if it's set.

(self, abl, cl)

Source from the content-addressed store, hash-verified

1594
1595 @pytest.mark.asyncio
1596 async def test_exception_do_not_overwrite(self, abl, cl):
1597 """
1598 `exception` leaves exc_info be, if it's set.
1599 """
1600 o1 = object()
1601 o2 = object()
1602 o3 = object()
1603
1604 try:
1605 raise ValueError("omg")
1606 except ValueError:
1607 await abl.exception("oops", exc_info=(o1, o2, o3))
1608
1609 ei = cl.calls[0].kwargs["exc_info"]
1610 assert (o1, o2, o3) == ei
1611
1612 @pytest.mark.asyncio
1613 async def test_bind_unbind(self, cl):

Callers

nothing calls this directly

Calls 1

exceptionMethod · 0.45

Tested by

no test coverage detected