Commit d27487e
Drain the pty masters in ScreenTests and release the GIL in endwin()
ScreenTests drives curses over pseudo-terminals whose master ends are
never read. On macOS (unlike Linux) the tcdrain() that curses performs
inside endwin(), and even a plain write(), blocks once the unread output
fills the pty buffer, so the test hung until the timeout.
Drain the masters synchronously before endwin(), leaving room for its
output. Also release the GIL around the endwin() call, so that it no
longer blocks other threads while it talks to the terminal.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 0028058 commit d27487e
2 files changed
Lines changed: 29 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1773 | 1773 | | |
1774 | 1774 | | |
1775 | 1775 | | |
| 1776 | + | |
| 1777 | + | |
| 1778 | + | |
| 1779 | + | |
| 1780 | + | |
| 1781 | + | |
| 1782 | + | |
| 1783 | + | |
| 1784 | + | |
| 1785 | + | |
| 1786 | + | |
| 1787 | + | |
| 1788 | + | |
| 1789 | + | |
1776 | 1790 | | |
1777 | 1791 | | |
1778 | 1792 | | |
1779 | 1793 | | |
1780 | 1794 | | |
| 1795 | + | |
1781 | 1796 | | |
1782 | 1797 | | |
1783 | 1798 | | |
| |||
1786 | 1801 | | |
1787 | 1802 | | |
1788 | 1803 | | |
| 1804 | + | |
| 1805 | + | |
1789 | 1806 | | |
1790 | 1807 | | |
1791 | 1808 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3723 | 3723 | | |
3724 | 3724 | | |
3725 | 3725 | | |
3726 | | - | |
| 3726 | + | |
| 3727 | + | |
| 3728 | + | |
| 3729 | + | |
| 3730 | + | |
| 3731 | + | |
| 3732 | + | |
| 3733 | + | |
| 3734 | + | |
| 3735 | + | |
| 3736 | + | |
| 3737 | + | |
3727 | 3738 | | |
3728 | 3739 | | |
3729 | 3740 | | |
| |||
0 commit comments