MCPcopy Index your code
hub / github.com/python/cpython / prepare_console

Function prepare_console

Lib/test/test_pyrepl/support.py:86–93  ·  view source on GitHub ↗
(events: Iterable[Event], **kwargs)

Source from the content-addressed store, hash-verified

84
85
86def prepare_console(events: Iterable[Event], **kwargs) -> MagicMock | Console:
87 console = MagicMock()
88 console.get_event.side_effect = events
89 console.height = 100
90 console.width = 80
91 for key, val in kwargs.items():
92 setattr(console, key, val)
93 return console
94
95
96def handle_all_events(

Calls 2

MagicMockClass · 0.90
itemsMethod · 0.45

Used in the wild real call sites across dependent graphs

searching dependent graphs…