MCPcopy
hub / github.com/mitmproxy/mitmproxy / test_quickhelp

Function test_quickhelp

test/mitmproxy/tools/console/test_quickhelp.py:44–55  ·  view source on GitHub ↗
(widget, flow, keymap, is_root_widget)

Source from the content-addressed store, hash-verified

42 ],
43)
44def test_quickhelp(widget, flow, keymap, is_root_widget):
45 qh = quickhelp.make(widget, flow, is_root_widget)
46 for row in [qh.top_items, qh.bottom_items]:
47 for title, v in row.items():
48 if isinstance(v, quickhelp.BasicKeyHelp):
49 key_short = v.key
50 else:
51 b = keymap.binding_for_help(v)
52 if b is None:
53 raise AssertionError(f"No binding found for help text: {v}")
54 key_short = b.key_short()
55 assert len(key_short) + len(title) < 14
56
57
58def test_make_rows():

Callers

nothing calls this directly

Calls 4

binding_for_helpMethod · 0.80
key_shortMethod · 0.80
makeMethod · 0.45
itemsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…