MCPcopy
hub / github.com/Textualize/rich / test_locals

Function test_locals

examples/log.py:53–74  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

51
52
53def test_locals():
54 foo = (1, 2, 3)
55 movies = ["Deadpool", "Rise of the Skywalker"]
56 console = Console()
57
58 console.log(
59 "[b]JSON[/b] RPC [i]batch[/i]",
60 [
61 {"jsonrpc": "2.0", "method": "sum", "params": [1, 2, 4], "id": "1"},
62 {"jsonrpc": "2.0", "method": "notify_hello", "params": [7]},
63 {"jsonrpc": "2.0", "method": "subtract", "params": [42, 23], "id": "2"},
64 {"foo": "boo"},
65 {
66 "jsonrpc": "2.0",
67 "method": "foo.get",
68 "params": {"name": "myself", "enable": False, "grommits": None},
69 "id": "5",
70 },
71 {"jsonrpc": "2.0", "method": "get_data", "id": "9"},
72 ],
73 log_locals=True,
74 )
75
76
77test_locals()

Callers 1

log.pyFile · 0.85

Calls 2

logMethod · 0.95
ConsoleClass · 0.90

Tested by

no test coverage detected