mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
speedup test_pyrepl (#132688)
speedup test_unix_console.py and test_windows_console.py
This commit is contained in:
parent
c9a855a9e0
commit
815061cbab
2 changed files with 2 additions and 0 deletions
|
@ -23,6 +23,7 @@ def unix_console(events, **kwargs):
|
|||
height = kwargs.get("height", 25)
|
||||
width = kwargs.get("width", 80)
|
||||
console.getheightwidth = MagicMock(side_effect=lambda: (height, width))
|
||||
console.wait = MagicMock()
|
||||
|
||||
console.prepare()
|
||||
for key, val in kwargs.items():
|
||||
|
|
|
@ -31,6 +31,7 @@ class WindowsConsoleTests(TestCase):
|
|||
def console(self, events, **kwargs) -> Console:
|
||||
console = WindowsConsole()
|
||||
console.get_event = MagicMock(side_effect=events)
|
||||
console.wait = MagicMock()
|
||||
console._scroll = MagicMock()
|
||||
console._hide_cursor = MagicMock()
|
||||
console._show_cursor = MagicMock()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue