Here is a possible patch which:
* Runs the three test_input_tty() tests in a fresh child Python interpreter, for control over whether Readline is loaded. A pseudoterminal is used for stdin and stdout, and stderr is left untouched to easily see error messages.
* Repeats each test with and without Readline enabled
* Only tests the error handling without Readline
* Fixes the non-error test to use proper UTF-8 input
With my patch applied, there are a couple of prompts mixed up in the test log output via stderr, due to Issue 1927. It is not a major problem, but perhaps we should work on fixing that bug first. |