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

Method test_deepcopy

tests/test_output.py:352–361  ·  view source on GitHub ↗

Deepcopied BytesLogger works.

(self, capsys)

Source from the content-addressed store, hash-verified

350 pickle.dumps(pl, proto)
351
352 def test_deepcopy(self, capsys):
353 """
354 Deepcopied BytesLogger works.
355 """
356 copied_logger = copy.deepcopy(BytesLogger())
357 copied_logger.msg(b"hello")
358
359 out, err = capsys.readouterr()
360 assert "hello\n" == out
361 assert "" == err
362
363 def test_deepcopy_preserves_name(self):
364 """

Callers

nothing calls this directly

Calls 2

BytesLoggerClass · 0.90
msgMethod · 0.45

Tested by

no test coverage detected