mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
[3.13] gh-111201: Support pyrepl on Windows (GH-119559) (GH-119850)
(cherry picked from commit 0d07182821)
Co-authored-by: Dino Viehland <dinoviehland@gmail.com>
Co-authored-by: Anthony Shaw <anthony.p.shaw@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
This commit is contained in:
parent
6e57bd01e0
commit
d6faac6d1f
15 changed files with 1019 additions and 49 deletions
|
|
@ -1,12 +1,16 @@
|
|||
import itertools
|
||||
import sys
|
||||
import unittest
|
||||
from functools import partial
|
||||
from unittest import TestCase
|
||||
from unittest.mock import MagicMock, call, patch, ANY
|
||||
|
||||
from .support import handle_all_events, code_to_events
|
||||
from _pyrepl.console import Event
|
||||
from _pyrepl.unix_console import UnixConsole
|
||||
|
||||
try:
|
||||
from _pyrepl.console import Event
|
||||
from _pyrepl.unix_console import UnixConsole
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
def unix_console(events, **kwargs):
|
||||
console = UnixConsole()
|
||||
|
|
@ -67,6 +71,7 @@ def unix_console(events, **kwargs):
|
|||
}
|
||||
|
||||
|
||||
@unittest.skipIf(sys.platform == "win32", "No Unix event queue on Windows")
|
||||
@patch("_pyrepl.curses.tigetstr", lambda s: TERM_CAPABILITIES.get(s))
|
||||
@patch(
|
||||
"_pyrepl.curses.tparm",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue