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

Function test_pickling_coroutine_function_handler

tests/test_pickling.py:112–125  ·  view source on GitHub ↗
(capsys)

Source from the content-addressed store, hash-verified

110
111
112def test_pickling_coroutine_function_handler(capsys):
113 logger.add(async_print, format="{level} - {function} - {message}")
114
115 with copied_logger_though_pickle(logger) as dupe_logger:
116
117 async def async_debug():
118 dupe_logger.debug("A message")
119 await dupe_logger.complete()
120
121 asyncio.run(async_debug())
122
123 out, err = capsys.readouterr()
124 assert out == "DEBUG - async_debug - A message\n"
125 assert err == ""
126
127
128@pytest.mark.parametrize("flushable", [True, False])

Callers

nothing calls this directly

Calls 3

async_debugFunction · 0.85
addMethod · 0.80

Tested by

no test coverage detected