]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
speedup test_pyrepl (#132688)
authorChris Eibl <138194463+chris-eibl@users.noreply.github.com>
Sat, 19 Apr 2025 01:12:40 +0000 (03:12 +0200)
committerGitHub <noreply@github.com>
Sat, 19 Apr 2025 01:12:40 +0000 (02:12 +0100)
speedup test_unix_console.py and test_windows_console.py

Lib/test/test_pyrepl/test_unix_console.py
Lib/test/test_pyrepl/test_windows_console.py

index 057cdd112852dc256f874938f3382fd238c6c5ac..2f5c150402b8f4200996c0432b394e3c669336d2 100644 (file)
@@ -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():
index 07eaccd1124cd60e1d1d5bd8ea5fa256c225d153..69f2d5af2a4dce756085e4a3a1b817e547dbbba4 100644 (file)
@@ -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()