8000 Mock tcgetattr as well · python/cpython@e84f943 · GitHub
[go: up one dir, main page]

Skip to content

Commit e84f943

Browse files
committed
Mock tcgetattr as well
1 parent ad36cc8 commit e84f943

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

Lib/test/test_pyrepl.py

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -988,6 +988,39 @@ def unix_console(events, **kwargs):
988988
lambda s, *args: s + b":" + b",".join(str(i).encode() for i in args),
989989
)
990990
@patch("_pyrepl.curses.setupterm", lambda a, b: None)
991+
@patch(
992+
"termios.tcgetattr",
993+
lambda _: [
994+
27394,
995+
3,
996+
19200,
997+
536872399,
998+
38400,
999+
38400,
1000+
[
1001+
b"\x04",
1002+
b"\xff",
1003+
b"\xff",
1004+
b"\x7f",
1005+
b"\x17",
1006+
b"\x15",
1007+
b"\x12",
1008+
b"\x00",
1009+
b"\x03",
1010+
b"\x1c",
1011+
b"\x1a",
1012+
b"\x19",
1013+
b"\x11",
1014+
b"\x13",
1015+
b"\x16",
1016+
b"\x0f",
1017+
b"\x01",
1018+
b"\x00",
1019+
b"\x14",
1020+
b"\x00",
1021+
],
1022+
],
1023+
)
9911024
@patch("termios.tcsetattr", lambda a, b, c: None)
9921025
@patch("os.write")
9931026
class TestConsole(TestCase):

0 commit comments

Comments
 (0)
0