[issue41729] test_winconsoleio fails and hangs on Windows

Eryk Sun report at bugs.python.org
Sun Sep 6 19:53:25 EDT 2020


Eryk Sun <eryksun at gmail.com> added the comment:

> ÄÄÄÄÄÄÄÄÄÄ^Z^Z^Z^Z^Z^Z^Z^Z^Z^Z

I don't know why Steve made write_input (PC/_testconsole.c) set wRepeatCount in each KeyEvent record to 10. Maybe it was a typo. Previous console implementations have ignored the repeat count, so it wasn't an issue.

test_ctrl_z checks (1) that reading a non-ASCII character works when split across two reads and (2) that Ctrl+Z (0x1A) as the first character of a read is handled as EOF, regardless of where it occurs on the line as long as it's the first character in the buffer. The latter has to be tested because _WindowsConsoleIO has to manually implement the way that WinAPI ReadFile handles Ctrl+Z, a behavior that WinAPI ReadConsoleW does not itself implement.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41729>
_______________________________________


More information about the Python-bugs-list mailing list