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

Class MockShell

Lib/idlelib/idle_test/test_run.py:102–114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100
101
102class MockShell:
103 def __init__(self):
104 self.reset()
105 def write(self, *args):
106 self.written.append(args)
107 def readline(self):
108 return self.lines.pop()
109 def close(self):
110 pass
111 def reset(self):
112 self.written = []
113 def push(self, lines):
114 self.lines = list(lines)[::-1]
115
116
117class StdInputFilesTest(unittest.TestCase):

Callers 12

test_miscMethod · 0.85
test_unsupportedMethod · 0.85
test_readMethod · 0.85
test_readlineMethod · 0.85
test_readlinesMethod · 0.85
test_closeMethod · 0.85
test_miscMethod · 0.85
test_unsupportedMethod · 0.85
test_writeMethod · 0.85
test_writelinesMethod · 0.85
test_closeMethod · 0.85

Calls

no outgoing calls

Tested by 12

test_miscMethod · 0.68
test_unsupportedMethod · 0.68
test_readMethod · 0.68
test_readlineMethod · 0.68
test_readlinesMethod · 0.68
test_closeMethod · 0.68
test_miscMethod · 0.68
test_unsupportedMethod · 0.68
test_writeMethod · 0.68
test_writelinesMethod · 0.68
test_closeMethod · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…