MCPcopy Index your code
hub / github.com/bpython/bpython / FakeRepl

Class FakeRepl

bpython/test/test_repl.py:41–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39
40
41class FakeRepl(repl.Repl):
42 def __init__(self, conf=None):
43 super().__init__(repl.Interpreter(), setup_config(conf))
44 self._current_line = ""
45 self._cursor_offset = 0
46
47 def _get_current_line(self) -> str:
48 return self._current_line
49
50 def _set_current_line(self, val: str) -> None:
51 self._current_line = val
52
53 def _get_cursor_offset(self) -> int:
54 return self._cursor_offset
55
56 def _set_cursor_offset(self, val: int) -> None:
57 self._cursor_offset = val
58
59 def getstdout(self) -> str:
60 raise NotImplementedError
61
62 def reprint_line(
63 self, lineno: int, tokens: list[tuple[repl._TokenType, str]]
64 ) -> None:
65 raise NotImplementedError
66
67 def reevaluate(self):
68 raise NotImplementedError
69
70
71class TestMatchesIterator(unittest.TestCase):

Callers 15

setUpMethod · 0.85
test_issue583Method · 0.85
setUpMethod · 0.85
setUpMethod · 0.85
setUpMethod · 0.85
test_pushMethod · 0.85

Calls

no outgoing calls

Tested by 15

setUpMethod · 0.68
test_issue583Method · 0.68
setUpMethod · 0.68
setUpMethod · 0.68
setUpMethod · 0.68
test_pushMethod · 0.68