(capsys)
| 110 | |
| 111 | |
| 112 | def 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]) |
nothing calls this directly
no test coverage detected