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

Method test_async_log_methods

tests/test_stdlib.py:385–395  ·  view source on GitHub ↗

Async methods log async.

(self, meth, cl)

Source from the content-addressed store, hash-verified

383 "meth", ["debug", "info", "warning", "error", "critical"]
384 )
385 async def test_async_log_methods(self, meth, cl):
386 """
387 Async methods log async.
388 """
389 bl = build_bl(cl, processors=[])
390
391 await getattr(bl, f"a{meth}")("Async!")
392
393 assert [
394 CapturedCall(method_name=meth, args=(), kwargs={"event": "Async!"})
395 ] == cl.calls
396
397 async def test_async_log_methods_special_cases(self, cl):
398 """

Callers

nothing calls this directly

Calls 2

CapturedCallClass · 0.90
build_blFunction · 0.70

Tested by

no test coverage detected