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

Method test_lock

tests/test_output.py:277–285  ·  view source on GitHub ↗

Creating a logger adds a lock to WRITE_LOCKS.

(self, sio)

Source from the content-addressed store, hash-verified

275 assert repr(BytesLogger()).startswith("<BytesLogger(file=")
276
277 def test_lock(self, sio):
278 """
279 Creating a logger adds a lock to WRITE_LOCKS.
280 """
281 assert sio not in WRITE_LOCKS
282
283 BytesLogger(sio)
284
285 assert sio in WRITE_LOCKS
286
287 @pytest.mark.parametrize("method", stdlib_log_methods)
288 def test_stdlib_methods_support(self, method):

Callers

nothing calls this directly

Calls 1

BytesLoggerClass · 0.90

Tested by

no test coverage detected