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

Method test_stdlib_methods_support

tests/test_output.py:288–296  ·  view source on GitHub ↗

BytesLogger implements methods of stdlib loggers.

(self, method)

Source from the content-addressed store, hash-verified

286
287 @pytest.mark.parametrize("method", stdlib_log_methods)
288 def test_stdlib_methods_support(self, method):
289 """
290 BytesLogger implements methods of stdlib loggers.
291 """
292 sio = BytesIO()
293
294 getattr(BytesLogger(sio), method)(b"hello")
295
296 assert b"hello" in sio.getvalue()
297
298 @pytest.mark.parametrize("file", [None, stdout.buffer, stderr.buffer])
299 @pytest.mark.parametrize("proto", range(pickle.HIGHEST_PROTOCOL + 1))

Callers

nothing calls this directly

Calls 1

BytesLoggerClass · 0.90

Tested by

no test coverage detected