MCPcopy Create free account
hub / github.com/Delgan/loguru / test_coroutine_function

Function test_coroutine_function

tests/test_coroutine_sink.py:26–37  ·  view source on GitHub ↗
(capsys)

Source from the content-addressed store, hash-verified

24
25
26def test_coroutine_function(capsys):
27 async def worker():
28 logger.debug("A message")
29 await logger.complete()
30
31 logger.add(async_writer, format="{message}")
32
33 asyncio.run(worker())
34
35 out, err = capsys.readouterr()
36 assert err == ""
37 assert out == "A message\n"
38
39
40def test_async_callable_sink(capsys):

Callers

nothing calls this directly

Calls 2

addMethod · 0.80
workerFunction · 0.70

Tested by

no test coverage detected