(wpipe)
| 2648 | if not sys.stdin.isatty() or not sys.stdout.isatty(): |
| 2649 | self.skipTest("stdin and stdout must be ttys") |
| 2650 | def child(wpipe): |
| 2651 | # Check the error handlers are accounted for |
| 2652 | if stdio_encoding: |
| 2653 | sys.stdin = io.TextIOWrapper(sys.stdin.detach(), |
| 2654 | encoding=stdio_encoding, |
| 2655 | errors=stdin_errors) |
| 2656 | sys.stdout = io.TextIOWrapper(sys.stdout.detach(), |
| 2657 | encoding=stdio_encoding, |
| 2658 | errors=stdout_errors) |
| 2659 | print("tty =", sys.stdin.isatty() and sys.stdout.isatty(), file=wpipe) |
| 2660 | try: |
| 2661 | print(ascii(input(prompt)), file=wpipe) |
| 2662 | except BaseException as e: |
| 2663 | print(ascii(f'{e.__class__.__name__}: {e!s}'), file=wpipe) |
| 2664 | with self.detach_readline(): |
| 2665 | lines = self.run_child(child, terminal_input + b"\r\n") |
| 2666 | # Check we did exercise the GNU readline path |
no test coverage detected