mirror of
https://github.com/usestrix/strix.git
synced 2026-10-16 04:28:23 +00:00
test(resume-picker): put the pty in cbreak so the key-reader test can't hang on macOS (#1527)
This commit is contained in:
parent
87f2d783d6
commit
e21f9ce4cc
1 changed files with 4 additions and 0 deletions
|
|
@ -263,7 +263,11 @@ def test_narrow_terminals_never_wrap_a_row() -> None:
|
|||
|
||||
@pytest.mark.skipif(sys.platform == "win32", reason="POSIX key reader")
|
||||
def test_posix_key_reader_handles_multibyte_and_arrows() -> None:
|
||||
tty = pytest.importorskip("tty")
|
||||
master, slave = os.openpty()
|
||||
# Without this the pty echoes the writes into an output queue nobody reads,
|
||||
# and read_raw_key's TCSADRAIN restore blocks forever on macOS.
|
||||
tty.setcbreak(slave)
|
||||
try:
|
||||
with os.fdopen(slave, "r+b", buffering=0) as stream:
|
||||
os.write(master, "\u00e9".encode())
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue