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

Method test_positional_args_proxied

tests/test_stdlib.py:229–237  ·  view source on GitHub ↗

Positional arguments supplied are proxied as kwarg.

(self)

Source from the content-addressed store, hash-verified

227 assert "debug" == bl.log(10, "event")
228
229 def test_positional_args_proxied(self):
230 """
231 Positional arguments supplied are proxied as kwarg.
232 """
233 bl = BoundLogger(ReturnLogger(), [], {})
234 _args, kwargs = bl.debug("event", "foo", bar="baz")
235
236 assert "baz" == kwargs.get("bar")
237 assert ("foo",) == kwargs.get("positional_args")
238
239 @pytest.mark.parametrize(
240 "attribute_name",

Callers

nothing calls this directly

Calls 3

debugMethod · 0.95
BoundLoggerClass · 0.90
ReturnLoggerClass · 0.90

Tested by

no test coverage detected